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.

General Questions

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

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

HTMLEditor fields invisible/disappeared after moving Silverstripe [SOLVED]


8 Posts   752 Views


17 August 2012 at 7:54pm (Last edited: 17 August 2012 11:48pm), Community Member, 8 Posts

Hi All,

I posted this query yesterday in but realised it's probably the wrong area for this... I really hope someone can help soon as I am under some time constraints...

Basically, after moving everything from my local PC to my dev server, my HTMLeditor boxes have disappeared from within the pages in the admin section of silverstripe. They seem to be hidden by CSS?

I am using SS 3.0.0. This looks like some kind of JS conflict or something..

Can anyone help? I'd prefer not to have to do a clean install or any upgrades at the moment. Is there a simple fix for this?



17 August 2012 at 9:48pm Community Member, 8 Posts

Just tried upgrading to 3.0.1rc3
Didn't work either... :(

Anyone have any ideas at all please?


17 August 2012 at 11:05pm Community Member, 107 Posts

Hi , you will need to use new HtmlEditorField() .. give it a try & let us know how it goes for you :)


17 August 2012 at 11:45pm Community Member, 8 Posts

Thanks for replying!

I'm not a php/mysql noob but I'm not too familiar with the SS structure just yet. I haven't really done much coding on it at all in fact, most of the work has been templating as the core system is pretty much how we need it.

Could you point me in the right area as to where and how I should be using the aforementioned HtmlEditorField() ? :)

Many thanks again.


17 August 2012 at 11:52pm Community Member, 107 Posts

you can use HtmlEditorField() to replace SimpleHTMLField "I think" .. basically you can use HtmlEditorField() with any HTMLText field type, for example:
if you have static $db = array( 'Discription' => 'HTMLText' ); you can use new HtmlEditorField('Discription); in the getCMSField function .. If you have custom page types or still using old modules , you will need to re-check the code and/or download the latest module version .

What is the name & type of the page that has this error ? & if you can post the .php code used for this page type ( )


18 August 2012 at 2:09am (Last edited: 18 August 2012 2:10am), Community Member, 8 Posts

I haven't really messed with much there so I'm not sure... I just added another field but this seems to have no effect (I also tried a clean install on this server and it has the same problem). This is the code you mentioned in my SiteTree.php:

   static $db = array(
      "URLSegment" => "Varchar(255)",
      "Title" => "Varchar(255)",
      "MenuTitle" => "Varchar(100)",
      "Content" => "HTMLText",
      "IntroColumn" => "HTMLText",
      "MetaTitle" => "Varchar(255)",
      "MetaDescription" => "Text",
      "MetaKeywords" => "Varchar(255)",
      "ExtraMeta" => "HTMLText",
      "ShowInMenus" => "Boolean",
      "ShowInSearch" => "Boolean",
      "Sort" => "Int",
      "HasBrokenFile" => "Boolean",
      "HasBrokenLink" => "Boolean",
      "ReportClass" => "Varchar",
      "CanViewType" => "Enum('Anyone, LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')",
      "CanEditType" => "Enum('LoggedInUsers, OnlyTheseUsers, Inherit', 'Inherit')",

I'm not quite sure how to implement your solution with a multi-array like that?

The only other bit of code I added in SiteTree.php is
$fields->addFieldToTab("Root.IntroColumn", new HTMLEditorField('IntroColumn','Intro Column Content'));
just before 'return $fields;' in the getCMSFields function

I cannot even find SimpleHTMLField in there.. Remember this is SS 3.0.0 so maybe that's been changed already?

The problem happens when I try to edit pages. I cannot see the htmleditor. It is simply not there. e.g. http://dev/silverstripesite/index.php/admin/pages/edit/show/7

Please see the attachment.

Thank you for your help so far. I hope I can sort this out otherwise we cannot use silverstripe. :(

Attached Files

18 August 2012 at 3:18am Community Member, 107 Posts

- try to upgrade to SS3.0.1 -stable
- I am using SS3.0.1 now & I dont get problem like this, so most likely its because you using an older/unstable SS release or some files are missing/corrupt when uploading through FTP (this happens to me sometimes )..
re-check & upload the latest SS release & let me know how it goes ;)


20 August 2012 at 7:41pm (Last edited: 20 August 2012 7:43pm), Community Member, 8 Posts

Ouch. Panic over. I actually tried what you suggested, but eventually found the problem!

In the end, it was a problem with the .htaccess file! I managed to find out by debugging the javascript and the clue was that 'tinymce' was simply not being loaded at all because the script was looking for it in the wrong place. When I migrated the installation to the other server, the RewriteBase parameter in .htaccess was incorrect, so I changed it. The site worked as normal, all except tinymce, so I thought there was some other problem at that point. Only after the debugging did I look back at the .htaccess and realise that I had an error in the RewriteBase - I had included the server hostname as a prefix!!! Duh....

Anyway, I changed the RewriteBase to what it should be, and everything works as normal and tinymce started to appear again. Sorry for the goose chase! But thank you very much for guiding me through DesignerX - a good few karma points for you there. :)