I get the following errors when I reply to comments with tinymce enabled in IE

Line:1
Char:81
Code:0
Error:'tagName' is null or not an object
URL:http://vpc-srv5/comment/reply/1

and in firefox I get

tinyMCE.baseURL has no properties
http://vpc-srv5/sites/all/modules/tinymce/tinymce/jscripts/tiny_mce/tiny...
Line 1

and

fE has no properties
http://vpc-srv5/sites/all/modules/imce/imce_set_tinymce.js
Line 10

If I disable lightbox I do not get any errors.

Comments

stella’s picture

Assigned: Unassigned » stella

Where did you get the scriptaculous and prototype js files from?

stella’s picture

I can't reproduce this with the normal (non-compressed) tinymce files and no plugins enabled.

H3rnand3z’s picture

After some more testing I realized that the conflict is with IMCE 5.x-1.x-dev and Lightbox2 5.x-1.1 If I disable either IMCE or lightbox the error goes away. I will do some more testing with a clean install

H3rnand3z’s picture

After some more testing I realized that the conflict is with IMCE 5.x-1.x-dev and Lightbox2 5.x-1.1 If I disable either IMCE or lightbox the error goes away. I will do some more testing with a clean install

stella’s picture

Project: Lightbox2 » IMCE
Version: 5.x-1.1 » 5.x-1.x-dev
Assigned: stella » Unassigned

I've only been able to reproduce the 3rd error you've listed. I think these errors occur due to a conflict between the 3rd party prototype.js file, that you have to download to run with the lightbox2 module, and the tinymce 3rd party code. I think it might be a conflict between two "extend" functions. I don't know where or why but data from the prototype.js module end up in the tinyMCE.instances array.

This appears to only cause a problem when the imce_set_tinymce.js file, which comes with the IMCE module ,tries to access the instances array. I think the addition of a simple check to line 10 of this file to see if fE is defined would solve the 3rd error. Well it'd be a workaround. The real fix is to figure out where the extra data is getting into the tinyMCE.instances array.

I'm not sure which project this issue should be reported against. It's probably one for all 3 project groups to solve. I'm going to keep investigating the issue but am going to move it to the IMCE queue so they're aware of the problem and can hopefully help us find a solution.

Stella

ufku’s picture

the line starting with settimeout... was added to fix a bug in tinymce before version 2.1. if you use the version 2.1 or above you dont need that line. feel free to delete it.

H3rnand3z’s picture

IE works ok after I removed setTimeout line from \sites\all\modules\imce\imce_set_tinymce.js but in firefox I still get

tinyMCE.baseURL has no properties
http://vpc-srv5/sites/all/modules/tinymce/tinymce/jscripts/tiny_mce/tiny...
Line 1

the tinymce toolbar does not display, The only time the error goes away is if I disable Lightbox.

ufku’s picture

then it is a problem between tinymce and lightbox.

stella’s picture

Project: IMCE » TinyMCE

I'm not sure where this error occurs. I can't reproduce it and am also finding it hard to follow the tiny_mce.js code since it's all on one line. Can anyone else help?

Stella

H3rnand3z’s picture

I will try and duplicate this on a clean install.

gemini’s picture

These are the errors Firebug reports in Firefox for me:

tinyMCE.baseURL has no properties
init(Object mode=exact theme=advanced relative_urls=false)
function TinyMCE_Engine(){var ua;this.majorVersion="2";this.minorVersion="1.0";t...
tiny_mce.js (line 1)

tinyMCE.baseURL has no properties
function TinyMCE_Engine(){var ua;this.majorVersion="2";this.minorVersion="1.0";t...
tiny_mce.js (line 1)

fE has no properties
setTimeout('for (var i in tinyMCE.instances) {var fE = tinyMCE.instances[i][...
imce_set_tinymce.... (line 10)

s.invalid_elements has no properties
TinyMCE_Control(Object mode=exact theme=advanced relative_urls=false)
init(textarea#edit-body.form-textarea, "edit-body", undefined)
mceToggle("edit-body", "wysiwyg4body")
function TinyMCE_Engine(){var ua;this.majorVersion="2";this.minorVersion="1.0";t...
tiny_mce.js (line 1)
stella’s picture

gemini: see comments #5 and #6 for a solution to the fE error.

You could disable the Lightbox2 Plus option on the lightbox2 settings page. This will enable Lightbox2 Lite and you shouldn't have any conflicts with tinyMCE.

Stella

gemini’s picture

Thanks Stella. But then grouping is not working anymore and (i have a lot of photos in groups) and nice resizing effect with the option to see in original size doesn't work either.

stella’s picture

Yeah I'm afraid they're all lightbox2 plus features. I'll have a look and see if I can implement them for lightbox2 lite.

gemini’s picture

Stella,

what if you made a workaround in Lightbox that would check if TinyMCE is on, than it would turn off the Lightbox, or just not load the JS (that could be as an option in administrative menu - on/off kinda thing). Mostly TinyMCE is needed when users edit or add content, and Lightbox is not needed at that time. Do you think it's a dumb idea?

gemini’s picture

..actually would be much easier not to load lightbox js on "add" and "edit" pages without checking for tinyMCE (I guess)

stella’s picture

similar issue in #152860

stella’s picture

Try the patch from #166461 (comment #2) which will allow you to specify individual pages on which the lightbox javascript should not be loaded.

Cheers,
Stella

stella’s picture

Status: Active » Fixed

lightbox2 5.x-2.x released which now uses jQuery instead of prototype and scriptaculous libraries. This should fix any conflicts between these two modules.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)
rohangupta’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

I am getting the following error when i am trying to put tinymce on the text area:

Line:1
Char:81
Code:0
Error:'tagName' is null or not an object

As seen in the posts above commenting the line setTimeout in imce_set_tinymce.js does not help because then i start getting the error of "Invalid source HTML for this operation".

Please help.

pomliane’s picture

Status: Active » Closed (won't fix)

This version of TinyMCE is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.