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

/dev/build gives white page?


Go to End


3 Posts   2759 Views

Avatar
Matt Villnave

Community Member, 2 Posts

6 March 2013 at 8:03am

Running 3.0.5 and when I make simple changes (add a field for example) and run /dev/build?flush=1, I get a blank screen. I'm in dev mode, no errors are kicked out. Adding a field shouldn't be so difficult! I keep experiencing this with a few of my sites and they are simple ones. See below... not sure how this can break anything! It's a fresh install.

<?php
class Page extends SiteTree {

public static $db = array(
'Right' => 'HtmlText'
);

public static $has_one = array(
);

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Right', new HTMLEditorField('Right'));

return $fields;
}

}
class Page_Controller extends ContentController {

/**
* An array of actions that can be accessed via a request. Each array element should be an action name, and the
* permissions or conditions required to allow the user to access it.
*
* <code>
* array (
* 'action', // anyone can access this action
* 'action' => true, // same as above
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
* );
* </code>
*
* @var array
*/
public static $allowed_actions = array (
);

}

Avatar
Invader_Zim

Community Member, 141 Posts

9 March 2013 at 3:59am

Edited: 09/03/2013 4:01am

Hi Matt,

I think there is a small typo in your code:

instead of 'Right' => 'HtmlText', use 'Right' => 'HTMLText'.

Also UncleCheese made a great post about common SilverStripe errors :
http://www.leftandmain.com/silverstripe-tips/2010/09/08/8-common-silverstripe-errors-explained-and-solved/

(just in case you still have that "white screen of death")

Cheers

Avatar
Harley

Community Member, 165 Posts

11 March 2013 at 9:07am

Also Matt it is good practice to enable Director::set_environment_type('dev'); in your "mysite/_config.php" so it can give you an error. Usually a good indicator of what is wrong in your code.

Regards