3439 Posts in 1028 Topics by 869 members
|Go to End|
31 January 2012 at 3:00pm Last edited: 31 January 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 HomePage.ss located at template/Homepage.ss. 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 ContentController.ss template" on the site for that page but all other pages are ok.
Can anyone tell me where I have gone wrong?
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..
|Go to Top|