mihaigrigori
Member
Posted 16 years ago #
Any idea what might be causing this javascript error when I click 'Send to editor' button?
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: https://sub.domain.com/wp-admin/post-new.php :: edInsertContent :: line 221" data: no]
createAJAX()tw-sack.js (line 43)
sack(undefined)tw-sack.js (line 192)
autosave()autosave.js (line 101)
onTimerEvent()prototype.js (line 141)
bind()
I use https for the admin panels and the upload iframe is also https.
mihaigrigori
Member
Posted 16 years ago #
Still having this issue.
I've noticed that it's happening in FF 2.0.4 and IE6 and works in Opera 9.
Also - looking in wp-admin/general-template.php where the js function
function edInsertContent(myField, myValue)
is defined I've noticed that FF and IE have a problem on reading the
selectionStart
attribute of
myField
.
myField
is the textarea object where the code should be sent.
I'd really appreciate some help on this. Thanks!
what version of mu are you running?
Gotta admit that I'm not seeing this but I'm not using https. There's a fair number of problems with it. You'll note that even wp.com stopped doing this some time ago.
I drop your error into google and get a number of posts releated to a bug in TinyMCE from mid2006.
mihaigrigori
Member
Posted 16 years ago #
Thanks for looking into it.
However I was able to find a fix for this by hacking upload.js.
replaced
win.edInsertContent(win.edCanvas, h);
with
parent.edInsertContent(parent.document.getElementById('content'),h);
You may want to open up a ticket on trac and make Donncha aware of teh issue:
http://trac.mu.wordpress.org
Can you try this with regular WP too? Chances are that's where the bug is and it would be better to open the bug in the WP Trac at http://trac.wordpress.org/ - thanks!