Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

SilverStripe 3.0 Beta 2 issue with TinyMCE


Go to End
Reply


14 Posts   3345 Views

Avatar
gakenny

Community Member, 153 Posts

1 May 2012 at 7:01pm

Hello,

I have been having few issues with a fresh installation of SilverStripe 3.0 Beta 2 on a new host. This server is running LiteSpeed instead of Apache as the Web Server.

My issues specifically relate to the Admin area and the TinyMCE editor used to edit the Contents field when adding or creating pages. This field does not display at all. Looking at the browser error log, I see the following message:
---
Timestamp: 01/05/2012 5:05:28 p.m.
Error: tinyMCE is not defined
Source File: http://www.xxxxxx.com/assets/_combinedfiles/lib.js?m=1335848267
Line: 2484
---

I have edited the _config.php file under the mysite directory to include:
Requirements::set_combined_files_enabled(false);

I still have the same symptoms but this time the browser error log shows the following message:
---
Timestamp: 01/05/2012 5:01:34 p.m.
Error: tinyMCE is not defined
Source File: http://www.xxxxxx.com/framework/javascript/HtmlEditorField.js?m=1335847912
Line: 29
---

I have verified the mod_rewrite is installed and working correctly. I have added the following to the .htaccess file to address a potential mod_rewrite issue:
RewriteBase /directory/

With the above change to .htaccess, I can see that SilverStripe v2.4.7 is working fine in this environment.

Can anyone assist with these issues?

Cheers,

Gary

Avatar
gakenny

Community Member, 153 Posts

2 May 2012 at 11:10am

Hello,

Further to this issue, when successfully installing SilverStripe on this server, I am redirected to the following URL:
http://www.xxxxxx.com/index.php/home/successfullyinstalled?flush=1

This can be successfully modified to (note omission of index.php):
http://www.xxxxxx.com/home/successfullyinstalled?flush=1

Does this indicate a mod_rewrite issue?

Cheers,

Gary

Avatar
Plato

Community Member, 26 Posts

2 May 2012 at 11:52am

Edited: 02/05/2012 11:55am

It sounds like your web user does not have enough permissions to read files in sapphire/thirdparty (where tinymce's source files are located).
Check the permissions on your installation to make sure errors like this don't pop up.

Avatar
gakenny

Community Member, 153 Posts

2 May 2012 at 12:01pm

Thanks Plato.

I have verified the permissions. It seems that I am getting a 403 error when accessing this file:
http://www.xxxxxx.com/framework/thirdparty/tinymce/tiny_mce_gzip.php

Permissions were set to 755 but I have since changed to 644 with the same issue.

Cheers,

Gary

Avatar
gakenny

Community Member, 153 Posts

2 May 2012 at 12:27pm

Hello,

Turns out that the issue relates to calling a php file in the framework folder. Refer to .htaccess in framework folder:

[FilesMatch "\.(php_|php3|php4|php5|phtml|inc)$"]
   Deny from all
[/FilesMatch]

Will need to raise this as a bug.

Cheers,

Gary

Avatar
Ingo

Forum Moderator, 801 Posts

3 May 2012 at 1:00am

This rule is overwritten by a more specific directory-level .htaccess file in framework/thirdparty/tinymce/.htaccess
Can you confirm that this file exists with the correct content? (<FilesMatch "\.(php)$">Allow from all</FilesMatch>).
Please respond and continue relevant discussion on the ticket: http://open.silverstripe.org/ticket/7142

Thanks!

Avatar
Sam

Administrator, 685 Posts

3 May 2012 at 9:41am

If the file doesn't exist, you should recreate it and see if that fixes the issue.

If this file *does* exist, then we have a trickier issue, and we'll need you to report back on your Apache version, and AllowOverride settings in your main Apache config.

You might want to try editing framework/.htaccess in the following way:

@@ -1,7 +1,7 @@
<FilesMatch "\.(php|php3|php4|php5|phtml|inc)$">
Deny from all
</FilesMatch>
-<FilesMatch "(main|static-main|rpc)\.php$">
+<FilesMatch "(main|static-main|rpc|tiny_mce_gzip)\.php$">
Allow from all
</FilesMatch>
<FilesMatch "silverstripe_version$">

In other words, the whole file will look like this:

<FilesMatch "\.(php|php3|php4|php5|phtml|inc)$">
Deny from all
</FilesMatch>
<FilesMatch "(main|static-main|rpc|tiny_mce_gzip)\.php$">
Allow from all
</FilesMatch>
<FilesMatch "silverstripe_version$">
Deny from all
</FilesMatch>

Please let us know if that fixes the issue - Ingo, if that's the case, then we might have a situation where framework/.htaccess rules clobber framework/thirdparty/tinymce/.htaccess rules, and that might be a reason for a core patch.

Avatar
gakenny

Community Member, 153 Posts

3 May 2012 at 1:03pm

Hello Ingo,

I can confirm that the .htaccess file exists in the framework/thirdparty/tinymce folder as indicated.

I will try modifying the framework/.htaccess file as indicated by Sam.

Cheers,

Gary

Go to Top