One site I'm working on has a module that requires jquery_update but another module that breaks with jquery_update (and works fine with jquery that ships with core). Fortunately, the two modules do not coexist on the site, and it's only on the that I need jquery_update not to load. Would it be desirable (or encouraging a highly unstable site) to expose an admin option for paths on which to show/hide (replace/not replace) jquery?
For an immediate workaround specific to my need, I changed:
jquery_update.module:59:
if (!empty($variables['scripts'])) {
to
if (!empty($variables['scripts']) && ($variables['is_front'] != 1)) {
ftw.
Comments
Comment #1
ipwa commentedA big +1 for this.
There are many issues that could be solved if this was implemented properly.
What I suggest is having a textfield that disables jquery update for certain paths, where we could use a wildcard.
For example if we disable jquery update for 'admin/*' a lot of the recent issues related to using 1.7 or higher could be solved and we could still use higher versions of jquery for our themes.
Attaching mockup:
Comment #2
ipwa commentedChanging title
Comment #3
ipwa commentedList of issues that could be temporarily solved with this:
I know this is not the ideal solution, but its a good short term solution while we find real solutions for the issues.
Comment #4
ipwa commentedActually I think Jacine's patch in #1524944: Allow different version for administrative pages is the correct way to solve this.
Comment #5
Mołot commentedJacine's patch is a good thing, but it is not designed for problems with conflict on the front theme, for example. And it will not help when I need new jquery on some pages, admin or not, and not for all.
Last but not least, linked issue is still alive, people have some significant problems using it.
Here is a patch to simply exclude module altogether where it's not needed, made against 7.x-2.3 but with context large enough to apply it manually.
Comment #6
ericduran commentedI'm not really sure this patch is needed anymore.
I think most of the issues have been hammered out in the latest dev.
I'm going to postpone it and if enough people request it then we can revisit the issue. Sounds good?
Thanks.
Comment #7
Mołot commentedGood enough, I guess.
Comment #8
hass commentedI need Enable jquery update per paths to exclude it everywhere except on one node type add/edit form and the field type edit form. Nothing else. This may save a lot of headaches as jquery_update causes mostly a lot of bugs.
Comment #9
Mołot commentedhass, see my patch - only thing you need to do is to reverse condition and change a bit of wording.
Comment #10
aze2010 commentedconfirm: this patch works!
Please submit it!
Thank you very much!!!
Comment #11
FrancescoP commentedThanks Mołot, you saved my day. :)
Comment #12
hass commentedThat is not flexible as it does not support wildcards.
Comment #13
markhalliwellThere's really two components (issues) to this:
1) Provide a "disable" option
2) Provide a way to changed jQuery versions based on path.
I'm closing this as a duplicate of the following two related issues as they are both a separate feature.