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

Themes exist but won't show, even when selected


Reply

6 Posts   1136 Views

Avatar
Jo

1 April 2011 at 8:39pm Community Member, 4 Posts

Hi all

Having a nightmare here. I tried to install the blog module on to my SS site, but something went wrong and all I got were errors when I tried to view my site or CMS. After trying a few fixes mentioned on forums to no avail, I went for the fresh install option to remove whatever files were messing things up.

After deleting the site and re-installing SS I got a CMS that links to my DB, had all of my previous pages in it as well as the options to select all the custom page types and the custom theme that I'd developed.

However, when viewing the pages the theme didn't appear and all I got was my content with the message:

'Generated with the default ContentController.ss template'

I also couldn't see any of the customisations that I had made to the CMS. It also won't recognise the native SS themes like blackcandy.

After browsing these forums I think is must be that the layout, and template '.ss' files aren't being read as none of my includes appear in my page content, but I have no idea how to force them to be applied.

Oh, and I've I've rebuilt my database, and I've flushed the cache many, many times.

Please help, I've reached head-banging-against-wall point with this.

Thanks
Jo

Avatar
swaiba

1 April 2011 at 9:57pm Forum Moderator, 1796 Posts

as well as selecting it in the cms (and doing a dev build)
try adding...

SSViewer::set_theme("<themename>");

in your _config.php

Avatar
simon_w

1 April 2011 at 10:06pm Forum Moderator, 474 Posts

This sounds rather like SilverStripe forgot the page type of your pages. In the CMS, check the page type in the Behaviour tab.

Avatar
Jo

2 April 2011 at 6:33am Community Member, 4 Posts

Hi Simon and Swaiba

Yup, the page types are available but when I swap between them it makes no difference, there is no styling on the pages at all. I've also checked my config.php file and the SSViewer::set is set to the correct theme. Even when I change that or the theme on the CMS or the page type, no styling at all appears, even blackcandy the default renders nothing.

Thanks for your input folks...

Avatar
martimiz

2 April 2011 at 10:05pm Forum Moderator, 1091 Posts

Simon has a point though, check the database for empty ClassName fields. If you find any, just set them to 'Page'.

I've had this happen when I removed a certain pagetype from source and dev build. After that even saving the page wth a new classname wouldn't fix it, so I ended up editing the tables. After that you can save to the correct page type. Hope this helps...

Avatar
swaiba

3 April 2011 at 12:39am Forum Moderator, 1796 Posts

yes I agree - I noticed this after an upgrade also