Hi! I've noticedd error jquery.ba-bbq.js?v=1.2.1:28 Uncaught TypeError: Cannot read property 'msie' of undefined on some admin pages e.g. Modules, Views, when using jQuery 3.1 with jquery_update module.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3054417-6.patch | 2.14 KB | mcdruid |
| #6 | interdiff-3054417-5-6.txt | 413 bytes | mcdruid |
Comments
Comment #2
khiminrm commentedComment #3
damienmckennaWhile this is great, I think it needs to be added to jQuery Update.
Comment #4
damienmckennaFYI I was having this error on the admin/modules page and I think it was triggered by module_filter. I ended up fixing it by reverting to core's jQuery for admin pages.
Comment #5
mcdruid commentedThanks - here's a patch which adds this to the jquery_update module.
It seems to work when a newer jQuery version is added (tested manually with jQuery 3.6 as a custom version).
I've not tested whether it's detecting MSIE correctly but hopefully nobody is too worried about that these days as we'd be talking about IE10 or earlier according to:
https://www.whatismybrowser.com/guides/the-latest-user-agent/internet-ex...
Anyone able to test and confirm before I commit this? (Unfortunately there's no js testing framework in D7 so jquery_update has zero test coverage).
Comment #6
mcdruid commentedOops spotted a problem I'd missed.
Comment #7
mcdruid commentedI'll also remove the colon after
@see:in the js file's comment on commit.Comment #8
mcdruid commentedhttps://api.jquery.com/jquery.browser/
Looks like jQuery.migrate provides a shim for this, but it doesn't seem to work with recent versions (e.g. jQuery 3.6 and Migrate 3.3.2).
It's good that @khiminrm's fix checks
$.browser===undefinedfirst so this shouldn't do anything if jQuery Migrate has already done its magic.Comment #10
mcdruid commentedThank you everyone!