CKEDITOR and JQUERY mismatch between versions

Programming

Sep 13

This week I have been mainly using ERPAL.

If you have no point of reference with ‘The Fast Show’ then just ignore this and read on…

So, I’ve been playing with Drupal and the wonderful ERPAL Project Management module this week – I found an annoying problem where I thought I was caught between a rock and hard place. It seems that CKEDITOR 4.x needs JQuery 1.5 to work properly. But JQuery 1.5 gives me problems with some older browsers that my client is using (IE7/8) so I switch to JQUERY1.8 and the site looks good in IE but suddenly CKEDITOR it not working. Aaaargh…

Luckily, by an act of extremely good timing, the latest DEV version of JQUERY UPDATE adds the ability to switch between JQUERY versions when in normal and administration modes. So, by downloading and installing the dev version from 2013-May-02 (http://ftp.drupal.org/files/projects/jquery_update-7.x-2.x-dev.tar.gz) this lets me specify a version for the main site and a older version when in ADMIN mode.

Once you installed the Update goto http://your-site.com/admin/config/development/jquery_update

jquery update

And set the default jQuery Version to 1.8 and the Alternate jQuery version for administrative pages to 1.5

Then we can set our theme to always use administration mode (and therefore jQuery 1.5) when editing and using CKEDITOR by going to http://your-site.com/admin/appearance and check ‘Use the administration theme when editing or creating content

use jquery in theme

Now I view site using JQUERY 1.8 and it works great and edit using 1.5 and CKEDITOR is happy.

/groovy

Follow

About the Author

IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Alpha Nerd and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and in the words of the most interesting man in the world: Stay thirsty my friend.