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.

Template Questions /

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

flush issue new pagetype

Go to End

5 Posts   2334 Views


Community Member, 1 Post

18 January 2009 at 10:47pm


I got a problem with flushing my database.

I made a new site under themes/miisound/
If i update the template after a change with ?flush=1 It works perfectly.

But i added a php file (HomePage.php)under themes/miisound/code/ as the tutorial told me to do.
When i do this: , i see that it will run the script but no changes has been made. I also checked the backend and no other page type or contenttype has been added.

I tried to add another one in the code folder sitemap.php from another tutorial. but still nothing change after the flush.

What can this problem be?

Kind Regards
Peter Colemonts

Carbon Crayon

Community Member, 598 Posts

19 January 2009 at 5:25am

Edited: 19/01/2009 5:27am

Hi xtoc, welcome to silverstripe :)

In the tutorial they are working in the 'tutorial' folder, which is the equvelent of the 'mysite' folder under normal development. However when working with themes you use the 'themes' folder to store your templates/images/css in, but all your code/javascript still goes into the 'mysite' folder.

SS will not pick up code that is in a folder which has no _config.php file, hence putting it into mysite

so in short, move your HomePage.php to the mysite/code folder


Community Member, 17 Posts

4 February 2009 at 4:57pm

I know this is crazy, but my new pagetypes are not showing up either. I've placed my php file in the mysite/code directory, and flushed about a zillion times, both the cms, and the site.

I'm using forum v-0.1.2 and v-2.3 of SS.

Is there any other issues with this not working out there, or any other tricks to try? Thanks!


Community Member, 712 Posts

4 February 2009 at 5:02pm

In the folder miisound/, did you create an empty _config.php file? The presence of a _config.php file tells SilverStripe that there is stuff in the code directory to process. If you don't have the _config.php file, SilverStripe will simply ignore anything in the code directory.


Community Member, 17 Posts

4 February 2009 at 5:27pm

I simply put my new pagetype under the mysite/code directory. There is a _config.php file there already. Is there some code I need to put in there?

Thanks for the help.