Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When updating to beta 6 and 7 notice fragments/params are missing for IE<10. I decided to do a quick casting in order to solve it. There might more quick arounds .
Comment | File | Size | Author |
---|---|---|---|
#7 | fragments_missing_since-2628596-7.patch | 732 bytes | znerol |
#6 | cached_fragment_missing-2628596-6.patch | 735 bytes | angel.angelio |
#2 | cached_fragment_missing-2628596.patch | 733 bytes | angel.angelio |
Comments
Comment #2
angel.angelio CreditAttribution: angel.angelio as a volunteer commentedComment #3
angel.angelio CreditAttribution: angel.angelio as a volunteer commentedComment #4
ChristianSanders CreditAttribution: ChristianSanders commentedThis patch works perfectly. We were having some issues with anon users in IE9 and this fixed those fantastically. Thank you very much! :)
Comment #5
znerol CreditAttribution: znerol commentedIf
this
is really the window object in IE8, then simply converting that window object to a string is very likely wrong. Is that comment really correct?Comment #6
angel.angelio CreditAttribution: angel.angelio as a volunteer commentedZnerol,
I fixed the comment. It is not the object window, it is a string object. I guess browsers different than IE<=9 happen to do the casting or this is a string constant for them
Comment #7
znerol CreditAttribution: znerol commentedOh, so I'm starting to understand the problem. There are two kinds of strings in JavaScript (not only in MSIE): String Objects and String Literals.
Consider the following experiment (IE9 console, also works in other browsers):
This matters because
authcache_ajax.js
uses the identity operator (===
) which also takes into account the data type. Note that the identity operator is preferable according to Douglas Crockford. I quickly checked Drupal 8 code base and I can confirm that it is used exclusively there.Citing from the jQuery.each docs:
This suggests that maybe the
each
callback should be changed instead (patch attached).Comment #9
angel.angelio CreditAttribution: angel.angelio as a volunteer commentedAlright, that makes sense I should have used the second argument of the each callback.
Comment #10
znerol CreditAttribution: znerol commentedDo you have the chance to test the patch against some affected version of IE?
Comment #11
angel.angelio CreditAttribution: angel.angelio as a volunteer commentedYes, I did test your patch. It works!
Comment #13
znerol CreditAttribution: znerol commentedThank you very much for reporting this issue and for providing a fix.
Comment #15
kevster CreditAttribution: kevster commentedMany thanks - I just had this issue reported for customers when loading category pages and using authcache beta7. Weve just upgraded the server to latest ubuntu server LTS so has newer PHP and MySQL.
Issue occured only on IE 9 and 8 - the ajax content was just spinning and wouldnt load.
Great job - thanks!!
Comment #16
John Pitcairn CreditAttribution: John Pitcairn commentedYup, current dev fixes my IE9 issues as well. How about a new beta release?