Closed (fixed)
Project:
Wysiwyg
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Feb 2009 at 20:51 UTC
Updated:
9 Mar 2009 at 04:00 UTC
Jump to comment: Most recent file
Have installed the development snapshots of Wysiwyg and Image Assist to get Image Assist working with TinyMCE3. Everything seems all right as long as I stay with Firefox, but:
In IE, the rich text editor (TinyMCE3) does not show, and IE reports "Error on page". The details of the error reads (sorry if my direct translation from Norwegian does not make sense):
Line: 4
Character: 24
Error: Expected identificator
Code: 0
(If I disable TinyMCE (i.e. no editor) in Wysiwyg profile settings, the pages with text areas all load fine without the error.)
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | wysiwyg-HEAD.jslint_.patch | 4.05 KB | sun |
| #17 | wysiwyg-HEAD.jslint.patch | 3.37 KB | sun |
| #17 | img_assist.jslint.patch | 850 bytes | sun |
| #11 | img_assist-HEAD.js-syntax.patch | 850 bytes | sun |
| #8 | wysiwyg-HEAD.js-syntax.patch | 1.81 KB | sun |
Comments
Comment #1
sunMarking as duplicate of #353406: Javascript error in IE 6 and 7 causes blank page
Please use the latest development snapshots of Wysiwyg API and Image Assist.
Comment #2
jofje commentedI'm sorry - guess that I'm missing something obvious here, but thought I already used latest dev snapshots:
Image Assist 6.x-3.x-dev (2009-feb-01)
Wysiwyg API 6.x-2.x-dev (2009-feb-01)
Maybe I've managed to make a mess during installation/upgrading? Is the order of the installation/upgrade of the two modules important? Is it important to delete the old files, or is it sufficient to copy new files into the directories?
Comment #3
jofje commentedHaving read the other issue (which this one is supposed to be a duplicate of) several times now, and thinking some more, I'm tempted to argue that this is not a duplicate (=twin). I can see that it is similar enough to be called a cousin, though ...
In that other issue, the error report reads:
Line 2
Char 1
Error: 'tinyMCE is undefined'
Code: 0
In fact, I experienced that error as well, before upgrading to what I believe is the latest development snapshots. After upgrading, the error report in IE changed (see my original post).
(Being the first couple of posts I've ever done here, I'm unsure about the etiquette of changing status of the issue, but I'll take the chance. Of course I'm not sure if this is a bug report either, or a support request, but if I had known I would have either fixed my problem or posted a patch for the bug ;-)
Comment #4
sunI am not able to reproduce this error. Please test whether it works if you only have bold + italic buttons enabled in your profile.
Comment #5
jofje commentedThanks for taking your time!
With only bold an italics in profile, I still get an error in IE (and as before I can see the normal, non-rich editor), but the error report now reads:
Line: 170
Character: 14
Error: Expected identificator, string or number
Code: 0
(In FF everithing is as expected, editor now shows with only bold and italics buttons)
Comment #6
jofje commentedStill learning here - just a post to change status to active again - since a little bit more info was provided in previous post ;-)
Sorry.
Comment #7
jofje commentedDoes this make any sense to you, regarding our problem at hand:
http://cow.neondragon.net/index.php/1404-Internet-Explorer-Javascript-Er...
Comment #8
sunPlease test attached patch. See http://drupal.org/patch for further information.
Comment #9
jofje commentedOoops! Big problem. Would really have liked to test (in fact I ran home from work as your message arrived).
First: I'm a newbie in here. Not done any patching before. Have read through the info on patching, eager and willing to learn, but desperatly searching for the bit that says: "How to do this the simple way, without any prior knowledge" ...
Second (more serious): I don't have any test site set up locally, just a live site at a hosting company (yes, I know! Blush ...). No idea if it is even possible for me to get into the Linux server with any command utility or the like.
You might, with justice, ask what I do in here playing with dev snapshots and posting bug reports in the first place. My main motivation, of course, is to get an up-and-running site, which I have, except for the possibility to use Image Assist with a Wysiwyg editor. Using Firefox myself I was in fact very happy, until I recieved messages from my fellow editors using IE that it didn't work for them.
So, I perfectly understand if you're now shaking your head in disbelief and give up on me, but I would greatly appreciate if you're still able to help, and I in return will be plesed to help find out if there really is a bug somwhere.
So, is there by any chance another, unofficial, dirty way of testing the patch, say for example me downloading one or more complete file(s) for me to transfer to the appropriate place? I'm willing to take the risk, since I feel that undoing an error should be quite easy in this case, and I do in fact have a backup (even if it might come as a surprise by now).
The other alternative of course, is that I try to set op a localhost testsite om my computer, but that would be a cumbersome process, me beeing a newbie to that as well and all that, and working a windows operated box.
Comment #10
ezraw commentedI believe I am having the same issue, so I tested the patch and it didn't resolve the problem.
img_assist version: DRUPAL-6--3
wysiwyg version: HEAD
TinyMCE works great with FF. In Internet Explorer 6&7 it gives an error, "Line 169, Unexpected identifier, string or number"
When I run the IE debugger it points to this line in tinymce-3.js:
Although line 169 is actually
Thanks for any help you can provide.
Comment #11
sunMoving over to Image Assist project.
I just committed a patch for Wysiwyg API that implements a similar change in tinymce-3.js like in attached patch. A new development snapshot will be available in approx. 12 hours.
Attached patch is for Image Assist. It would be good to know whether Wysiwyg API / TinyMCE works without the Image Assist button being enabled.
Also, please test attached patch.
Comment #12
ezraw commentedWe applied the patch and also updated Wysiwyg to HEAD from CVS. I could could see the line
var $content = $('<div>' + content + '</div>');in both files, both on the server and from the browser. We still get the same error, regardless of whether img_assist is enabled or not.
The error occurs from /modules/wysiwyg/editors/js/tinymce-3.js
Should we move this issue? I'm not sure on the protocol.
Comment #13
kyoder commentedIE's debugger is misleading. The actual error is being caused by this bit:
I did some Googling and it seems that "class" is a reserved word (for future use according to Mozilla - https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Reserved_...). FF lets you use it but IE is a stickler about it.
JSLint is a web-based debugger that also recognizes "class" as being reserved:
http://www.jslint.com/
So the only question now is how to re-write the code without using "class" ?
came up with this:
that took care of the error msg in IE except then there was an error on line 56 on this file:
\sites\all\modules\img_assist\plugins\img_assist\img_assist.js
it was once again the reserved name issue for "class" so I swapped out "node.class" with "node.className"
so now there's no more error messages in IE but the editor still isn't rendering so the journey continues...
Comment #14
sunWow, you guys rock! Thanks for helping to debug this!
I think we can just stuff single quotes around 'class' to avoid this error:
Can someone test this?
Comment #15
ezraw commentedThe change in #13 works, and the editor DOES load but the toolbar at the top is missing. Both with img_assist enabled and disabled.
We'll give it try with the change in #14 tomorrow.
Comment #16
jofje commentedFinally something I was able to do contribute to :-)
Tried with change #14 (no other changes).
Editor loads and works in FF, with working Image Assist (as always)
Editor loads and works in IE, but without Image Assist camera button (also with "teaser break" button missing)
Still yellow exclamation mark, and error reading:
Line: 14
Character: 24
Error: Expected identificator
Comment #17
sunAlthough both projects are affected, moving back to Wysiwyg API. Better title.
I ran all JavaScripts through JSLint, so attached patches should hopefully eliminate all issues.
Please test.
Comment #18
sunFollow-up, including another fix for wysiwyg.js.
Comment #19
jofje commentedHappy to test at once if presented as in #14 - otherwise we'll have to wait for the competent "patchers" ;-)
Comment #20
sunApplying patches is very trivial: see http://drupal.org/patch for a full description, resp. http://drupal.org/patch/apply
Comment #21
jofje commentedUnless, as mentioned in #9 above, I only have the live site to test with, on a web-host that I don't control myself - only ftp access.
... or have I misunderstood something?
I'm planning to to make a localhost test-site (drubuntu - http://drupal.org/node/314013), but probably not tonight ...
Comment #22
sunCommitted both patches. However, the error still does not seem to be resolved.
Comment #23
jofje commentedInstalled latest snapshots (feb-06) - confirming that the issue is not resolved. Same behavior/errors as before (#16).
Comment #24
sun#370277: Tinymce not working on Chrome? contains a new patch, which I should probably move over here. I attached it there, since someone posted the actual error message from Chrome. Please test.
Comment #25
sunThe remaining JS fixes will be dealt in #370277: Tinymce not working on Chrome?
Comment #26
ezraw commentedHi Sun, I finally had time to get back to this issue in IE and figured it the source of our issue. I turned out to be a conflict with Popups module. No JS error showed up, but it breaks tinymce. I'm going to post an issue over there and try and also ask karlyoder to have a look. Thanks for your help on this.
Comment #27
ezraw commentedLooks like this is a known issue in Popups. Just to put this out there in case anyone else is having the same issue, Date popup also breaks tinymce #244640: tinymce conflicts with cck date popup [jquery] as does external link #380692: Incompatibility with Wysiwyg API + TinyMCE .