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)

CommentFileSizeAuthor
#3 1039962-3_basic-notice-errors.patch1.58 KBlee20

Comments

scrambled’s picture

in 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) != "") {

scrambled’s picture

line 107 should be:
if (!empty($vars['node']->nid) ) {

lee20’s picture

Title: pressflow error with basic » Fix Notice Errors
Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.58 KB

Updating 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.

SteveK’s picture

Status: Needs review » Fixed

committed to dev branch. will be in next release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

yngens’s picture

Status: Closed (fixed) » Active

This was not fixed and is still happening.

The patch gives:

patch < *patch
patching file template.php
Hunk #2 succeeded at 102 (offset 1 line).
Hunk #3 FAILED at 423.
1 out of 3 hunks FAILED -- saving rejects to file template.php.rej
can't find file to patch at input line 37
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|Index: templates/block.tpl.php
|===================================================================
|--- templates/block.tpl.php	(revision 169)
|+++ templates/block.tpl.php	(working copy)
--------------------------
File to patch: 
lil.destro’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)