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?

CommentFileSizeAuthor
#1 2416775-ctools_wrong_argument_for_views_add_contextual_links.patch589 bytesAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Active » Needs work
FileSize
589 bytes

This 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.

Anonymous’s picture

Status: Needs work » Needs review
dsnopek’s picture

@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.

dsnopek’s picture

Priority: Normal » Critical

Marking as Critical because I think this should block the next release (ie. we have to fix it before we can release).

dsnopek’s picture

To 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!

dsnopek’s picture

Status: Needs review » Fixed

Committed!

  • dsnopek committed 9d1015e on 7.x-1.x
    Update Panopoly Core for Issue #2416775 by ivanjaros: Warning: Illegal...

Status: Fixed » Closed (fixed)

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

labboy0276’s picture

I 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.

Error message
Notice: Undefined offset: 1 in views_add_contextual_links() (line 852 of /srv/bindings/fcb6965abad846c9bb18a68343700aa3/code/sites/all/modules/contrib/views/views.module).
Notice: Trying to get property of non-object in views_add_contextual_links() (line 852 of /srv/bindings/fcb6965abad846c9bb18a68343700aa3/code/sites/all/modules/contrib/views/views.module).
Notice: Undefined offset: 1 in metatag_views_post_render() (line 2072 of /srv/bindings/fcb6965abad846c9bb18a68343700aa3/code/sites/all/modules/contrib/metatag/metatag.module).
Notice: Trying to get property of non-object in metatag_views_post_render() (line 2076 of /srv/bindings/fcb6965abad846c9bb18a68343700aa3/code/sites/all/modules/contrib/metatag/metatag.module).
labboy0276’s picture