dosubot[bot] commented on issue #32960: URL: https://github.com/apache/superset/issues/32960#issuecomment-2769377992
<!-- Answer --> The issue you're encountering with the `formatDate` helper in Handlebars charts after updating to Superset 4.1.2 might be related to changes in the Handlebars helpers or dependencies. In the 4.1.2 update, new Handlebars helpers for common math operations were added, but there is no specific mention of changes to the `formatDate` helper itself <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-handlebars/CHANGELOG.md)</sup>. To troubleshoot this issue, consider the following steps: 1. **Check for Changes in Dependencies**: Ensure that the `handlebars`, `handlebars-group-by`, and `just-handlebars-helpers` packages are correctly updated to their specified versions in the 4.1.2 update: - `handlebars`: `^4.7.8` - `handlebars-group-by`: `^1.0.1` - `just-handlebars-helpers`: `^1.0.19` <sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/plugin-chart-handlebars/package.json)</sup>. 2. **Review the `formatDate` Implementation**: Verify if the implementation of the `formatDate` helper function has changed or if there are any known issues with it. The current implementation uses `d3.time.format`, which should be checked for compatibility with your data and format string <sup>[[3]](https://github.com/apache/superset/blob/master/superset-frontend/plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.js)</sup>. 3. **Debug the Error**: The error message "i is not a function" suggests that there might be an issue with how the `formatDate` function is being called or with the data being passed to it. Double-check the template syntax and ensure that the data being passed to `formatDate` is in the expected format. 4. **Test with a Simple Template**: Try simplifying the template to isolate the issue. For example, test with a static date string to see if the error persists. If these steps do not resolve the issue, further investigation into the specific changes in the 4.1.2 update or a deeper dive into the `just-handlebars-helpers` package might be necessary. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/86b91daa-27a3-41a1-a7af-cfd2b9176939?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/86b91daa-27a3-41a1-a7af-cfd2b9176939?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/86b91daa-27a3-41a1-a7af-cfd2b9176939?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/86b91daa-27a3-41a1-a7af-cfd2b9176939?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/86b91daa-27a3-41a1-a7af-cfd2b9176939?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/86b91daa-27a3-41a1-a7af-cfd2b9176939?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/86b91daa-27a3-41a1-a7af-cfd2b9176939?feedback_type=other)</sup> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
