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.

Form Questions /

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

TinyMCE is not loading for htmleditor class textarea fields in the CMS. Version is 3.1.6.


Go to End


2 Posts   2723 Views

Avatar
mycrazydream

Community Member, 8 Posts

9 October 2014 at 9:41am

I've tracked down all the files and everything looks kosher. All the JS is loading correctly. No errors are thrown.
Here is an example of the HTML in the CMS (no tinymce)

<textarea style="width: 97%; height: 480px" tinymce="true" cols="20" rows="30" id="Form_EditForm_Highlights" class="htmleditor" name="Highlights">&lt;p&gt;Large canopies frame out the entry ways and draw in the eye of any visitors.&nbsp; The interior has a limited amount of columns and the 40 foot bays allow for plenty of room for a future tenant.&nbsp; Oversized windows and solar tubes in the roof provide plenty of natural light to the office space.&lt;/p&gt;</textarea>

TinyMCE is being loaded via the PHP gzip compressor:https://www.brooksransom.com/framework/thirdparty/tinymce/tiny_mce_gzip.php?m=1412798075&js=1&plugins=table,emotions,paste,media,fullscreen,inlinepopups,advimagescale&themes=advanced&languages=en&diskcache=true&src=false

var tinyMCEPreInit={base:'/framework/thirdparty/tinymce',suffix:''};(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.8",releaseDate:"2012-11-20",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;......

In HtmlEditorConfig.php everything looks good. The buttons are pointing to the jquery ui smoothness theme.

With no errors... I have nothing to go on. Has anyone seen this before?

If someone like Will even wants to look at the page I don't have a big problem with that. There is not sensitive data there that isn't already on the front end.

You can see the well, nothing in the attached image. It's only the HtmlEditorConfig forms fields. Not, I've noticed descrepancies between naming HTMLEditorConfig or HtmlEditorConfig, but since the file and class itself was named HtmlEditorConfig I went with that. I tried both ways anyway. Makes no difference and the system doesn't throw a problem on build anyway. What is going on??

Oh, and the database field holding the values are HTMLText.

Also, I'm trying to get some logging going on to get some kind of information, but this is doing nothing:

Director::set_environment_type("live");
SS_Log::add_writer(new SS_LogFileWriter('/home/mycrazydream/brooksransom.com/ss.log'), SS_Log::ERR);
$SS_log_writer = new SS_LogEmailWriter('socialmedia@brooksransom.com');
SS_Log::add_writer($SS_log_writer, SS_Log::ERR);

I created an empty ss.log file and 777 it just to be sure and it is empty so far. No email in my inbox either.

What the hell is going on. I upgraded a long time ago and this has just now been brought to my attention by the content editors. Any ideas?

Avatar
mycrazydream

Community Member, 8 Posts

9 October 2014 at 12:16pm

It was modernizr. I couldn't believe it but for whatever reason because I was loading modernizr it was destroying tinymce.

If you have modernizr loaded and tinymce is giving you trouble, try getting rid of it.

Unbelievable.