$vars['node'] doesn't exist in html5_base_preprocess_page. See lines 62, 145, 148.
Also, on that note, I'm fairly sure core does a lot of the template suggestions itself, not sure we need all of that.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | notice.patch | 8.55 KB | sreynen |
Comments
Comment #1
mason@thecodingdesigner.com commentedNot sure what you mean about $vars['node'] not existing. It's there when I do a dsm($vars). As for lines 145 and 148. I believe core provides template suggestions for node.tpl.php based on type and nid, but not for page.tpl.php. oh, scratch that. Core suggests page templates for nid, but not node type. I can kill the second one.
Comment #2
tim.plunkettWith E_NOTICE enabled, I get this on every page:
If you go to example.com/user,
html5_base_preprocess_pageis called, but there would be no$vars['node'].template_preprocess_page uses
menu_get_object(), but also usesisset($vars['node'])throughout.Comment #3
sreynen commentedAttached patch adds some isset($vars['node']) to fix these notices. I also fixed some coding standards issues (indentation and comment style) while I was at it.
Comment #4
mason@thecodingdesigner.com commentedLooks good. I applied the patch and removed that redundant template suggestion.