Closed (fixed)
Project:
Drupal core
Version:
6.4
Component:
theme system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2008 at 18:30 UTC
Updated:
17 Oct 2008 at 18:32 UTC
I've found that after creating some custom nodetype template files, and placing them in my "sites/default/themes/themename" directory, they are not loaded.
The file I created was "node-trail_review.tpl.php" it wouldn't load when accessing that node type until I move that file to "modules/node" in the root directory.
Shouldn't it load the file when it is in the theme's directory?
Comments
Comment #1
vm commentedyes the tpl.php should load from the themes folder. Typically this is caused by not clearing the theme registry after adding new tpl.php files to the theme directory.
That said, after you upload new tpl.php files did you goto adminster->themes to clear the theme registry? or administer -> performance and clear the cache?
as a side note, I notice your tpl.php uses an _ (underscore) I've only seen and used tpl.php files with a - (dash) as a seperator. Though I can't be sure this is part of the issue or not at moment.
Marking this as a support request for now.
Comment #2
eaton commentedYou also need to make sure there's an accompanying node.tpl.php. Without that "base" template, the more specific node templates won't be loaded.
Comment #3
jacineIt's also possible that the theme is disabled. This has been happening to me all week long. I know this sounds odd, because it may seem like the theme is enabled, since it's loading the proper stylesheets.
However, when I notice a tpl file is missing, after clearing the cache as VeryMisunderstood described, I visit admin/build/themes and low and behold the theme is not enabled. Checking it and saving fixes the problem, but every time I run update.php, it gets disabled again.
There is an issue for this bug here: http://drupal.org/node/305653. I tried to apply the patch provided and test, but it didn't seem to do anything.
Comment #4
MMoose commentedEaton, you're absolutely correct! I created a dummy node.tpl.php, which made it so that the more specific node to load!
Thank you!
Would this be considered a bug?
Comment #5
vm commentedit's only a bug if the theme in use didn't come packaged with a node.tpl.php file and the bug should be logged against that project.
you don't mention the theme in use and all core themes for phptemplate have a node.tpl.php file included as far as my quick look can tell.
Comment #6
dvessel commentedI attempted to fix this and failed miserably..
http://drupal.org/node/279573#comment-991171
We need to figure out a new way to resolve theming paths then this can be fixed.
Comment #7
dvessel commentedwhoops
Comment #8
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.