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 the cause of this, but I've started seeing this message recently on my Panopoly test sites.
I did a tiny amount of debugging: apparently the $view in question is the panopoly_demo view, and the $display_id (which isn't being found) is an Array() rather than a proper id (the Array looks like the body field, which is just weird).
I looked at the backtrace for a second and it's coming through Panels - probably one of the Views on the homepage. Not sure what change could have caused this - maybe something new in the views_content module in CTools?
Comment | File | Size | Author |
---|---|---|---|
#1 | 2416775-ctools_wrong_argument_for_views_add_contextual_links.patch | 589 bytes | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedThis issue comes from ctools and therefore it should be moved there but I am leaving it under panopoly for now just so we know about the solution.
FYI: the issue is caused by the foreach loop that uses $display as a name for the value which overrides the already existing $display in the function since foreach will not destroy the variable name(s) after its done.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #3
dsnopek@ivanjaros: Thanks! The patch works for me. Can you open a new issue in CTools and then reference that issue from here? We can then make this issue about applying that CTools patch in our .make file.
Comment #4
dsnopekMarking as Critical because I think this should block the next release (ie. we have to fix it before we can release).
Comment #5
dsnopekTo move things along, I created a new issue in the CTools queue with @ivanjaros' patch:
#2416589: Warning: Illegal offset type en views_add_contextual_links()
I'll get it into Panopoly shortly!
Comment #6
dsnopekCommitted!
Comment #9
labboy0276 CreditAttribution: labboy0276 commentedI am seeing this error again, Panopoly 1.22 Modules installed. We don't have the whole profile installed, just panopoly_core, panopoly_images, panopoly_theme, panopoly_widgets, panopoly_wysiwyg.
Ctools is at 1.7 && views is at 3.11. I can make it going away by changing line 848 of views.module from:
if (empty($view->hide_admin_links)) {
to
if (empty($view->hide_admin_links) && isset($view->display[$display_id])) {
But that seems to just apply a bandaid to the situation.
Comment #10
labboy0276 CreditAttribution: labboy0276 commentedI also just did this:
https://www.drupal.org/node/2559341#comment-10268963