dosubot[bot] commented on issue #40119: URL: https://github.com/apache/superset/issues/40119#issuecomment-4459498900
<!-- Answer --> @ketansharma78 Here are two things to check: **1. `get_time_filter()` not working** This function requires the `ENABLE_TEMPLATE_PROCESSING` feature flag to be explicitly enabled. It's **disabled by default** for security reasons [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/config.py#L470). Add this to your `superset_config.py`: ```python FEATURE_FLAGS = { "ENABLE_TEMPLATE_PROCESSING": True, } ``` Then restart Superset. Without this flag, Superset uses a no-op template processor that ignores all Jinja templates [[2]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/jinja_context.py#L900-L912). **2. 403 Forbidden when adding metrics (even as Admin)** A few things to try: - **Run `superset init`** after the upgrade to resync all roles and permissions [[3]](https://github.com/apache/superset/issues/36485). This is essential after version upgrades. - **Check role assignments**: Ensure your Admin user is NOT also assigned the Public role — conflicting role assignments are a common cause of 403 errors in 4.1.x [[4]](https://github.com/apache/superset/issues/35960). - **Verify global permissions**: Confirm your Admin role has `all_database_access` and `all_datasource_access` permissions [[4]](https://github.com/apache/superset/issues/35960). - **If behind a reverse proxy**, ensure proxy fix is enabled: ```python ENABLE_PROXY_FIX = True ``` This can cause CSRF/session issues that manifest as 403 errors [[5]](https://github.com/apache/superset/issues/39436). Could you share the exact error from the browser's Network tab (the response body of the 403 request) and whether you've run `superset init` after upgrading? That would help narrow down the root cause. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=cecf4d1a-dfb9-4589-8878-69b72b774890) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset) -- 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]
