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:

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

Problem with SS 2.3 add class

Go to End



Community Member, 3 Posts

26 June 2012 at 12:49am

Hi! Sorry for my English) I want create new page type.
This is my code

class VitrinaHolder extends Page {
static $db = array(
"Phone" => "Varchar(200)"
static $has_one = array(

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new TextField("Phone", "Phone"), "Content");
return $fields;

class VitrinaHolder_Controller extends Page_Controller {
public function init() {


I get an error

[User Error] Couldn't run query: CREATE TABLE `VitrinaHolder` ( `ID` int(11) not null auto_increment, `Phone` varchar(200) character set utf8 collate utf8_general_ci, primary key (ID) ) TYPE=MyISAM You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 7
GET /dev/build?flush=1

Line 401 in /home/webzabota/data/www/

As far as I understand it, the code - is correct. What is the cause of the error? Someone tell me what's the problem?

Attached Files