After today's superfish 8.x-1.0-rc4, console is reporting this error:
js_g9sCTrS8_9zKq-acteZnA8oYtePDNPzPOAIiqsICcSA_-CAEkrQ3BGSCvVfs4VarFZ92T3gUwk_LtIIKc53-NIs.js:9 Uncaught ReferenceError: jQuery is not defined(…)(anonymous function) @ js_g9sCTrS8_9zKq-acteZnA8oYtePDNPzPOAIiqsICcSA_-CAEkrQ3BGSCvVfs4VarFZ92T3gUwk_LtIIKc53-NIs.js:9
Line 9 is:
else if(a=='useragent_predefined'&&navigator.userAgent.match(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i)){s(i)}};return this}})(jQuery);
I have to disable AdvAgg aggregation so the site becomes functional again.
No superfish settings were changed, nor superfish library has been update since rc3, so I'm pretty sure this is a regression from rc4 alone.
Please, let me know if you need more information.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 2825949-9.patch | 8.04 KB | duaelfr |
Comments
Comment #2
denydias commentedComment #3
denydias commentedI've just downgraded to superfish 8.x-1.0-rc3 and all is back to normal.
Comment #4
geek.geek commentedHi,
Maybe you need to do a rebuild? e.g. http://example.com/core/rebuild.php
Comment #5
denydias commentedHi, @geek.geek! Tks for reply.
I ran
drush crin both cases, either upgrading to rc4 and downgrading to rc3. So a rebuild may not be the case here.Updated 2016/11/16: for some odd reason (oh, Drupal's bureaucracy!) I'm not able to publish new comments on the issue I've created myself. So what comes bellow goes into this update.
After further investigation, I could determine the cause of this behavior with rc4.
Please see the diff bellow.
The cause for the OP is quite clear now. It boils down to this commit (#2825179).
To reproduce the above behaviour, some preparation is required:
sites/default/settings.local.phpreads like bellow:admin/config/development/performance/advagg, check 'Enable advanced aggregation' and save.Until RC3, the library detection condition was working in some extent, even tough it was bugged. The RC4 fix properly rewrites the library path, but doing so it also messes with the core grouping logic in some way. CSS/JS aggregation modules (like AdvAgg) counts on that to queue files in an ordered, working fashion. As shown above, SF libraries are being loaded before jQuery ones, which obviously leads to errors, as there is no jQuery when SF libraries are parsed by the browser.
Which I don't know ATM is if this is an AdvAgg bug or SF's itself. I'm biased towards SF as this just happened after RC4 and AdvAgg have never behaved this way before.
Is there any workaround an operator could try in order to fix that ordering issue without the need to wait for a SF patch?
Comment #6
denydias commentedEdited on 2016/11/17: please see #5.
Comment #8
denydias commentedEdited on 2016/11/17: please see #5.
Comment #10
duaelfrThis issue has been fixed.
(I'm just cleaning the issue queue)
Comment #11
denydias commented@mehrpadin and @DuaelFr,
The commit 0700de5 did the job for RC5. By using the same setup as per #5, the scripts order now output:
This is different from RC3, but the loading order correctly respects SF's dependencies while their paths looks sane.
Well done, guys!
Comment #12
geek.geek commentedComment #13
duaelfrFor the record here is the commited patch (to be used by composer if needed)