Page Template suddenly disappeared?

Topics: Troubleshooting
Jun 21, 2011 at 1:49 PM
Edited Jun 21, 2011 at 1:51 PM

While I was developing a web site using the Composite C1 console, one of my Page Templates suddenly disappeared from the list "Page Templates" in the "Layout" perspective. However, when I edit a Page Type, under the Layout tab, I can see the page template and select or deselect it. Also, if I right click "Page Templates" and select "Add template", and open the "Copy from" drop down, the page template is there!?

How is this possible? And what can I do to get the template back? I need to edit it, so I have to be able to see it in the list.

I tried to refresh the list by right clicking "Page templates" and choosing "Refresh", and I've tried logging out and logging back in, but it's still not there.

Jun 21, 2011 at 2:28 PM

Hi @reneg

Template basically stored as a) record in xml/sql table b) xml file on disk with layout's content

If you don't see the template in page templates list, there's either something wrong with a) or b), there's a security rule that prevents it from showing or some other kind of bug that prevents showing it.

What I recommend is:

1) Open folder /App_Data/PageTemplates/ and check that there's an xml file that is related to than layout

2) If you're running on xml, open file /App_Data/Composite/DataStores/Composite.Data.Types.IPageTemplate_Published.xml and check that there's a row for that layout. Once you find it, insert it to your response here

Jun 21, 2011 at 2:41 PM

Hi @reneg

this could sound like an issue with the tree not showing correct and not data corruption. Try "Tools | Restart Server" and then F5. Any relevant info in the server log?



Jun 21, 2011 at 2:43 PM

Thanks for your reply napernik.

I use the XML data store for this project. In the folder /App_Data/PageTemplates/, the file "Samband.xml" is there. I tried opening it in Visual Studio, and it's the correct template.

I then looked at the /App_Data/Composite/DataStores/Composite.Data.Types.IPageTemplate_Published.xml file, and it has a row for the missing template:

  <PageTemplate Id="305b7648-f633-4962-8a93-d29d6e4ac330" Title="Samband" PageTemplateFilePath="/Samband.xml" />

But it's still not showing up in the Page Templates list.

However, the pages using the template are working fine, and I even tried editing the page template directly in the XML file, and the pages using the template were correctly updated.

Jun 21, 2011 at 2:46 PM

Thank you Mawtex!

I tried restarting the server, and then it reappeared! :-)

Before I restarted, I checked the server log, but there was no messages. (I also tried to refresh the log, but still no messages)

But it works now, thank you both for helping me! :-)

Jun 21, 2011 at 3:03 PM

This sounds like a cache bug in our security system. We have been fixing in that area, could you give me your version number (build number) so we can sanity check that you are running a 'pre fix' build?

Jun 21, 2011 at 3:05 PM

Sure, my build is 2.1.4113.99.

Jun 24, 2011 at 5:50 AM

Have similar situation where template shows in several locations, however, I can't apply the template to any pages... the template does not appear in the template drop-down list when editing pages.

Template is visible in Layout folder view and template file exists in /App_Data/PageTemplates/Tab navigation top.xml.

I then looked at the /App_Data/Composite/DataStores/Composite.Data.Types.IPageTemplate_Published.xml file, and it has a row for the missing template:

<PageTemplate Id="18a091b6-6f82-426b-b7d9-47839a14f170" Title="Tab navigation top" PageTemplateFilePath="/Tab navigation top.xml" />

I've tried restarting server, F5. I've logged out, closed browsers, restarted. Logged onto server, stopped website, stopped AppPool, restarted... but this template is still not showing up in the Page Templates list when I am editing pages. I am not having this problem with other composite sites hosted on same server.

Any assistance appreciated.

Jun 30, 2011 at 6:25 AM

Hi whistleguy,

As I can see from the screenshots, you are using the Starter Site as as a website template.

The thing is that page types - it comes with by default ("Home" & "Page") - explicitly select layout templates to be available for pages you create. 
So if you add your own template, it will not be automatically selected for these two page types.

If this is your case (I guess so), you should manually select the template you have created in the page type(s) you use with your pages.

For example, for the "Page" page type, do this:

  1. In the Layout perspective, expand "Page Types", click "Page" and click "Edit Page Type" on the toolbar.
  2. When the "Page" page type opens in the editor, click its "Layout" tab. Here you will see the templates selected for this type.
  3. Check your template (and any other you need) and save the page type.
  4. Close the page where the template didn't appear - if open - and edit it again.

The template must be in the dropdown now.  If not, check what page type it uses - on the "Settings" tab of the page.

BTW, if you uncheck all the templates in the page type instead (see Step 3 above), all the templates will be available.

You can read more on this here:

Jul 4, 2011 at 7:30 PM

Thanks wysocki... easy as pie when you know what you are doing. Your instructions were very simple and solved my problem.