Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Error 256

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1428 Views
  • nascent
    6 Posts

    Error 256 Link to this post

    Hi guys,
    I'm working through Tutorial 2 and have created /tutorial/code/ArticlePage.php with the following code:

    * Defines the ArticleHolder page type
    class ArticleHolder extends Page {
    static $db = array(
    'Date' => 'Date',
    'Author' => 'Text'

    static $has_one = array(

    static $allowed_children = array('ArticlePage');

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

    $fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');
    $fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
    return $fields;

    class ArticleHolder_Controller extends Page_Controller {



    I have run /db/build/?flush=1 and cleared the cache.

    The page type now appears in my page type list, however I cannot create a page using it (nothing happens when I click the 'go' button) and I get the following error when trying to go to any other page in the CMS:

    ERROR: Error 256 Bad Class to Singleton() - ArticleHolder

    Any suggestions as to what I might be doing wrong?


  • nascent
    6 Posts

    Re: Error 256 Link to this post

    Here's the full error message.

  • nascent
    6 Posts

    Re: Error 256 Link to this post

    There are two pages to create:
    ArticlePage.php AND ArticleHolder.php

    All fixed now

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.