Missing TinyMCE editor after CMSMS 1.1 install in sub-directory [SOLVED]

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
michelG
Forum Members
Forum Members
Posts: 43
Joined: Tue Jul 17, 2007 1:25 pm

Missing TinyMCE editor after CMSMS 1.1 install in sub-directory [SOLVED]

Post by michelG »

After first-time install of CMSMS 1.1 in a sub-directory, the TinyMCE editor will not display.

I get the following javascript error in my browser's error console:

Error: missing ; before statement
Source File: http://www.mydomain.com/cmsms/modules/T ... config.php
Line: 2, Column: 9
Source Code:
Fatal error:  main(): Failed opening required '\include.php' (include_path='.;c:\php\pear') in D:\inetpub\mydomain\cmsms\modules\TinyMCE\tinyconfig.php on line 5



Server: Windows 2003, MySQL5, PHP5
Last edited by michelG on Tue Jul 24, 2007 6:30 pm, edited 1 time in total.
michelG
Forum Members
Forum Members
Posts: 43
Joined: Tue Jul 17, 2007 1:25 pm

Re: Missing TinyMCE editor after CMSMS 1.1 install in sub-directory

Post by michelG »

Hello everybody.

I didn't receive any reply on this issue.

It seems to be a broken link generated by the tinyconfig.php file:  it cannot find the include.php file where -- if I understand correctly -- the tinyMCE javascript is called. FYI, all my other modules (including CMKeditor) and system in general work correctly.

Elijah made available a new version of tinyMCE in the posting below, but it didn't fix the problem.
http://forum.cmsmadesimple.org/index.ph ... 680.0.html

Is this a bug in the tinyconfig file? Is this something I can fix myself if someone can telll me what to fix?
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Missing TinyMCE editor after CMSMS 1.1 install in sub-directory

Post by Elijah Lofgren »

Hi michelG,

Sorry you didn't get a reply, as I'm sure you understand we're all quite busy. ;)

I would try making the following change to modules/TinyMCE/tinyconfig.php and see if it works:

Code: Select all

Index: cmsmadesimple/modules/TinyMCE/tinyconfig.php
===================================================================
--- cmsmadesimple/modules/TinyMCE/tinyconfig.php        (revision 129)
+++ cmsmadesimple/modules/TinyMCE/tinyconfig.php        (working copy)
@@ -1,7 +1,10 @@
 <?php

 header("Content-type:text/javascript; charset=utf-8");
-$path = dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME'])));
+$path = dirname(dirname(dirname(__FILE__)));
+// Uncomment the 2 lines below to aid in debugging:
+// print_r($_SERVER);
+// echo $path;
 require $path . DIRECTORY_SEPARATOR . 'include.php';
 // Adapted from http://www.php.net/manual/en/function.session-id.php#54084
 // session_id() returns an empty string if there is no current session, sotest if a session already exists before calling session_start() to prevent error notices:

It could be that "$_SERVER['SCRIPT_FILENAME']" is not set correctly on your server.

Hope this helps,

Elijah

Edit: You could also try hard coding it like this:

Code: Select all

require 'D:\inetpub\mydomain\cmsms\include.php';
:)

Edit 2: Please tell me if using dirname(__FILE__) works and I'll commit the change to TinyMCE, since dirname(__FILE__) seems to be used most places like this in CMSMS. ;)
Last edited by Anonymous on Tue Jul 24, 2007 4:37 pm, edited 1 time in total.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
michelG
Forum Members
Forum Members
Posts: 43
Joined: Tue Jul 17, 2007 1:25 pm

Re: [Solved] Missing TinyMCE editor after CMSMS 1.1 install in sub-directory

Post by michelG »

Elijah Lofgren wrote: Please tell me if using dirname(__FILE__) works and I'll commit the change to TinyMCE, since dirname(__FILE__) seems to be used most places like this in CMSMS. ;)
Thanks Elijah. That did the trick. Thank you for spending your time to debug this.

Michel
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Missing TinyMCE editor after CMSMS 1.1 install in sub-directory [SOLVED]

Post by Elijah Lofgren »

Thanks, fix applied: http://viewsvn.cmsmadesimple.org/viewsv ... e&view=rev should hopefully be in CMSM 1.1.1 :)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
theredspecial
Forum Members
Forum Members
Posts: 31
Joined: Tue Jun 05, 2007 5:36 pm

Re: Missing TinyMCE editor after CMSMS 1.1 install in sub-directory

Post by theredspecial »

hmmm... doesn't appear to solve the problem in all cases  :(
i uncommented those 2 lines, but don't get any error messages
Locked

Return to “[locked] Installation, Setup and Upgrade”