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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

TinyMCE working on test system, but not live


Go to End


4 Posts   4428 Views

Avatar
chrschn

Community Member, 7 Posts

9 October 2009 at 8:40am

Edited: 09/10/2009 8:40am

Hi all,

I'm currently running a site with SilverStripe v2.3.0-rc2 without problems. Recently, I've installted v2.3.3 on a testing machine with the DB content of the productive site and further customized the new site. After everything was done, I wanted to move replace the older verison with the new version on the productive server. Here is what I did:

1. TARed the new source tree
2. Dumped the new DB
3. Created a new DB on the productive system and restored the DB dump
4. Untared the source tree to the web server
5. Changed user of all files to root except assets, silverstripe-cache, .htaccess, mysite/_config.php
6. Changed DB password in mysite/_config.php to the local one
7. Changed DocumentRoot in Apache config
8. Reloaded Apache
9. Opened /dev/build?flush=1 in browser

Everything seems to work fine though, except TinyMCE. I only see the plain textarea with HTML-code instead of the editor. However, TinyMCE is working with the older version (v2.3.0-rc2) on the productive system and with the newer version (v2.3.3) on the testing box.

When I compare the generated HTML of the admin panel from the testing and the productive machine, I can see that the HTML of the testing server includes much more JavaScript files then the productive machine (even though /jsparty/tiny_mce2/tiny_mce_src.js is included). To be absolutely sure, I diffed the productive and testing source tree, no difference. And as I dumped the DB and imported it again, there should also be no difference.

Any suggestions?

Christian

Avatar
baba-papa

Community Member, 279 Posts

9 October 2009 at 10:08am

Have you deleted the content of silverstripe-cache?

Avatar
chrschn

Community Member, 7 Posts

9 October 2009 at 10:16am

Yes, I deleted the cache, including the hidden .cache* files.

To make sure I didn't do any error during the procedure, I repeated the procedure on another test machine. There everything went fine, TinyMCE works. So I once again repeated the procedure on the production machine, with the same result as before: TinyMCE is NOT working.

I really don't understand what's happening there. What sort of mis-configuration could potentially lead to site where everything works fine, except some special JavaScript extensions. Oh yes, and only a JavaScript extension of a newer version, the older is running fine.

Christian

Avatar
chrschn

Community Member, 7 Posts

9 October 2009 at 10:56am

I was able to track the problem down to the developer mode of silverstripe. TinyMCE only doesn't work if the IP address of the requesting host is not in the list of dev-hosts. I was able to reproduce the problem locally by commenting out "localhost" in the _config.php file:

Director::set_dev_servers(array(
    //'localhost',
    //'127.0.0.1'
));

With that, TinyMCE showed up and disappeared again, when I appended ?isDev=1 or ?isDev=0 to the admin-URL. This also works for the productive server: isDev=1 and TinyMCE works, isDev=0 and TinyMCE load. Is this intentional behavior???