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:

Template Questions /

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

Cannot select page type in admin panel

Go to End

2 Posts   1061 Views


Community Member, 20 Posts

31 January 2012 at 3:00pm

Edited: 31/01/2012 3:02pm


I have created a new page type called HomePage. To do this I have created a Homepage.php file which is located at mysite/code/HomePage.php and I have a file called located at template/ I have run dev/build?flush=1 and ?flush=all and I have a file in site root called silverstripe-cache at SilverStripe/silverstripe-cache set to read / write and again run dev/build?flush=1 and ?flush=all.

when I go to the admin panel i can see the option Change to HomePage in the page type drop down menu. It allows me to select this option but when I save it changes the page type to Change to Error Page and then saves it as that page type.

This then returns the statement "Generated with the default template" on the site for that page but all other pages are ok.

One final thing: I have a <form action="url" method="get" </form> statement and a <script type="text/javascript" src="url"></script> statement coded into the immediately after the <div id="Layout"> $Layout</div> statement.

Can anyone tell me where I have gone wrong?


Community Member, 244 Posts

10 February 2012 at 12:57pm

I've had this happen when I've created a new page type, run dev/build, created a page based in this new page type, then removed the php files, run dev/build to clear the database, and then uploaded new versions of the php files, and dev/build again.

I've solved the problem in these cases by going directly into the database, finding the page in the sitetree table, and changing the page type back to 'Page'. Reloading the CMS, and then it lets me choose the right page type again..