Jump to:

23452 Posts in 18901 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » lost connection to all of my set page types / templates on non page.ss pages. I get Generated with the default ContentController.ss template

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

Page: 1
Go to End
Author Topic: 1904 Views
  • TF-35Lightning
    Avatar
    Community Member
    137 Posts

    lost connection to all of my set page types / templates on non page.ss pages. I get Generated with the default ContentController.ss template Link to this post

    Hi all,

    I have just installed 2.4.1 on the live server, setup the default black candy template etc that was working.
    I've then drop that DB and uploaded the one I want to use, FTPed my theme, mysite directory and .htaccess

    Did a dev/build and ?flush=all

    Page.ss loads as expected but then when I try to access any other non page.ss page type I get the correct DB content but the page template is missing and I get Generated with the default ContentController.ss template. On my WAMP server all of these extra templates I created are showing up fine, its only when I am on the live server this issue is happening.

    I read something about making a silverstripe-cache folder read and write over here
    http://ssorg.bigbird.silverstripe.com/template-questions/show/286751
    Tried that but didn't change anything. (that directly is filling up with cahce files though so I have left it there)

    I'm developing on WAMP, and my live server is LAMP.

    Its the first time I've also tried to replace an existing database (I mean dropping the default created and then importing my own). SO I don't know if I needed to do anything more special because of that (I had add drop table / view checked like it says in the doc on export).

    Here are the things I have checked.

    mysite.com/Downloads/?debug_request=1
    returns

    Debug (line 167 of SSViewer.php): Selecting templates from the following list: ContentController

    Debug (line 191 of SSViewer.php): Found template 'ContentController' from main template archive, containing the following items: array (
    'main' => '/mysite.com/html/sapphire/templates/ContentController.ss',
    )

    Which apparently means the template controller isn't finding the template???
    My templates are located at mysite.com/themes/mytheme/templates
    My controllers are for example "downloadstemplate.php" are located at mysite/code/

    <?php
    class downloadstemplate extends SiteTree {

       public static $db = array(
       );

       public static $has_one = array(
       );

    }
    class downloadstemplate_Controller extends ContentController {

       /**
        * An array of actions that can be accessed via a request. Each array element should be an action name, and the
        * permissions or conditions required to allow the user to access it.
        *
        * <code>
        * array (
        * 'action', // anyone can access this action
        * 'action' => true, // same as above
        * 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
        * 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
        * );
        * </code>
        *
        * @var array
        */
       public static $allowed_actions = array (
       );

       public function init() {
          parent::init();

          // Note: you should use SS template require tags inside your templates
          // instead of putting Requirements calls here. However these are
          // included so that our older themes still work
          Requirements::themedCSS('layout');
          Requirements::themedCSS('typography');
          Requirements::themedCSS('form');
       }
    }

    When I am in the CMS and I go to select the template from the list, the name appears I click save but the behaviour doesnt change to what I selected when I hit save and I see a little broekn page icon from the site tree.

    I know about the case sensitivty issues between WAMP and LAMP so I checked that and appears ok. One thing I noticed was in the CMS list all of the page types/templates are listed with the first letter Uppercase eg Page so I tried changing the controller and name to this, but still I get the same issue. I'm doing ?flush=all all the time.

    I'm not sure what else to do!

    Any help would be really magical

  • MattB
    Avatar
    Community Member
    7 Posts

    Re: lost connection to all of my set page types / templates on non page.ss pages. I get Generated with the default ContentController.ss template Link to this post

    Here's how I resolved the same:

    1) run /dev/build/

    2) run /admin/publishall/

    3) do /?flush=all

    4) Check your SiteTree and SiteTree_Live tables for rows with empty ClassNames

    5) Check your Page.ss template file has not gone AWOL!

  • dompie
    Avatar
    Community Member
    88 Posts

    Re: lost connection to all of my set page types / templates on non page.ss pages. I get Generated with the default ContentController.ss template Link to this post

    I have a slightly different problem. I've created a new Pagetype called FolderPage and created an apropriate FolderPage.ss in the Layout folder.
    Since then I build & flushed, checked the DB tables serveral times for empty ClassName columns (deleteted them), but all without success. I still receive the

    Generated with the default ContentController.ss template

    error. Any suggestions?

  • dompie
    Avatar
    Community Member
    88 Posts

    Re: lost connection to all of my set page types / templates on non page.ss pages. I get Generated with the default ContentController.ss template Link to this post

    Ay, found my mistake...I extended by accident ContentController instead of Page_Controller -.-

  • doubleedesign
    Avatar
    Community Member
    19 Posts
  • Bundschuh
    Avatar
    Community Member
    10 Posts
    1904 Views
Page: 1
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.