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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

[SOLVED] Cannot change Page Type in CMS


5 Posts   1940 Views


27 May 2010 at 10:26am (Last edited: 27 May 2010 12:40pm), Community Member, 130 Posts


I've run into a bit of a problem with page types. We had two page types called "Section" and "Holder" which I changed to "Tier1LandingPage" and "Tier2LandingPage" by renaming the files in /mysite/code/, editing the class titles and renaming the template files in /theme/themename/templates/Layout/

Now if I try to change the page type of pages that were previous set as "Section" or "Holder" in the CMS to "Tier1 Landing Page" the page type resets itself to the first selection on the list on publish.

I've flushed the templates, rebuilt the database and at a bit of a loss about what to do.

Any suggestions appreciated.



27 May 2010 at 12:10pm Community Member, 130 Posts

I solved this problem but it took a tiny bit of SQL hacking. It looks like removing Page Types which are used by existing pages breaks things.

I went into MySQL and found that ClassName for the affected pages was "" in the SiteTree table and NULL in the SiteTree_Live. These could not be changed under the Behaviour tab in the CMS.

Running the following SQL command fixed this problem:

UPDATE SiteTree SET ClassName="NewPageType" WHERE ClassName="";
UPDATE SiteTree_Live SET ClassName="NewPageType" WHERE ClassName IS NULL;

Hope this helps someone later on.


27 May 2010 at 6:14pm Forum Moderator, 5511 Posts

Ideally I think it should default back to 'Page' if a page type gets removed. Ticket has been created -


6 July 2010 at 3:34am (Last edited: 6 July 2010 3:35am), Community Member, 218 Posts

In case anybody didn't know, you can also just duplicate the page. that fixes it.
then delete the original and rename the duplicate...


5 September 2011 at 8:57am Community Member, 16 Posts

@Tama - just wanted to log in and say thanks for posting that solution. You saved me a lot of time and panic. :)