Hello.
I've tried to install EXT on a brand new drupal 6 installation.
The only modules installed are WYSIWYG API and tinyMCE.
When I activate EXT module, all is working fine.
BUT when I change the default state to ENABLED to always load the library, I don't have TinyMCE interface anymore.
And I can see two errors in my Firefox console :
e.indexOf is not a function in sites/all/modules/wysiwyg/tinymce/jscripts/tiny_mce/tiny_mce.js?q
classes[i].substr is not a function in sites/all/modules/wysiwyg/wysiwyg.js?q
I wonder if it is a TinyMCE or a Ext module bug.
Any idea ?
Comments
Comment #1
sunThis has been fixed recently, and is a Drupal core bug in reality, which also has been fixed recently.
Marking as duplicate of #454992: JavaScript query string breaks $_GET['q'].
However, thanks for taking the time to report this issue.
Comment #2
Vaarteen commentedSorry for duplication. I've spent a lot of time searching this info and I didn't see it.
Thanks for answering.
EDIT
FYI, I give it a try => nothing happened. I still have the same problems.
Here are my workarounds, but I think the problem is far more complex.
It seems that some array normally containing only Strings have a "invisible" last item - not a string obviously, as it makes error when calling string methods such as indexOf(), substr() or split().
I had to edit and modify 3 sources codes and add a single test.
* in sites/all/modules/wysiwyg/tinymce/jscripts/tiny_mce/tiny_mce_src.js line 7850
if (typeof u == 'string') { // added test
if (u.indexOf('/') != 0 && u.indexOf('://') == -1)
u = tinymce.baseURL + '/' + u;
t.urls[n] = u.substring(0, u.lastIndexOf('/'));
tinymce.ScriptLoader.add(u, cb, s);
}
* in sites/all/modules/wysiwyg/wysiwyg.js line 178
if (typeof classes[i] == 'string') { // added test
if (classes[i].substr(0, 8) == 'wysiwyg-') {
var parts = classes[i].split('-');
var value = parts.slice(2).join('-');
params[parts[1]] = value;
}
}
* in sites/all/modules/imce/js/imce_set_app.js line 13
if (typeof data[i] == 'string') { // added test
var arr = data[i].split('@');
appFields[arr[0]] = arr[1];
}
I don't know if it is the right place to post, or if I missed something, but these poor fixing is enough at the moment. And as it impacts the WYSIWYG API module, I submit it to you.
FYI, here is my configuration :
Drupal 6.12
TinyMCE 3.2.2
IMCE 6.x-1.2
IMCE Wysiwyg API bridge 6.x-1.0
Wysiwyg 6.x-1.2