1. Installed Image Assist 6.x-2.0-alpha2 to sites/mysite/modules (Drupal 6.5)
2. Installed FCKEditor module 6.x-1.3-rc7 to sites/mysite/modules with FCKeditor 2.6.3
3. Configured FCKEditor according to sites/mysite/modules/fckeditor/README.txt
4. Copied img_assist_fckeditor.js from sites/mysite/modules/fckeditor/ to sites/mysite/modules/img_assist/
FCKEditor toolbar containing Image Assist button appears on body textareas, however on pressing Image Assist button, a blank window pops up with two Javascript errors for img_assist_fckeditor.js:
getArgs is not defined
initLoader()
onload(load )
[Break on this error] var args = getArgs(); // get the querystring arguments
URL: http://mysite/index.php?q=img_assist/load/fckeditor&textarea=body
and:
insertToEditor is not defined
InitFCKeditorImgAssist()
img_assist_fckeditor.js?y()()
[Break on this error] var oldInsertToEditor = insertToEditor;
URL: http://mysite/index.php?q=img_assist/load/fckeditor&textarea=body
Error occurs on Firefox 3.0.5 & Internet Explorer 6.0. I have read the same issue in: "FCKeditor and Image Assist not working together" http://drupal.org/node/321844, and; "FCKeditor & Image Assist" http://drupal.org/node/249684, both for earlier versions of the module. I am assuming the version I am using rc7 has the fixes from these issues included? If not what should I do to fix this problem? (Note: moving img_assist_fckeditor.js to /misc/ folder, as suggested in #249684, did not work).
My site is not live, if you require additional information please let me know. Thanks in advance!
Comments
Comment #1
altavis CreditAttribution: altavis commentedHello!
I have exactly the same problem, except I'm using FCKEditor module 6.x-2.0-alpha5. When fckeditor is disabled image assist works fine.
And found solution. Problem is in loading img_assist_textarea.js into img_assist_fckeditor.js so the simplest solution is just copy img_assist_textarea.js content into img_assist_fckeditor.js and delete first couple of lines defined in "// Load the img_assist_textarea.js script" section.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks, that appears to solve the problem.
Comment #3
AltoRetrato CreditAttribution: AltoRetrato commentedI found out that the problem is in the URL to the img_assist_textarea.js file. The code below (from img_assist_fckeditor.js) was generating the address "/misc/img_assist_textarea.js":
script.src = head.getElementsByTagName('script')[1].src.match( /.*\// ) + 'img_assist_textarea.js';
Below that line I added the following code:
script.src = '/sites/all/modules/img_assist/' + 'img_assist_textarea.js';
... and the image_assist module finally worked.
Comment #4
wwalc CreditAttribution: wwalc commentedFixed in CVS. Download the latest dev release (should be available after midnight) and let me know if it works for you as expected.
Comment #6
jzurheide CreditAttribution: jzurheide commentedHi!
I just got this same problem again.
- Image Assist 6.x-3.x-dev (2009/03/29)
- FCKeditor - WYSIWYG HTML editor 6.x-2.0-beta1
- FCKEditor 2.6.4
The two error messages:
insertToEditor is not defined
http://mysite.com/sites/default/files/js/615504d29383c4858201d2931167f73...
Line 1898
getArgs is not defined
http://mysite.com/sites/default/files/js/615504d29383c4858201d2931167f73...
Line 1963
The code i got from Firebug:
The strange thing about it is the fact that i have a local install with the same components and no problems. Perhaps it has to do with any other module?
Comment #7
jzurheide CreditAttribution: jzurheide commentedAfter i disabled the JavaScript optimization in the performance settings it works again!
Emptying the cache does not help, though...
Comment #8
EvanDonovan CreditAttribution: EvanDonovan commentedI have no idea why this is happening. Until it's fixed, though, the problem can be resolved by the copy-and-paste technique described in comment #1.
Comment #9
Jorrit CreditAttribution: Jorrit commentedPlease see #520706: Security update 6.x-2.0-alpha4 breaks FCKEditor 6.x-2.0-beta1 for more information.