Jump to:

1384 Posts in 493 Topics by 522 members


SilverStripe Forums » Themes » Flush and config change doesn't work

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 2184 Views
  • Viken
    Community Member
    1 Post

    Flush and config change doesn't work Link to this post

    Greetings from a fellow Kiwi currently in the United States!

    I have just downloaded the latest version of SilverStripe (ver 2.4.1) and installed on my hosting account with Surpass Hosting. The installation seemed to go well and the site appears to be working. However, when I changed themes I started having issues. I initially installed with the Black Candy theme, and followed the instructions and changed the _config.php file so it reads as follows:

    // This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.org/themes/

    No matter what I do however, all I can see is the Black Candy theme. I tried the <url>?flush=1 address, and I checked it in a different browser. It's still Black Candy however. Now I am wondering if there is something with my web hosting company that may be causing this (something not writeable perhaps?) Perhaps I missed an error when installing although I don't recall one.

    Is there something I should check that may be causing this inability to update the theme? I have previously used Joomla, Wordpress, Invision, phpbb, SMF and a host of other packages and never had an issue so I think it may be something relatively minor .... I just can't work out what it may be.

    Any advice would be appreciated.

  • Martijn
    Community Member
    271 Posts

    Re: Flush and config change doesn't work Link to this post

    Try ?flush=all

    You could also try to create a folder silverstripe-cache in siteroot so Silverstripe will use that folder for the cache files.

    Also make sure you don't have set a template in SiteConfig.

    Hope this helps.

    Community Member
    25 Posts

    Re: Flush and config change doesn't work Link to this post

    If you use SS 2.4, change theme from admin panel: yoursite.com/admin

  • Snowy190uk
    Community Member
    3 Posts

    Re: Flush and config change doesn't work Link to this post

    Just noticed this topic - I should have looked a but bit more before posting (see 'Themes not working' post) - but I am also having the same problem.

    Regardless of what theme I download, or the amount of times I save the theme selection option in the admin area, I don't get any change of theme - just the basic text and some sort of default .ss file presumably used when all else fails!

    If I use the default (blackcandy) theme it works, but no downloaded theme does. Its such a simple thing, buts its really annoying.

  • HenryPenny
    Community Member
    1 Post

    Re: Flush and config change doesn't work Link to this post

    I have had this issue and I found one potential problem.

    If your homepage record in the CMS is of type Page. You need a template called:

    /themes/<your theme>/templates/Page.ss

    If this is not available SS will grab a template from somewhere else.

    Probably /framework/templates/Controller.ss

    I found this after 4 hours of debugging the source code. I'm not sure if this is in the docs anywhere - but I couldn't find it, and I see quite a bit of frustration around this problem.

    This might bite you if you start making new Classes e.g. HomePage extends Page...

    You need to rename or copy your template to HomePage.ss in this example

  • thomas.paulson
    Community Member
    75 Posts

    Re: Flush and config change doesn't work Link to this post

    Hi Henry,

    I think it will better to create new layout for HomePage

    /themes/<your theme>/templates/Layout/HomePage.ss.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.