I'm not sure if it's related to Panels or if it's because there aren't any other node links, but this line:

      $node->content['links']['node']['#links'] = array_merge($node->content['links']['node']['#links'], $links);

is looking for a sub array "node" which doesn't exist. The #links array is in

$node->content['links']['#links']

I've included a snapshot of the node object to review. I can supply a patch, but I don't know if this issue is specifically with Panels, and if so, how to detect Panels to fix it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

biydng’s picture

I am seeing this error along with another one related when showing nodes associated with an OG group through panel:

Notice: Undefined index: node in _service_links_link() (line 191 of /home/biydng/public_html/sites/all/modules/service_links/service_links.module).
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in _service_links_link() (line 191 of /home/biydng/public_html/sites/all/modules/service_links/service_links.module).

Did you fix your error?

TheCrow’s picture

SocialNicheGuru’s picture

no the other patch does not solve this issue

Simon Georges’s picture

What about the last version (it seems one of the last patches fixed an undefined issue)?

Simon Georges’s picture

Status: Active » Postponed (maintainer needs more info)
minorOffense’s picture

I'll give it a go this week.

pmackay’s picture

I'm still getting this issue on the current 7.x-2.x-dev version. Any chance it could be checked again?

progpapa’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs review
FileSize
565 bytes

Depending on what exaclty calls hook_node_view, $node->content['links']['node']['#links'] in _service_links_link() might or might not exist.

I'm using panels and displaying a field in a pane. Here's the backtrace:

#0 path_to_drupal\sites\all\modules\contrib\service_links\service_links.module(146): _service_links_link(Object(stdClass), 'full')
#1 [internal function]: service_links_node_view(Object(stdClass), 'full', 'en')
#2 path_to_drupal\includes\module.inc(895): call_user_func_array('service_links_n...', Array)
#3 path_to_drupal\sites\all\modules\contrib\ctools\plugins\content_types\entity_context\entity_field_extra.inc(105): module_invoke_all('node_view', Object(stdClass)

see: ctools_entity_field_extra_content_type_render

Maybe you could check if $node->content['links']['node']['#links'] is set before using array_merge or use a foreach loop.

hpz’s picture

I'm getting this error too, using Panopoly (panels). The given patch works for me.

Simon Georges’s picture

Could I have one more review before committing it?

djdevin’s picture

Status: Needs review » Reviewed & tested by the community

Fixed for me too. Using panelizer as an organic group homepage.

Simon Georges’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your feedback, everybody. Committed, yay!

Status: Fixed » Closed (fixed)

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