Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Fuel\Core\ThemeException [ Error ]: Theme "test" could not be found.
  • I am trying to create a custom theme using the depot project. I have added a test folder under the themes folder and I have changed the homepage controller before method like this:
    public function before(){
    parent::before();
    \Request::active()->action=='index' and \Theme::instance('test',array('active'=>'test'))->set_template(
    'templates/layout.smarty');
    I am not sure why I am getting the theme not found error

  • That means it can't find your theme folder.

    Is your theme config (the theme path in particular) setup properly?
  • I copied it to app/config/theme.php and the path looks like:

    'paths' => array(
    APPPATH . '..' . DS. 'themes',
    ),
  • and your themes folder is in that folder (so one folder up from app)? And your webserver has (at least) read access to that folder?
  • yes my themes folder is one up from app folder. and yes my server has read access to that folder. i am not sure why its not finding the test theme folder

  • HarroHarro
    Accepted Answer
    I don't have an idea either.

    Perhaps you can debug Theme::find(), to check the contents of the paths used to find the theme.
  • Here what i got when I checked the value of theme::find

     "/home/ron/Sites/depot/fuel/app/../themes/default/"

    For some reason it keeps calling the default theme.  I am not sure why
  • What have you defined for the active and fallback theme?

    If one of them is 'default', it must exist too, the theme class uses both.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion