My page-nodetype files aren't overriding. Am I missing something?

SR

CommentFileSizeAuthor
#4 pagetempprepro-1256902-4.patch801 bytesishmael-sanchez
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ishmael-sanchez’s picture

Status: Needs review » Fixed

That's actually not baked into the D7 version of the theme but I just committed a fix to the template.php and tested it on my local machine.

SuperRookie’s picture

Assigned: Unassigned » ishmael-sanchez
Category: support » feature
Status: Active » Fixed

I just implemented the updated template.php file and a couple of things happened. I believe that it now needs page--nodetype.tpl.php files now, as my front page broke until I provided it with one for that content type, and now on any content type that doesn't have its own template I get the following errors:

Notice: Undefined index: node in earthish_preprocess_page() (line 12 of /home/........../template.php).
Notice: Trying to get property of non-object in earthish_preprocess_page() (line 12 of /home/......./template.php).

Any ideas?

SR

ishmael-sanchez’s picture

Status: Fixed » Needs review
ishmael-sanchez’s picture

Status: Fixed » Patch (to be ported)
FileSize
801 bytes

Ok so my preprocess function was hastily created and I didn't account for pages without a node type so I added a condition which makes sure the node object exists before adding this template suggestion. I will commit this fix shortly to the dev branch.

ishmael-sanchez’s picture

Status: Patch (to be ported) » Fixed
SuperRookie’s picture

Worked! Thanks so much! Now for me to spell out that more complicated problem I mentioned earlier.

ishmael-sanchez’s picture

Status: Fixed » Closed (fixed)