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   1157 Views

Avatar
Jo

Community Member, 4 Posts

1 April 2011 at 8:39pm

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

Forum Moderator, 1799 Posts

1 April 2011 at 9:57pm

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

Forum Moderator, 474 Posts

1 April 2011 at 10:06pm

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

Community Member, 4 Posts

2 April 2011 at 6:33am

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

Forum Moderator, 1105 Posts

2 April 2011 at 10:05pm

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

Forum Moderator, 1799 Posts

3 April 2011 at 12:39am

yes I agree - I noticed this after an upgrade also