Some notes to this code from ckeditor.admin.inc:
if (module_exists('jquery_ui')){
jquery_ui_add(array('jquery.ui.widget.js', 'jquery.ui.sortable.js'));
}
else {
drupal_add_js($module_drupal_path . '/includes/jqueryUI/jquery-1.4.4.min.js', 'file');
drupal_add_js($module_drupal_path . '/includes/jqueryUI/jquery-ui.js', 'file');
drupal_add_js($module_drupal_path . '/includes/jqueryUI/jquery.ui.widget.js', 'file');
drupal_add_js($module_drupal_path . '/includes/jqueryUI/jquery.ui.sortable.js', 'file');
}
1. jQuery UI module suggests to install jQuery UI 1.6 archive from http://code.google.com/p/jquery-ui/downloads/list?q=1.6
There are no jquery.ui.widget.js and jquery.ui.sortable.js in this archive!
Besides, if they were there, the corresponding line should look like this: jquery_ui_add(array('jquery.ui.widget', 'jquery.ui.sortable'));
i.e. without '.js'.
2. If jQuery UI module does not exist then jquery-1.4.4.min.js is included. But the page already has jquery script and probably some jquery plugins created by js-scripts from other modules. The jquery-1.4.4.min.js file is included too late, so some jquery plugins get broken. I found a problem with the cookie plugin (from jstools module) which was included before jquery-1.4.4.min.js in the page output.
Comment | File | Size | Author |
---|---|---|---|
#2 | Issue-1325926-by-Jorrit-fix-invocation-of-jquery_ui.patch | 1.15 KB | Jorrit |
Comments
Comment #1
rkdesantos CreditAttribution: rkdesantos commentedSimilar problems on one of my sites. I get this error:
It is preventing any editing of the toolbars and pretty much making the new aspects of the admin interface useless.
Comment #2
Jorrit CreditAttribution: Jorrit commentedThe attached patch worked for me.
Comment #3
mkesicki CreditAttribution: mkesicki commented@Jorrit does Drag & Drop of toolbar works fine with your patch ?
Which version of jquery.ui library do you use ?
Comment #4
Jorrit CreditAttribution: Jorrit commentedI use jQuery UI 1.7.3 with jQuery 1.3.2. As far as I can see the toolbar works fine. Do you experience problems with my patch?
The jQuery UI module 1.5 with jQuery Update module 2.0 alpha 1.
Comment #5
mkesicki CreditAttribution: mkesicki commentedYes in my case after adding your patch it works not well, but I think this is problem with jquery ui version.
We will try check this again. Please be patient.
Comment #6
mkesicki CreditAttribution: mkesicki commentedok @Jorrit your patch works fine with yours configuration. We will wait what for other users reviews.
Comment #7
Sergeant CreditAttribution: Sergeant commentedThe patch solves the 1st problem, but does not solve the 2nd one (for the case when jQuery UI module does not exist).
Comment #8
mkesicki CreditAttribution: mkesicki commented@Sergeant can you try change
drupal_add_js($module_drupal_path . '/includes/jqueryUI/jquery-1.4.4.min.js', 'file');
to
drupal_add_js($module_drupal_path . '/includes/jqueryUI/jquery-1.4.4.min.js', 'core');
in
ckeditor.admin.inc
(line 474 ) to check if this solves 2nd problem ?Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm actually using
jQuery UI 1.6
jQuery Update 1.3.2
CKEditor 6.x-1.x-dev (2011-ott-28), patched with #2 or not patched
The drag function is not working
Comment #10
Sergeant CreditAttribution: Sergeant commentedFor michal_cksource:
Yes, 'core' solves the 2nd problem.
And I also found that the 1st problem is not solved by the patch completely. The bug: icons cannot be dragged from "Used buttons" to "All buttons". Probably ui.widget.js is needed for that but this file is absent in the standard jQuery UI 1.6 package.
Comment #11
mkesicki CreditAttribution: mkesicki commented@Sergeant
thx for tests.
I think that 1.6 package of jQueryUi is too old to work with Drag & Drop buttons feature. We try fix this ASAP. Please be patient.
Comment #12
mkesicki CreditAttribution: mkesicki commentedI commited changes to GIT. Please try latest DEV version. If there are problems with it, please reopen this ticket.
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedthanks for fixing it. It works now!
Comment #14
mkesicki CreditAttribution: mkesicki commented