Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
In IE6 and IE7 with "Add JavaScript to all pages" option enabled the following error is generated (pages with and without flash) :
Line: 38
Char: 3
Error: Expected identifier, string or number
Code: 0
URL:
Disabling "Add JavaScript to all pages" option gets rid of the error notice but breaks playback.
Any ideas how to solve this?
Comment | File | Size | Author |
---|---|---|---|
#14 | swftools-797606.patch | 1.08 KB | Rob_Feature |
#10 | remove_extra_comma.patch | 285 bytes | altrugon |
Comments
Comment #1
RedTop CreditAttribution: RedTop commentedcorrection:
disabling does not break playback and removes error only from pages without flash (which makes sense).
Interestingly, disabling also removes the error from pages using flowplayer.
Comment #2
Stuart Greenfield CreditAttribution: Stuart Greenfield commentedI'm going to have to find a machine with IE7 on it to test this!
Comment #3
RedTop CreditAttribution: RedTop commentedI use this:
http://finalbuilds.edskes.net/iecollection.htm
It allows you to install almost ALL (except 1.0) IE versions on the same machine. :)
[edit]
This may also be an option:
http://spoon.net/browsers/
I'll test to see whether the latest dev version also has this issue. Perhaps I can save you the trouble. :)
[edit2]
I can confirm that the latest dev 2010 (2010-May-12) also has this issue.
Comment #4
bratsun CreditAttribution: bratsun commentedI can confirm the same. IE6 & 7 throws out an error. In my case it says the bug is in wordpress player and onepixelout JS integration files. The same happens with direct embedding and sfwtools emdedding options. Patch is highly appreciated!
Comment #5
Stuart Greenfield CreditAttribution: Stuart Greenfield commentedPossibly related to #801666: Optimize JavaScript files breaks SWFtools in IE6 and IE7http://drupal.org/node/801666
Fixing now on DRUPAL-6--3. Try the dev package when it next generates and see if it clears the error.
Comment #6
Stuart Greenfield CreditAttribution: Stuart Greenfield commentedComment #7
RedTop CreditAttribution: RedTop commentedDownloaded new dev and tested in IE7 (IE6 crashes, but that may have to do with the hacky IE collection. Will test tomorrow)
Above error does not appear on IE7 anymore.
[edit]
Tested it on a 'proper' IE6 install and can confirm this error does not appear anymore.
Comment #8
mandclu CreditAttribution: mandclu commentedFor some reason IE has a hard time with Javascript arrays that end with an empty element, which is what you get when the last proper element has a comma after it. I've had this error thrown twice: once from swftools_wpaudio.js (line 36) and also in swftools_onepixelout.js (line 34). For some reason when IE throws the error it reports a line number two more than where it appears in the file. That's quality software for you.
Please remove the unnecessary commas in the JS files, since so many people continue to insist on using substandard browsers.
Comment #9
RedTop CreditAttribution: RedTop commentedThe IE6 hurting never stops, does it? :P
They still use IE6 at my work which is ridiculous. Much to my joy they have started rolling out IE8 to selected staff as a 'test'. As soon as we're all over to IE8 I'm going to add the IEupgrade module to our sites. I don't want to annoy the hand that feeds me but I do want to annoy IE6 users in general (heck, IE6 has annoyed me for long enough). :P
Comment #10
altrugon CreditAttribution: altrugon commentedHere goes the patch to remove that extra comma.
I know it is an standard in Drupal to use the extra comma in the arrays when we are coding php, but we probably should avoid this for javascript.
Comment #11
mandclu CreditAttribution: mandclu commentedI know there are at least two files that have that problem, possibly more. Shouldn't we aim for a single patch that fixes everything?
Comment #12
A Romka CreditAttribution: A Romka commentedsame thing happens in swftools_wpaudio.js (sites\all\modules\swftools\wpaudio\swftools_wpaudio.js) - I'm too lazy to create a patch, but once you remove comma on line 36 the error goes away in IE7
Comment #13
Rob_Feature CreditAttribution: Rob_Feature commentedAgreed with #11. This error occurs in a number of files (swftools_onepixelout.js in my case). I dont know enough to do a full patch but that would sure be appreciated :)
Marking as 'needs work' to get a proper fix across the whole module.
Comment #14
Rob_Feature CreditAttribution: Rob_Feature commentedOk, I went thru the module and tried to find any instances of this. I only found them in swftools_wpaudio.js and swftools_onepixelout.js
Here's my first attempt at a patch (as in, first attempt ever :) Let me know if this works or if there are additional cases.
Comment #15
bcobin CreditAttribution: bcobin commentedThank you so much for this! (Sorry - I didn't try the patch - just did it manually...) Good detective work!