IMCE uses a Drupal function drupal_add_js() to add js to pages that use the module. The problem is that this bypasses Drupal's library system where modules (like jquery_update) can update the libraries to a new version. Because of this, multiple modules will load the new and old versions of the libraries at the same time and cause issues. Instead, the drupal_add_library function should be used. Please see (http://drupal.org/node/1386294#comment-5597622) for more information on this issue.
jquery_update is an important module because jquery versions prior to 1.7 will soon throw a lot of JS errors in Chrome in the near future. This is because of a feature layer.x and layer.y that will no longer be supported by Chrome.
I have attached a patch which I believe should work, but have not been able to thoroughly test it. I'm fairly new to patching, so feel free to do this in a better way.
| Comment | File | Size | Author |
|---|---|---|---|
| imce-load-libraries-rather-than-js.patch | 607 bytes | damontgomery |
Comments
Comment #1
ufku commentedIt's not misc/jquery.form.js. IMCE uses a specific version included with the module. It seems to be compatible with jQuery1.7
Comment #2
damontgomery commentedThanks for the clarification.
It turns out that we are not actually using IMCE even though we have it installed. Because of this, I'm not really able to test whether the problems we were having are true for IMCE and jquery_update, but I will trust your report that they are not an issue. I had mistaken IMCE for another image handling part of our site.
It seems problematic to have different modules loading different versions of libraries all at once and it makes it easy to encounter issues similar to the ones we encountered with ctools and jquery_update.
I'm not sure what you want to do, so my patch and solution clearly does not apply to your module.
Thanks for the quick response and for your contributions!