error message when used with zen theme, since zen implements hook_preprocess for menu_link and modifies comment variables, among others. I'm wondering if this can be fixed here, where it might give notice / warning with other themes as well. Not new, this happened earlier than 7.x-1.x-dev (11/10).

Notice: Undefined property: stdClass::$comment_count in zen_preprocess_comment() (line 351 of /PATH/TO/THEMES/zen/template.php).
Notice: Undefined index: class in zen_preprocess_menu_link() (line 621 of /PATH/TO/THEMES/zen/template.php).
Warning: Invalid argument supplied for foreach() in zen_preprocess_menu_link() (line 621 of /PATH/TO/THEMES/zen/template.php).

Comments

agentrickard’s picture

IMO, these are Zen issues. We kicked similar issues to Display Suite.

It is incumbent on Zen to check for variables to be set if those are not normally provided by core.

echoz’s picture

Status: Active » Closed (won't fix)

ok, I'll deal with it over there.

liza’s picture

i don't have any custom preprocesses for ZEN but i have similar error message problem that i've just posted at #2028065: Errors with STYLEGUIDE. could you give it a look and/or maybe comment over there what may be the problem?

thanks!

johnalbin’s picture

Status: Closed (won't fix) » Active

It is incumbent on Zen to check for variables to be set if those are not normally provided by core.

Agreed, BUT… the $variables['node']->comment_count and $variables['element']['#localized_options']['attributes']['class'] are provided by core. It just that the Style Guide module provides fake comments and menu links that lack that data.

malcomio’s picture

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

I can't reproduce this issue using styleguide 7.x-1.x and zen 7.x-5.5 - it may have already been fixed.

Are there any particular steps to reproduce it?