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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

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

Notice framework/dev/deprecation php Page,Holder class

Go to End

2 Posts   1083 Views


Community Member, 1 Post

22 March 2013 at 12:15pm

i have the problem.
I created classes CompanyPage,CompanyHolder and ss template.
When I tried to create CompanyPage(after created companyholder) appear notice Notice framework/dev/deprecation.php.
Where i'm wrong?


* Defines the CompanyPage page type
class CompanyPage extends Page {
static $db = array(
'Company_name' => 'Text',
'Email' => 'Text',
'Adress' => 'Text',
'Phone_number' => 'Text'

static $default_parent = 'CompanyHolder';
//static $has_one = array();

public static $has_one = array(

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

$fields->addFieldToTab('Root.Content.Main', new TextField('Company_name'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Email'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Adress'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Phone_number'), 'Content');
//$fields->addFieldToTab('Root.Content.Main', new DateField('DateCreated'), 'Content');
// $fields->addFieldToTab('Root.Content.Main', new DateField('DateLogin'), 'Content');
//$this->extend('updateCMSFields', $fields);
return $fields;

class CompanyPage_Controller extends Page_Controller {




class CompanyHolder extends Page {
public static $db = array(

public static $has_one = array(
static $allowed_children = array(

class CompanyHolder_Controller extends Page_Controller {


<div class="content-container unit size3of4 lastUnit">
<div class="content">$Content</div>
<% loop Children %>

<% end_loop %>



Forum Moderator, 1391 Posts

24 March 2013 at 9:16am

A deprecation notice in SilverStripe usually means that some function in your code should either no longer be used in the current version of SilverStripe, or a function/property definition has changed (public added to it, or an extra parameter) and you should change your subclassed version accordingly.

This of course depends on the SilverStripe version you have installed, and the (custom) code you are using. The deprecation notice should tell you more about the affected code, so you can look up the equivalent from the parent class. If this doesn't make it clear, you could post the complete deprecation message here.