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

Plugin javascript code, not executed upon adding it #6698

s-weigand opened this issue Jul 3, 2019 · 0 comments


None yet
1 participant
Copy link

commented Jul 3, 2019


While writing integration tests for my django-CMS plugin, which requires the execution of javascript code to be rendered properly, I found that the javascript code isn't executed when the plugin is added for the first time.
Instead the page needs to be published or refreshed, for the DOM to to use the scripts.

Expected behaviour

The javascript code loads and executes, when the plugin is added to the page and it gets rendered properly.

Actual behaviour

The html code of the updated page is requested via ajax and the innerHtml of the body is replaced with the updated innerHtml of the new body (see). This method leads for the scripts not to be executed (tested it with a minimal example in a static html file).
djangocms-googlemap has the same problem.


  • Python version: All (Javascript issue)
  • Django version: All (Javascript issue)
  • django CMS version: All (Javascript issue)

@s-weigand s-weigand referenced a pull request that will close this issue Jul 3, 2019


Fix plugin js loading #6699

2 of 11 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.