Jump to:

1382 Posts in 491 Topics by 521 members

Themes

SilverStripe Forums » Themes » Theme Change Problem

Discuss SilverStripe Themes.

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

Page: 1 2 3
Go to End
Author Topic: 4166 Views
  • Josh22
    Avatar
    Community Member
    2 Posts

    Theme Change Problem Link to this post

    I've recently begun tooling around with SilverStripe and I like its potential. I've encountered one issue that I can't seem to track down through my own troubleshooting and my forum/net searches haven't turned up any similar problems either. Any insight is greatly appreciated.

    The issue is that my site doesn't seem to do anything when I modify the SSViewer::set_theme('tutorial'); line in mysite/_config.php. When I change it to blackcandy or another theme I downloaded to test and run ?flush=1 absolutely nothing happens. The site just chugs along with the default tutorial theme. In addition to flushing the cache I also ran dev/build?flush=1 to rebuild the DB and the same thing happens. I even manually deleted the contents of silverstripe-cache folder and bounced the server, walked away and came back an hour later and still receive the template theme.

    I know SilverStripe is picking up changes to mysite/_config.php because if I type in bogus DB info I'll get the expected errors but for some reason it just seems to chug along as if nothing changed when I attempt to modify the set_theme() setting.

    Here's a snippet of my mysite/_config.php just to make sure I'm not crazy:

    MySQLDatabase::set_connection_charset('utf8');

    // This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.org/themes/
    SSViewer::set_theme('blackcandy');

    // Set the site locale
    i18n::set_locale('en_US');

    SilverStripe v2.4.0

    Again, any help is much appreciated, thanks!

  • Josh22
    Avatar
    Community Member
    2 Posts

    Re: Theme Change Problem Link to this post

    Update: I just blew away the whole install, DB and all, and tried again and all is well.

  • Varberg
    Avatar
    Community Member
    15 Posts

    Re: Theme Change Problem Link to this post

    I get the same problem when I change the _config.php to

    MySQLDatabase::set_connection_charset('utf8');

    // This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.org/themes/
    //SSViewer::set_theme('blackcandy');
    SSViewer::set_theme('vista');

    // Set the site locale
    i18n::set_locale('sv_SE');

    I still have the black candy theme. Will I have to re-install everything?

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Theme Change Problem Link to this post

    Varberg have you flushed your cache - yoursite.com?flush=all

  • SDH
    Avatar
    Community Member
    10 Posts

    Re: Theme Change Problem Link to this post

    There seems to be lots of confusion on this, changing themes in 2.4.0. I'm a new, confused user.

    From the instructions, it looks like changing the SSViewer::set_theme() should just change the theme. I've tried a couple of themes, commenting out their SSViewer settings when I added another, but now although I have just one enabled, the site title/tagline page has a selector with _all_ themes, whether enabled or not, listed and active. Is this intended?

    Also, are the themes adapted for 2.4.0, or do some of them break things? Somewhere in my experimenting I picked up the dreaded "javascript parse error", which appears when I try to save any- and everything. (Although for nearly all pages, it appears the save is completing correctly, even though the error appears.) Any hints on getting rid of this error?

  • Turdus
    Avatar
    Community Member
    2 Posts

    Re: Theme Change Problem Link to this post

    Hi Willr,

    could you explain to me where exactly you have to add this ?flush=all??
    I do not understand.
    I have my site on the localhost and I don't have an official domainname yet.
    Hope you can help me out.

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Theme Change Problem Link to this post

    Turdus have you read the tutorials? this tutorial covers flush and how it works. You need to open a webbrowser and append ?flush=all to the URL (even if you are still on localhost) eg for example if your site is installed on localhost in a folder 'silverstripe' you would visit this url in your browser localhost/silverstripe?flush=all

  • Turdus
    Avatar
    Community Member
    2 Posts

    Re: Theme Change Problem Link to this post

    Hi Willr,

    I'm very new to website building, and of course I'm also a bit too impatient to get everything working.
    But it is working now!
    Thanks a lot!

    4166 Views
Page: 1 2 3
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.