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.

Template Questions /

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

Flush Produces 'This Page Isn't Working'

Go to End



Community Member, 1 Post

14 August 2017 at 10:41pm

Edited: 14/08/2017 10:44pm

Hello All,

Silverstripe Ver: 3.6

I have created a page type file and uploaded it to my live site and when I run /dev/build?flush=1 I get 'This Page Isn't Working', not sure what I need to do so that I am able to get the page type in the admin, could someone please help?
Below is my DocumentPage.php file

 * Defines the Document Page page type
class DocumentPage extends Page {

    static $db = array(
        'DocumentStrap' => 'Text',
        'PageBoxTitle' => 'Text',
        'MobRightBox' => 'Text'
    static $has_one = array(
        'WebRightBox' => 'Image'

    public function getCMSFields() {
        $fields = parent::getCMSFields();

        $fields->addFieldToTab('Root.Main', new TextField('DocumentStrap', 'Web Strap'), 'Content');
        $fields->addFieldToTab('Root.Main', new TextField('PageBoxTitle', 'Left Box Title'), 'Content');
        $fields->addFieldToTab('Root.Main', new TextField('MobRightBox', 'Mobile Right Box'), 'Content');

        $icon = new UploadField('WebRightBox', 'Web Right Box');
        $icon->getValidator()->setAllowedExtensions(array('jpg', 'jpeg', 'png', 'gif'));
        $icon->setConfig('allowedMaxFileNumber', 1);
        $icon->setRightTitle("Displayed to the right of the title. <br />Displays in the box.");
        $fields->addFieldToTab('Root.Main', $icon, "Content");
        //$fields->addFieldToTab('Root.Main', new TextareaField('WebRightBox', 'Web Right Box'), 'Content');
        return $fields;


class DocumentPage_Controller extends Page_Controller {

I have also put the site in Dev mode.