Hello,

Whenever I try to access the printer friendly page (generated by http://drupal.org/project/print ) for a panel node with a view in it, I get the error in the title. Inspecting the $element array I've noticed that there is never a '#links' key in there. Shouldn't that key be '#contextual_links' instead?

Comments

Anonymous’s picture

Hi, am having same problem, did you find a solution?

stefan vaduva’s picture

Yes, on sites/all/modules/panels/panels.module line 1229 change #links with #contextual_links

[edit]
Please ignore my hack and see comment #3 bellow. Thanks Merlinofchaos.
[/edit]

merlinofchaos’s picture

That fix is not correct; while it resolves the notice, it actually destroys the rendering of contextual links.

Instead, the += should be surrounded with a if (!empty($element['#links'])) which I guess can happen if for some reason the contextual links did not render (perhaps for access reasons?)

peacog’s picture

Thanks for this fix. I've rolled a patch for it.

duit’s picture

Thanks all:-)

merlinofchaos’s picture

Status: Active » Fixed

Committed and pushed (though when attaching a patch, set the status to 'needs review' to ensure patches are mroe easily seen)

Status: Fixed » Closed (fixed)

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

  • Commit 535ac5f on 7.x-3.x, 7.x-3.x-i18n, 8.x-3.x by merlinofchaos:
    Issue #1803720 by Peacog and Stefan Vaduva: Fix for unsupported operand...