Editor Base Path is being set incorrectly

chayner - July 23, 2008 - 22:10
Project:Wysiwyg
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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!

#1

sun - July 24, 2008 - 03:04

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

#2

sun - July 29, 2008 - 15:23
Version:5.x-1.x-dev» 6.x-1.x-dev
Status:active» needs review

Please test attached patch.

AttachmentSize
wysiwyg.basepath.patch 848 bytes

#3

drupix - August 6, 2008 - 13:25

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.

#4

sun - August 6, 2008 - 16:38
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.

#5

drupix - August 7, 2008 - 08:23

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)

AttachmentSize
IMCE.png 17.95 KB

#6

sun - August 7, 2008 - 16:46

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

#7

Anonymous (not verified) - August 21, 2008 - 16:53
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.