Support » Themes and Templates » Template Missing – Bug Discovery

  • Before I report this as a bug I wanted to see if anyone can replicate the error.

    Last night I was putting together some custom Page templates and creating customized styles for each of those page layouts.

    In the “Design” tab in the Admin panel I noticed that my selected Theme was not shown as the primary theme. According to WordPress, that theme was de-selected to the bottom of the list and its screenshot was missing. The text message indicated that the theme was missing.

    The Theme was not missing from the server and after 30 minutes of scanning the code I determined that none of the Theme’s pages were damaged or mis-written. Finally, I swapped out the stylesheet for a blank stylesheet just to see what would happen, and Voila! the Theme was once again perceived by the WP Admin panel as being valid. The problem was somehow related to the stylesheet.

    Returning to the style definitions I’d been working on most recently, I noticed something suspicious. I use the application CSSEdit (Mac) which allows the user to encapsulate blocks of stylesheet code into “folders” to make organizing your code MUCH easier. CSSEdit does this by wrapping those blocks of code with comments. My problem was that I’d used the word “Template” as a title for one of these “folders”.

    Stylesheet comments must somehow be interpreted by the WP engine as Theme-breaking code.

    /* @group Template: video */
    .example {
    	margin-top: 5px;
    	margin-right: 10px;
    	margin-left: 10px;
    	background-color: #ffc480;
    /* @end */

    Might there be a way to put a warning note on the Codex for Page Templates that the word “template” is reserved so that people won’t use it in their CSS? I’d hate for anyone else to experience this problem!


  • The topic ‘Template Missing – Bug Discovery’ is closed to new replies.