I'm getting a really strange error in IE 6 which is coming up as an error on the page and breaking Javascript on pages which then has all sorts of impacts including causing TinyMCE not to show quoted text, menus to stop working etc.

The error is

Line: 2
Char: 17434
Error: Not enough storage is available to complete this operation
Code: 0
URL: http://example.com/node/add/story

I can't work out where the 17434 line long line 2 is coming from. Does anyone know how I can pin down which file it could be? I'm assuming JS but could it be CSS?

I found

For IE to show Stylesheets that are longer than 2071 character replace
the line:

document.createStyleSheet("javascript:'" + escape(s) + "'");

with

document.body.innerHTML += "<STYLE>"+s+"</STYLE>";

I found the fix over at GTDTiddlyWiki Forums. 

but can't see the relevance!

I'd be really grateful for a pointer.

Comments

judib99’s picture

I have the same error - I will try the fix listed above if someone can tell me which file needs to be edited...Is it something in the TinyMCE module folder? Or is it in TinyMCE itself??

Thanks!
Judi

vacilando’s picture

Same problem in IE7!

ram_kumar’s picture

One solution for this is to edit TinyMCE javascript external file.

For Filename: \jscripts\tiny_mce\tiny_mce.js

Find and replace: doc.createStyleSheet(css_file) to try{doc.createStyleSheet(css_file)}catch(e){}

For Filename: \jscripts\tiny_mce\tiny_mce_src.js

Line 507:

replace: doc.createStyleSheet(css_file);

to:

try {
doc.createStyleSheet(css_file)
} catch(e) {}

I got this solution from http://tinymce.moxiecode.com/punbb/viewtopic.php?pid=27656..

Hope it works....

sperna’s picture

It worked for me. It wasn't exactly the same code that I replaced above but any createstyle sheet occurrences I wrapped with try/catch. Not sure what other ill effects will occur by not creating the sheet though.