21309 Posts in 5738 Topics by 2603 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, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1590 Views |
-
lost connection to all of my set page types / templates on non page.ss pages. I get Generated with the default ContentController.ss template

31 July 2010 at 4:14pm Last edited: 2 August 2010 12:43am
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 .htaccessDid 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
returnsDebug (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
-
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

28 October 2010 at 9:56pm
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!
-
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

11 November 2010 at 6:24am Last edited: 11 November 2010 6:26am
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 theerror. Any suggestions?Generated with the default ContentController.ss template
-
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

11 November 2010 at 10:00pm
Ay, found my mistake...I extended by accident ContentController instead of Page_Controller -.-
-
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

26 May 2011 at 11:45pm
MattB, you are a lifesaver.
-
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

13 March 2012 at 5:29am
dompie, you are a lifesaver, too. ( :
| 1590 Views | ||
|
Page:
1
|
Go to Top |


