1
votes

For some reason, after doing a ?flush=all, a certain page type is not able to locate it's default template. I figure out that it's not loading it's template file after appending showtemplate=1 to the URL. The dumped raw template shows nothing for the default template.

Pastebin: http://pastebin.com/uMLefAsP

I wish someone could point me to the right direction here, for I have no idea where to start debugging.

Thanks, Jan.

1
What's the name of the missing template? Which folder is it in?colymba
It's in the theme folder, the same where all of the templates are. All of the other templates are currently working just fine, just this specific file of which I have a problem. You can see it live here: Working -> link Working ->link Not working ->linkChibang Dayanan
I forgot, the name of the template is: CommunityExtensionPage.ssChibang Dayanan
I guess you have the right theme enabled :) .. is this a "main" template or under Layout or Include? Might be usefull to see some code and maybe a folder tree...colymba
this is a main template for I have declared a separate page type for this. For the site tree, kindly refer to this linkChibang Dayanan

1 Answers

1
votes

Firstly, and I have to ask: Is there actually a PageType called "CommunityExtensionPage"? PageTypes need to be named the same as the required template, for the template to be picked-up automatically.

You seem to have two template files "CommunityExtensionPage.ss". One at "templates/CommunityExtensionPage.ss" and one at "templates/Layout/CommunityExtensionPage.ss"

It would be useful to see the contents of both files. SilverStripe will look for "CommunityExtensionPage.ss" in the top-level of the "templates" dir before looking in "templates/Layout".

If "templates/CommunityExtensionPage.ss" is found, it will also try and look for "templates/Layout/CommunityExtensionPage.ss" and render this into the $Layout template variable. Otherwise, it'll use the default "templates/Page.ss" and request "templates/Layout/CommunityExtensionPage.ss"

Does your "templates/CommunityExtensionPage.ss" template contain a reference to $Layout? If not, then the contents of "templates/Layout/CommunityExtensionPage.ss" will not be rendered.