After upgrading from 2.40-rc1 to the last version 2.41 I get the following warnings:

Notice: Undefined property: stdClass::$field_oa_section in oa_toolbar_oa_space_menu_content_type_render() (line 85 of /var/www/html/profiles/openatrium/modules/apps/oa_toolbar/plugins/content_types/oa_space_menu.inc).
Notice: Undefined variable: icon in oa_toolbar_oa_space_menu_content_type_render() (line 114 of /var/www/html/profiles/openatrium/modules/apps/oa_toolbar/plugins/content_types/oa_space_menu.inc).

The problem only appears when I have the space menu enabled with a custom link to a node.
The problem disappears when I disable the custom link (About tab, see attached) and leave only document_section tabs.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hosais’s picture

I have the same warning. To be more specific, in my site, when the space menu is enabled:

Has the warning:
When the content which is NOT section page and their parent is GROUP MENU (root and not section page).

NOT has the warning:
If the content is the child of section in the GROUP MENU, even it is enabled in menu link.

nagy.balint’s picture

Status: Active » Needs review
FileSize
3.64 KB

I have the same issue, and this patch should fix the issue.

The issue happens because that menu also contains items that are not sections. And so in my case there was a space, and a ctools context, none of which had that field of course. So i put the issets in, and also the $icon variable should be initialized to empty before the if because otherwise it will be an undefined variable in those cases.

Apply the patch in oa_toolbar module in profiles/openatrium/modules/apps/oa_toolbar

mpotter’s picture

Status: Needs review » Fixed

Thanks for the patch! Committed to 79c0fda.

Status: Fixed » Closed (fixed)

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