I have a new install of pressflow, when I enable basic I receive several errors. Any ideas what may be causing this.
# Notice: Undefined index: node in basic_preprocess_page() (line 44 of /home/mysite/www/sites/all/themes/basic/template.php).
# Notice: Trying to get property of non-object in basic_preprocess_page() (line 44 of /home/mysite/www/sites/all/themes/basic/template.php).
# Notice: Undefined index: node in basic_preprocess_page() (line 104 of /home/mysite/www/sites/all/themes/basic/template.php).
# Notice: Trying to get property of non-object in basic_preprocess_page() (line 104 of /home/mysite/www/sites/all/themes/basic/template.php).
# Notice: Undefined index: node in basic_preprocess_page() (line 107 of /home/mysite/www/sites/all/themes/basic/template.php)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1039962-3_basic-notice-errors.patch | 1.58 KB | lee20 |
Comments
Comment #1
scrambled commentedin case others have this issue, I found help on irc for the template.php file my errors went away
44
if (module_exists('taxonomy') && $vars['node']->nid) {
changed to:
if (module_exists('taxonomy') && !empty($vars['node']->nid)) {
104
if ($vars['node']->type != "") {
changed to:
if (!empty($vars['node']->type)) {
107
if ($vars['node']->nid != "") {
changed to:
if (!empty($vars['node']->nid) != "") {
Comment #2
scrambled commentedline 107 should be:
if (!empty($vars['node']->nid) ) {
Comment #3
lee20 commentedUpdating the title as this is not unique to pressflow.
Attached is a patch that fixes the notices. It also fixes a notice thrown in block.tpl.php when $edit_links is not set.
Comment #4
SteveK commentedcommitted to dev branch. will be in next release.
Comment #6
yngens commentedThis was not fixed and is still happening.
The patch gives:
Comment #7
lil.destro commented