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.

Themes /

Discuss SilverStripe Themes.

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

Another theme installation problem


Go to End
Reply


10 Posts   2930 Views

Avatar
neuron

Community Member, 6 Posts

10 March 2010 at 11:36pm

Edited: 11/03/2010 12:14am

Hi there!

Sorry for starting another "theme install problem" thread but my problem doesn't seem to be covered by the existing threads. I am fairly new to Silverstripe and started to run it with MAMP on my Mac. Everything went fine and I was also able to download new themes, put them into the themes folder, change /mysite/_config.php and voila the new theme was shown.

Now I did install Silverstripe on a websever. The installation process went fine and I can use both the tutorial theme and also the blackcandy theme by changing _config.php respectively. If I download another theme though, upload it to the themes folder and change _config.php I will just get a blank site this happens no matter theme I choose apart from 'tutorial' and 'blackcandy'. It even happens if I copy all 'blackcandy' subfolders and files into a new folder calles mytheme in the themes folder and change _config.php respectively. So it is not a problem of the subfolder structure or the .ss files but rather a problem of the server not fiinding the themes in general. This there anything else I need to refresh or change apart from -config.php

Sorry for such a dump question but I am still a newbie in this regard.
Cheers,
Torsten

Just some more information:
I tried to use theme 'BrightSide'

In the themes folder I have the following subfolders as downloaded from the web:

BrightSide1
BrightSide1_blog
BrightSide1_ecommerce
BrightSide1_forum


So I changed /mysite/_config.php to 'BrightSide1' and while Safari just shows a blank site, Firefox returns the following which doesn't mean much to me but hopefully to someone of you:

Source

166                $this->chosenTemplates['main'] = $this->chosenTemplates[$templateFolder];
167                unset($this->chosenTemplates[$templateFolder]);
168             }
169          }
170
171          if(isset($_GET['debug_request'])) Debug::message("Final template selections made: " . var_export($this->chosenTemplates, true));
172
173       }
174
175       if(!$this->chosenTemplates) user_error("None of these templates can be found: ". implode(".ss, ", $templateList) . ".ss", E_USER_WARNING);
176
177       parent::__construct();
178    }
179    
180    /**
181     * Returns true if at least one of the listed templates exists

Trace

* None of these templates can be found: Page.ss, ContentController.ss
Line 175 of SSViewer.php
* SSViewer->__construct(Array)
Line 305 of Controller.php
* Controller->getViewer(index)
Line 172 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 119 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 29 of ModelAsController.php
* ModelAsController->handleRequest(HTTPRequest)
Line 44 of RootURLController.php
* RootURLController->handleRequest(HTTPRequest)
Line 280 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/)
Line 118 of main.php

Avatar
Juanitou

Community Member, 323 Posts

11 March 2010 at 2:35am

Did you flush the cache? http://doc.silverstripe.org/doku.php?id=tutorial:1-building-a-basic-site&s=flush#templates

Avatar
neuron

Community Member, 6 Posts

11 March 2010 at 2:45am

No! :embarrassment: I just tried and now it works. Thank you so much. I should better read the manual more carefully before I post next time.

Best,
Torsten

Avatar
Ryan M.

Community Member, 309 Posts

19 March 2010 at 9:22am

I'm having a similar problem. I've launched a production SS site before so I have an intermediate to advanced knowledge of what I'm doing. When I try to switch to a theme and flush the cache, using either 1 or all, I get this error:

[Warning] None of these templates can be found: Page.ss, ContentController.ss
GET /?flush=1

Line 175 in /var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/sapphire/core/SSViewer.php
Source

166                $this->chosenTemplates['main'] = $this->chosenTemplates[$templateFolder];
167                unset($this->chosenTemplates[$templateFolder]);
168             }
169          }
170
171          if(isset($_GET['debug_request'])) Debug::message("Final template selections made: " . var_export($this->chosenTemplates, true));
172
173       }
174
175       if(!$this->chosenTemplates) user_error("None of these templates can be found: ". implode(".ss, ", $templateList) . ".ss", E_USER_WARNING);
176
177       parent::__construct();
178    }
179    
180    /**
181     * Returns true if at least one of the listed templates exists

Trace

* None of these templates can be found: Page.ss, ContentController.ss
Line 175 of SSViewer.php
* SSViewer->__construct(Array)
Line 305 of Controller.php
* Controller->getViewer(index)
Line 172 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 119 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 29 of ModelAsController.php
* ModelAsController->handleRequest(HTTPRequest)
Line 44 of RootURLController.php
* RootURLController->handleRequest(HTTPRequest)
Line 280 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/)
Line 118 of main.php

The Page.ss does exist in the template directory. I'm mystified... I really liked SS in the beginning but all these new problems are driving me towards Ruby on Rails instead.

Avatar
Willr

Forum Moderator, 5513 Posts

20 March 2010 at 3:22pm

What is the name of your theme? Make sure its all lowercase and no underscores. Like 'mytheme' then SSViewer::set_theme('mytheme'); and make sure you ?flush=1.

Avatar
Ryan M.

Community Member, 309 Posts

21 March 2010 at 8:16am

Thanks Willr. That fixed it... sort of. My theme had dashes and an underscore. D'oh!

Anyway after I fixed that and ran a flush, I got this error when trying to login to the admin:

[Warning] None of these templates can be found: Security_Security.ss, Security.ss
POST /directory/Security/Security/LoginForm

Line 175 in /Applications/MAMP/htdocs/directory/sapphire/core/SSViewer.php
Source

166                $this->chosenTemplates['main'] = $this->chosenTemplates[$templateFolder];
167                unset($this->chosenTemplates[$templateFolder]);
168             }
169          }
170
171          if(isset($_GET['debug_request'])) Debug::message("Final template selections made: " . var_export($this->chosenTemplates, true));
172
173       }
174
175       if(!$this->chosenTemplates) user_error("None of these templates can be found: ". implode(".ss, ", $templateList) . ".ss", E_USER_WARNING);
176
177       parent::__construct();
178    }
179    
180    /**
181     * Returns true if at least one of the listed templates exists

Trace

* None of these templates can be found: Security_Security.ss, Security.ss
Line 175 of SSViewer.php
* SSViewer->__construct(Array)
Line 305 of Controller.php
* Controller->getViewer(Security)
Line 172 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 119 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 280 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/Security/Security/LoginForm)
Line 118 of main.php

Avatar
Willr

Forum Moderator, 5513 Posts

21 March 2010 at 11:16am

ok perhaps rather than doing a ?flush=1 try a ?flush=all on that page - site.com/Security/login?flush=all which will flush all the templates not just the current one. If you haven't defined a Security.ss file then it should default back to the standard without any issues.

Avatar
Ryan M.

Community Member, 309 Posts

21 March 2010 at 11:34am

I tried that already, and did so again after reading your reply. Still the same result.

Go to Top