We were having trouble having the TinyMCE Editor to display, as we kept getting the error "editorTemplate is undefined". We were able to track it down to the fact that the editorBasePath was being incorrectly set.

Line 136 of wysiwyg_editor.module:

      'editorBasePath' => $GLOBALS['base_url'] . base_path() . $path_editor,

It seems as though this is repeating itself, as the base_url typically includes the base_path. Is this true? I know that we were able to solve the problem by commenting out the "base_path" part of the line, but I don't know if this is the case in all installs. We are NOT setting a custom base_url in settings.php, and we can't find anywhere that it is set in the codebase or DB.

If this should be changed, I can make up a patchfile for it.

Thanks!

CommentFileSizeAuthor
#5 IMCE.png17.95 KBdrupix
#2 wysiwyg.basepath.patch848 bytessun
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Yes, this looks plain wrong, but I wonder why it worked this way in the past.

sun’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Active » Needs review
FileSize
848 bytes

Please test attached patch.

drupix’s picture

I had this error : editorTemplate has no properties
After applying this patch it worked for me!

drupal 5.9
Wysiwyg API 5.x-0.2

Note that if you are using i18n, in the Visibility group (Site configuration >> Wysiwyg Editor) I had to put :
*/node/*
*/user/*
*/comment/*

instead of

node/*
user/*
comment/*

to show the editor.

Thanks.

sun’s picture

Status: Needs review » Fixed

Thanks, committed to 6.x and 5.x.

And yes, internationalization is the source of many bugs yet to be identified and dealt with.

drupix’s picture

FileSize
17.95 KB

Ooops, it works but... As you can see in the attached print screen I can not see the browse server button !!
(Not sure I'm in the right place for that)

sun’s picture

AFAIK, there is no IMCE support yet. See #287025: IMCE_Wysiwyg API bridge module and follow-up over there, please.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.