Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#8 | undefined_index_in__service_links_link-1372474-8.patch | 565 bytes | progpapa |
Screen Shot 2011-12-15 at 8.10.17 PM.png | 81.34 KB | minorOffense |
Comments
Comment #1
biydng CreditAttribution: biydng commentedI 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?
Comment #2
TheCrow CreditAttribution: TheCrow commentedtry also this: #1334886: Provide a (Panels) custom content type for service links.
Comment #3
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedno the other patch does not solve this issue
Comment #4
Simon Georges CreditAttribution: Simon Georges commentedWhat about the last version (it seems one of the last patches fixed an undefined issue)?
Comment #5
Simon Georges CreditAttribution: Simon Georges commentedComment #6
minorOffense CreditAttribution: minorOffense commentedI'll give it a go this week.
Comment #7
pmackay CreditAttribution: pmackay commentedI'm still getting this issue on the current 7.x-2.x-dev version. Any chance it could be checked again?
Comment #8
progpapa CreditAttribution: progpapa commentedDepending 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:
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.
Comment #9
hpz CreditAttribution: hpz commentedI'm getting this error too, using Panopoly (panels). The given patch works for me.
Comment #10
Simon Georges CreditAttribution: Simon Georges commentedCould I have one more review before committing it?
Comment #11
djdevinFixed for me too. Using panelizer as an organic group homepage.
Comment #13
Simon Georges CreditAttribution: Simon Georges commentedThanks for your feedback, everybody. Committed, yay!