On the D7 test sites, if you go to a forum and then click on a post, you get the following notice-level PHP warning at the top of the page:

Notice: Undefined property: stdClass::$taxonomy in bluecheese_preprocess_node() (line 53 of /var/www/dev/new-drupal_7.redesign.devdrupal.org/htdocs/sites/all/themes/bluecheese/template.php).

CommentFileSizeAuthor
#5 bluecheese-1700596-cleanup.patch1.16 KBjhodgdon

Comments

drumm’s picture

I'd actually like to move as much logic as possible out of template.php and into drupalorg and drupalorg_crosssite module, including this. Having all the taxonomy-affecting code in one place would be great.

(Also, we can't distribute bluecheese due to trademark and branding restrictions. drupalorg is nicer since anyone can check it out of Git.)

jhodgdon’s picture

There are several other similar PHP warnings being generated in bluecheese_preprocess_node() on Project Issue pages:

Notice: Undefined property: stdClass::$taxonomy in bluecheese_preprocess_node() (line 37 of /var/www/dev/project-drupal_7.redesign.devdrupal.org/htdocs/sites/all/themes/bluecheese/template.php).
Warning: Invalid argument supplied for foreach() in bluecheese_preprocess_node() (line 37 of /var/www/dev/project-drupal_7.redesign.devdrupal.org/htdocs/sites/all/themes/bluecheese/template.php).
Notice: Undefined index: taxonomy in bluecheese_preprocess_node() (line 51 of /var/www/dev/project-drupal_7.redesign.devdrupal.org/htdocs/sites/all/themes/bluecheese/template.php).
Warning: Invalid argument supplied for foreach() in bluecheese_linksterms() (line 84 of /var/www/dev/project-drupal_7.redesign.devdrupal.org/htdocs/sites/all/themes/bluecheese/template.php).
Notice: Undefined index: readmore in bluecheese_preprocess_node() (line 54 of /var/www/dev/project-drupal_7.redesign.devdrupal.org/htdocs/sites/all/themes/bluecheese/template.php).

These are all due to bluecheese using D6 taxonomy which isn't going to work...

jhodgdon’s picture

Title: PHP notice on forum topic pages in D7 » PHP notice on various nodes in D7
Assigned: Unassigned » jhodgdon

I'm taking this on...

senpai’s picture

Issue tags: +bluecheese

Tagging for Bluecheese.

jhodgdon’s picture

Assigned: jhodgdon » Unassigned
Status: Active » Needs review
StatusFileSize
new1.16 KB

It looks like a fix for this got committed by drumm yesterday during a merge, but it was slightly messy. Here's a follow-up to clean up the left-over code.

senpai’s picture

Assigned: Unassigned » lewisnyman
Priority: Normal » Minor
Issue tags: +sprint 7

@lewisnyman, can you review and commit this cleanup patch?

lewisnyman’s picture

My eyes tell me this looks good, a simple code clean up. Thanks!

drumm’s picture

Status: Needs review » Fixed

Committed.

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