Error in javascript with new django-cms 2.3 release, django1.4, jQuery namespacing issues
I'm re-posting the issue from evildmp's fork because I'm having the same problem:
When loading the semantic editor in the django-cms front-end editor, there is a javascript error in the editor_widget template, on this line:
var qs = jQuery.query.load(window.parent.location.search);
Uncaught TypeError: Cannot call method 'load' of undefined
Examining this, at this point in execution jQuery is defined, but jQuery.load is undefined. Some other code loaded by django-cms is obliterating jQuery.
This is probably coming from line 8 of cms/js/plugins/cms.setup.js:
var jQuery = (django) ? django.jQuery : window.jQuery || undefined;
Fixing this error using closures leads to exactly the same thing in static/semanticeditor/javascript/wymeditor/plugins/semantic/wymeditor.semantic.js,
which can be fixed in the same way.
I can upload a diff, but it is fixed very well just by wrapping the $(document).ready call in editor_widget with:
(function(jQuery){
})(jQuery);
And wrapping all the code in wymeditor.semantic.js with the same thing.
Comments (2)
-
-
- changed status to resolved
- Log in to comment
this looks fixed in the current trunk, sorry for the nose...