Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENABLE_JAVASCRIPT_CONTROLS use #29883

Closed
3 tasks done
antonio-tg opened this issue Aug 7, 2024 · 2 comments
Closed
3 tasks done

ENABLE_JAVASCRIPT_CONTROLS use #29883

antonio-tg opened this issue Aug 7, 2024 · 2 comments
Labels
#bug:regression Bugs that are identified as regessions

Comments

@antonio-tg
Copy link

Bug description

I have Superset 2.1.3 in production and I would like to upgrade to 4.0.2, however a feature that works great in 2.1.3 has been deprecated in 4.0.2, the feature is the option to use JS code in maps, that is:

ENABLE_JAVASCRIPT_CONTROLS

Therefore I would like your help to find an alternative and be able to solve this problem.

How to reproduce the bug

Upgrade from Superset 2.1.3. to 4.0.2

Screenshots/recordings

The map look like this in superset 2.1.3:

mapa_normal

In the newest supeset look equal, but when I place the mouse cursor over the map this happend:

error

I mean this:

An error occurred while rendering the visualization: Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=EvalError%3A%20Refused%20to%20evaluate%20a%20string%20as%20JavaScript%20because%20'unsafe-eval'%20is%20not%20an%20allowed%20source%20of%20script%20in%20the%20following%20Content%20Security%20Policy%20directive%3A%20%22script-src%20'self'%20'strict-dynamic'%20'nonce-7ZywRWntR57icaAOAZiKN_Qp24uqef_N'%22.%0A&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Superset version

4.0.2

Python version

3.9

Node version

16

Browser

Chrome

Additional context

This feature is really important to my users so I'll be so thankful if you could help me with this.

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dosubot dosubot bot added the #bug:regression Bugs that are identified as regessions label Aug 7, 2024
@harshit2283
Copy link
Contributor

Likely due to Talisman, please refer #25871 (comment)

@antonio-tg
Copy link
Author

antonio-tg commented Aug 13, 2024

Thank you very much dear @harshit2283, your example allow me to solve my problem, only that in my case I'm in superset 4.0.2 so the two changes where made in the same file.
solution_bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug:regression Bugs that are identified as regessions
Projects
None yet
Development

No branches or pull requests

2 participants