After upgrading to the latest TinyMCE, Image Assist, and Image modules, the images have stopped being inserted into the TinyMCE interface. I did a few tests on the live site this error was first identified on and then did a test on a fresh install of Drupal 5. and was able to replicate the error.

[Break on this error] undefined
uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://www.example.com/sites/all/modules/img_assist/img_assist_textarea.js :: insertToEditor :: line 89" data: no]

Comments

shane birley’s picture

Anyone have a look at this?

zoo33’s picture

I've done some testing with TinyMCE recently and it worked for me. What versions did you use, -dev versions or official releases? With Image assist, you should use the -dev version currently. (I'll check later exactly what versions I used, don't have access to that server now.)

shane birley’s picture

I will check into what versions I have today of Tiny and the image assist modules.

zoo33’s picture

I'm using TinyMCE 5.x-1.9, Image assist 5.x-dev and Image 5.x-dev, all up-to-date versions. I've installed TinyMCE in the modules directory against recommendations as it's been found that this combination of modules won't work otherwise (see #123203).

shane birley’s picture

I am currently running Image 5.x-1.5 and Image Assist 5.x.1.x-dev (August 21st, 2007). I will update to Image dev and to the latest dev of Image Assist. TinyMCE is 1.9 - what version of the Moxie code are you using?

shane birley’s picture

I have updated to the recommended versions and I am no longer getting two error messages, only one.

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://www.example.com/sites/all/modules/img_assist/img_assist_textarea.js :: insertToEditor :: line 89" data: no]

The error message seems to indicate that it is unable to send the information from the popup back to the TinyMCE editor and into the post. Gak, Javascript...

shane birley’s picture

I have looked further into this and it looks like the version 2.x.x.x of TinyMCE is has changed and the javascript is not working 100% in the "image-assist-textarea.js" file. It is not passing the pointer to the TinyMCE editor because it getting stopped by Tiny. At least, this what I believe is happening.

zoo33’s picture

Version: 5.x-1.4 » 5.x-1.x-dev

Hmm... The thing is, i don't think img_assist-textarea.js is even supposed to be loaded when you're using TinyMCE. img_assist_tinymce.js should be loaded instead. Are you using the camera button in the TinyMCE toolbar to access Image assist?

I'm using TinyMCE 2.1.2 (the actual JS editor that is, not the Drupal module).

shane birley’s picture

I dumped my entire installation of TinyMCE, Image, and Image Assist. I have followed the install instructions and there is no camera button at all now. This is the drupalimage plugin you are referring to, correct?

zoo33’s picture

Yes. The camera button should appear if you have drupalimage installed in tinymce/tinymce/jscripts/tiny_mce/plugins/ and then add the drupalimage button in the TinyMCE settinhgs.

The installation procedure is pretty complicated, it's easy to miss something.

shane birley’s picture

Status: Active » Fixed

Fixed!

Anonymous’s picture

Status: Fixed » Closed (fixed)