-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Every 3rd-5th edit page load, javascript is not initialised and widgets don't appear in debug mode #156
Comments
Did some more checks:
(* The listed error is explained here: https://docs.plone.org/adapt-and-extend/theming/resourceregistry.html#the-mismatched-anonymous-define-error . So there's probably a mismatch between the p.a.widgets code using requireJS but inserted using normal javascript tags, but I have no idea how to fix this. |
Your issue may be related to a bug in plone.app.jquerytools.form.js that I reported for plone.app.jquerytools. |
@holdenhao You might want to test plone.app.widgets directly from the 1.x branch on github and not the released 1.9.x versions on pypi. @thet and @petschki did some work this June in #167 and #168 to avoid collissions between old style javascripts and require.js . That's what's causing the mismatched anonymous defined error and I think also closes this issue. The 1.x branch now has AFAIK very reliable TinyMCE loading also in development mode, I wasn't able to trigger an empty textarea while testing. We might need a new 1.9.x release not to disappoint others testing p.a.widgets 1.x in Plone 4, this looks very promising now. |
Thank you for letting me know. I will test from source. My temporary fix was to use version 1.9.0 of plone.app.jquerytools |
@holdenhao You might by onto some other issue as well, because after plone.app.jquerytools 1.9.0 jquery.form and jquery.tools were updated in this commit. plone/plone.app.jquerytools@d1327d3 If you check the commit you'll see that 'support for AMD' was added in jquery.form, that could collide with the javascript loading of plone.app.widgets. Unfortunately I'm just starting with all this magical javascript bundling in the front end, so much of my debugging efforts go like "if there's smoke, there must be a fire" :-( |
Using Plone 4.3.14, testing p.a.widgets 1.91. Created a site, installed p.a.widgets in the control panel.
Randomly the following error is shown in the browser console, which disables all widgets richtext-area's, the formtabs for categorisation, etc. from being initialised:
widgets.js:168 Uncaught Error: Mismatched anonymous define() module: function ($) {
"use strict";
.... .....
http://requirejs.org/docs/errors.html#mismatch
at makeError (http://localhost:8080/Plone/portal_javascripts/Sunburst%20Theme/++resource++plone.app.widgets.js:1:1396)
at intakeDefines (http://localhost:8080/Plone/portal_javascripts/Sunburst%20Theme/++resource++plone.app.widgets.js:1:7745)
at http://localhost:8080/Plone/portal_javascripts/Sunburst%20Theme/++resource++plone.app.widgets.js:1:16557
The text was updated successfully, but these errors were encountered: