TinyMCE Not Working

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

TinyMCE Not Working

Postby herbtea » 7:50pm, Thu 21 Oct, 2010

Hi, I've had phplist installed and running a few months now and the only problem I've had was with the FCKeditor which I had to disable in the config file.
I wanted to have a text editor available in phplist and saw that I could supposedly install TinyMCE so I followed the instructions from a post in the forum but I'm not having any luck getting TinyMCE to work.
My config file is:
Code: Select all
# the FCKeditor is now included in PHPlist, but the use of it is experimental
# if it's not working for you, set this to 0
# NOTE: If you enable TinyMCE please disable FCKeditor and vice-versa.
define("USEFCK",0);

# If you want to upload images to the FCKeditor, you need to specify the location
# of the directory where the images go. This needs to be writable by the webserver,
# and it needs to be in your public document (website) area
# the directory is relative to the root of PHPlist as set above
# This is a potential security risk, so read README.security for more information
# define("FCKIMAGES_DIR","uploadimages");

# TinyMCE Support (http://tinymce.moxiecode.com/)
# It is suggested to copy the tinymce/jscripts/tiny_mce directory from the
# standard TinyMCE distribution into the public_html/lists/admin/plugins
# directory in order to keep the install clean.
# NOTE: If you enable TinyMCE please disable FCKeditor and vice-versa.
# Set this to 1 to turn on TinyMCE for writing messages:
define("USETINYMCEMESG", 1);
# Set this to 1 to turn on TinyMCE for editing templates:
define("USETINYMCETEMPL", 1);
# Set this to path of the TinyMCE script, relative to the admin directory:
define("TINYMCEPATH", "plugins/tiny_mce/tiny_mce.js");
# Set this to the language you wish to use for TinyMCE:
define("TINYMCELANG", "en");
# Set this to the theme you wish to use.  Default options are: simple, default and advanced.
define("TINYMCETHEME", "advanced");
# Set this to any additional options you wish.  Please be careful with this as you can
# inadvertantly break TinyMCE.  Refer to the TinyMCE documentation for full details.
# Should be in the format: ',option1:"value",option2:"value"'   <--- note comma at beginning
define("TINYMCEOPTS", ',plugins : "images", theme_advanced_buttons1 : "bold,italic,underline,formatselect,link,justifyleft,justifycenter,justifyright,pasteword,pastetext,table,images,tcut"');


From all the searching I've done in the forum this looks like TinyMCE should work but it isn't loading and all I get is the generic text editor when I go to compose a message.
I have the directory tiny_mce installed in the plugins under the phplist admin directory just as shown in the path for TINYMCEPPATH and the tiny_mce directory is from the latest main distribution package.
The page source shows the correct reference to the tiny_mce.js file but the code never actually gets called to run.
Code: Select all
 <tr><td colspan=2><script language='javascript' type='text/javascript' src='plugins/tiny_mce/tiny_mce.js'></script>
<script language='javascript' type='text/javascript'>
   tinyMCE.init({
      mode : 'exact',
    elements : 'message',
    language : 'en',
    theme : 'advanced'
    ,plugins : "images", theme_advanced_buttons1 : "bold,italic,underline,formatselect,link,justifyleft,justifycenter,justifyright,pasteword,pastetext,table,images,tcut"
   });
</script>

The permissions on the directories and files are correct (755 on dirs and I set the .js files as 755 as a test and they are now set again to 744).
I temporarily disabled the .htaccess files in the path to the tiny_mce.js file and that made no difference.
Any help would be greatly appreciated.
Herb
herbtea
phpLister
 
Posts: 10
Joined: 9:42pm, Mon 30 Aug, 2010

Re: TinyMCE Not Working

Postby H2B2 » 10:36pm, Thu 21 Oct, 2010

Never installed TinyMCE, so I'm not sure whether or not the plugin_rootdir is relevant. Assuming for now it were relevant, what is the path you specified in config.php for your plugin_rootdir?

Have you tried commenting this line:
    #define("PLUGIN_ROOTDIR","/home/me/phplistplugins");
and uncommenting this line:
    define("PLUGIN_ROOTDIR","plugins");
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: TinyMCE Not Working

Postby herbtea » 11:07pm, Thu 21 Oct, 2010

Hi and thanks for a quick reply.
Yes, I had commented out
define("PLUGIN_ROOTDIR","/home/me/phplistplugins");

and uncommented
define("PLUGIN_ROOTDIR","plugins");

since I'm using a stats plugin.
herbtea
phpLister
 
Posts: 10
Joined: 9:42pm, Mon 30 Aug, 2010

Re: TinyMCE Not Working

Postby herbtea » 11:13pm, Thu 21 Oct, 2010

I thought I'd try using an absolute path from my home dir, home/usr/public_html/lists/admin/plugins/ but still no go :(
herbtea
phpLister
 
Posts: 10
Joined: 9:42pm, Mon 30 Aug, 2010

Re: TinyMCE Not Working

Postby H2B2 » 11:18pm, Thu 21 Oct, 2010

What was the reason FCKeditor didn't work on your system?
Could you check whether or not the iconv module is included in your PHP installation? See your system details in /lists/admin/?page=community
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: TinyMCE Not Working

Postby herbtea » 11:28pm, Thu 21 Oct, 2010

FCKeditor was popping up error messages, I forget now what it was, as my client is the one whose been composing messages and as the config comments indicate its use was experimental I disabled it.
The iconv module is installed on the server.
herbtea
phpLister
 
Posts: 10
Joined: 9:42pm, Mon 30 Aug, 2010

Re: TinyMCE Not Working

Postby H2B2 » 12:30am, Fri 22 Oct, 2010

herbtea wrote:
Code: Select all
 # Set this to any additional options you wish.  Please be careful with this as you can
# inadvertantly break TinyMCE.  Refer to the TinyMCE documentation for full details.
# Should be in the format: ',option1:"value",option2:"value"'   <--- note comma at beginning
define("TINYMCEOPTS", ',plugins : "images", theme_advanced_buttons1 : "bold,italic,underline,formatselect,link,justifyleft,justifycenter,justifyright,pasteword,pastetext,table,images,tcut"');

Since this setting may "inadvertently break TinyMCE", you might try its default (empty) value first:
Code: Select all
define("TINYMCEOPTS", "");

If that brings tinyMCE to life, best check the TinyMCE documentation before adding options.

Note: you are using single quotes to delimit the options array, while double quotes are probably needed. Not sure it that would explain this issue, but you could look into that to make sure.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: TinyMCE Not Working

Postby herbtea » 1:35am, Fri 22 Oct, 2010

Yeah, I had already tried that as I've been tinkering with this and still a no go. Any other ideas would be greatly appreciated :)
herbtea
phpLister
 
Posts: 10
Joined: 9:42pm, Mon 30 Aug, 2010

Re: TinyMCE Not Working

Postby H2B2 » 1:39am, Fri 22 Oct, 2010

OK, I decided to download and install TinyMCE (currently v3.3.9.2) in order to check whether the TinyMCE installation instructions need updating.

These are my findings:
- Installation instructions are up-to-date and TinyMCE does work on my system.
- I could reproduce the issue you described (or at least its symptoms) by adding invalid options to the TINYMCEOPTS setting.
- The TINYMCEOPTS setting, will work when invalid options (in this case: devkit) are removed from the array.

These are the settings that work on my system (phpList v2.10.12):
Code: Select all
# TinyMCE Support (http://tinymce.moxiecode.com/)
# It is suggested to copy the tinymce/jscripts/tiny_mce directory from the
# standard TinyMCE distribution into the public_html/lists/admin/plugins
# directory in order to keep the install clean.
# NOTE: If you enable TinyMCE please disable FCKeditor and vice-versa.
# Set this to 1 to turn on TinyMCE for writing messages:
define("USETINYMCEMESG", 1);
# Set this to 1 to turn on TinyMCE for editing templates:
define("USETINYMCETEMPL", 1);
# Set this to path of the TinyMCE script, relative to the admin directory:
define("TINYMCEPATH", "plugins/tiny_mce/tiny_mce.js");
# Set this to the language you wish to use for TinyMCE:
define("TINYMCELANG", "en");
# Set this to the theme you wish to use.  Default options are: simple, default and advanced.
define("TINYMCETHEME", "advanced");
# Set this to any additional options you wish.  Please be careful with this as you can
# inadvertantly break TinyMCE.  Rever to the TinyMCE documentation for full details.
# Should be in the format: ',option1:"value",option2:"value"'   <--- note comma at beginning
#define("TINYMCEOPTS", "");
define("TINYMCEOPTS", ",plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
theme_advanced_buttons1_add_before : 'save,separator',
theme_advanced_buttons1_add : 'fontselect,fontsizeselect',
theme_advanced_buttons2_add : 'separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor',
theme_advanced_buttons2_add_before: 'cut,copy,paste,separator,search,replace,separator',
theme_advanced_buttons3_add_before : 'tablecontrols,separator',
theme_advanced_buttons3_add : 'emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen', theme_advanced_toolbar_location : 'top',
theme_advanced_toolbar_align : 'left',
theme_advanced_path_location : 'bottom',
plugin_insertdate_dateFormat : '%m-%d-%Y',
plugin_insertdate_timeFormat : '%H:%M:%S',
relative_urls : 'false' ,
remove_script_host : 'false' ,
extended_valid_elements : 'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]'
");
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: TinyMCE Not Working

Postby herbtea » 1:41am, Fri 22 Oct, 2010

I'll look over my config file again and I'm going to copy/paste your settings and see if it'll work.
herbtea
phpLister
 
Posts: 10
Joined: 9:42pm, Mon 30 Aug, 2010

Re: TinyMCE Not Working

Postby H2B2 » 1:57am, Fri 22 Oct, 2010

In order to rule out possible web browser configuration issues, could you try loading the 'send a message' page with another browser, or review your browser's javascript security settings?
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: TinyMCE Not Working

Postby herbtea » 2:06am, Fri 22 Oct, 2010

Still not working, I pasted your config text in place of mine, checked the path to the tiny_mce.js was correct and no luck.
I checked the page in ie8 and Chrome too with same doo-doo :(
herbtea
phpLister
 
Posts: 10
Joined: 9:42pm, Mon 30 Aug, 2010

Re: TinyMCE Not Working

Postby H2B2 » 2:30am, Fri 22 Oct, 2010

Hmm, tough one. I think for now we can assume the settings to be correct, and focus on a possible system incompatibility.

Some suggestions:
- check this tinyMCE FAQ: TinyMCE is broken, what should I do?
- Enable debug mode
- check the error console of your browser
- Or, search the tinyMCE forum, and see if you can find any leads.

EDIT: Split your post on FCKeditor and created this topic: viewtopic.php?f=24&t=34001
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Re: TinyMCE Not Working

Postby herbtea » 3:55pm, Fri 22 Oct, 2010

Thanks for your help with this and I'll follow up on you suggestions later today.
Also, I think I found the issue with the FCKeditor. I remembered that Joomla has a security vulnerability that I have a directive in the .htaccess to prevent access to *.xml files. I have an exception for sitemap.xml and I've entered another for fcksytles.xml and that seems to have solved the problem. I'll post this on the FCK thread you started for me.
herbtea
phpLister
 
Posts: 10
Joined: 9:42pm, Mon 30 Aug, 2010

Re: TinyMCE Not Working

Postby H2B2 » 12:47pm, Sat 23 Oct, 2010

herbtea wrote:Thanks for your help with this and I'll follow up on you suggestions.

All right. Let us know If you have any new insights on why TinyMCE isn't working on your system. Might be useful for others.
H2B2
Moderator
 
Posts: 7188
Joined: 1:51am, Wed 15 Mar, 2006

Next

Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 14 guests

cron