Jump to:

1368 Posts in 487 Topics by 521 members

Themes

SilverStripe Forums » Themes » Another theme installation problem

Discuss SilverStripe Themes.

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

Page: 1 2
Go to End
Author Topic: 2713 Views
  • neuron
    Avatar
    Community Member
    6 Posts

    Another theme installation problem Link to this post

    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

  • Juanitou
    Avatar
    Community Member
    323 Posts
  • neuron
    Avatar
    Community Member
    6 Posts

    Re: Another theme installation problem Link to this post

    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

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Another theme installation problem Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Another theme installation problem Link to this post

    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.

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Another theme installation problem Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Another theme installation problem Link to this post

    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.

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Another theme installation problem Link to this post

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

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