Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Entire site crashes when I upload CMS field changes

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

Page: 1
Go to End
Author Topic: 1160 Views
  • evjan
    Community Member
    7 Posts

    Entire site crashes when I upload CMS field changes Link to this post


    I've made some changes to the CMS fields and the database structure of a template of mine. It works just fine on my machine, but when I upload it to my test server, the entire site crashes. I can't go to the admin login, I can't reach dev/build or anything, it just gives me:

    "Website Error
    There has been an error

    The website server has not been able to respond to your request."

    for every page I try to access. When I replace the php file in mysite/code with the old one, everything starts working again. What have I done wrong? This is the code that I've modified:

    class StartPage extends SiteTree {
       public static $db = array(
          'Puff1titel' => 'Varchar',
          'Puff1kolumn1titel' => 'Varchar',
          'Puff1kolumn1text' => 'Text',
          'Puff1kolumn2titel' => 'Varchar',
          'Puff1kolumn2text' => 'Text',
          'Puff2titel' => 'Varchar',
          'Puff2kolumntitel' => 'Varchar',
          'Puff2text' => 'Text'
       public static $has_one = array(
          "Puff1kolumn1link" => "SiteTree",
          "Puff1kolumn2link" => "SiteTree"
       function getCMSFields() {
        $fields = parent::getCMSFields();

        $fields->addFieldToTab('Root.Content.Main', new TextField('Puff1titel'), 'Content');
        $fields->addFieldToTab('Root.Content.Main', new TextField('Puff1kolumn1titel'), 'Content');
        $fields->addFieldToTab('Root.Content.Main', new TextareaField('Puff1kolumn1text'), 'Content');
        $fields->addFieldToTab("Root.Content.Main", new TreeDropdownField("Puff1kolumn1linkID", "Puff1kolumn1link", "SiteTree"));
        $fields->addFieldToTab('Root.Content.Main', new TextField('Puff1kolumn2titel'), 'Content');
        $fields->addFieldToTab('Root.Content.Main', new TextareaField('Puff1kolumn2text'), 'Content');
        $fields->addFieldToTab("Root.Content.Main", new TreeDropdownField("Puff1kolumn2linkID", "Puff1kolumn2link", "SiteTree"));
        $fields->addFieldToTab('Root.Content.Main', new TextField('Puff2titel'), 'Content');
        $fields->addFieldToTab('Root.Content.Main', new TextField('Puff2kolumntitel'), 'Content');
        $fields->addFieldToTab('Root.Content.Main', new TextareaField('Puff2text'), 'Content');
        $fields->removeFieldFromTab('Root.Content.Main', 'Content');
        return $fields;

  • Willr
    Forum Moderator
    5508 Posts

    Re: Entire site crashes when I upload CMS field changes Link to this post

    Turn on dev mode to see the full error message. Its will probably explain more about what the error is. Turn devmode on by adding this to your _config.php file


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.