Notice: Undefined property: stdClass::$bid in panels_mini_contextual_links_view_alter() (line 200 /.../modules-d7/panels/panels_mini/panels_mini.module).

Message appears after updating modules to Panels 7.x-3.4 and Chaos tools 7.x-1.4.
It appears once in each block.

CommentFileSizeAuthor
#4 panels-mini-panels-bid-2196091-4.patch857 bytesloziju
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aasarava’s picture

Confirmed that this is happening. For me, it seems to happen on pages that use Views that have block displays instead of pane displays.

The exact use case is needing a Views block to be added to a specific position in content via Display Suite block fields, and then Panels is used on top of that to add other panes around the rendered content.

deanflory’s picture

I too am getting this error but I've only noticed it showing up when running cron manually and ending up on the Status repot page:

Notice: Undefined property: stdClass::$bid in panels_mini_contextual_links_view_alter() (line 200 of /.../sites/all/modules/panels/panels_mini/panels_mini.module

deanflory’s picture

Could this be due to an upgrade in PHP to 5.4 where things are more strict?

I also get this on the Available Updates page.

loziju’s picture

I confirm that I see the same issue. As for the cause, I can't really pinpoint yet, but I have complex layout as mentioned in #1.

Relevant modules installed on my setup are:
panels-7.x-3.4
ctools-7.x-1.4
views-7.x-3.7+23-dev

@deanflory, I use PHP 5.3.14 and still seeing this issue. To me this is just a matter of missing parameter bid in some instances of mini panels.

As I need some commits in panels-7.x-3.4, I just come up with very simple quick workaround, i.e. to check if bid exists. I think properly fixing this should require more effort, but I hope this is sufficient and not disrupting other functionalities for now (except for missing the contextual links).

scjv’s picture

Status: Active » Fixed
loziju’s picture

Status: Fixed » Needs review

Ermm @scjv not sure why you change the status to fixed. Changing this to needs review.

japerry’s picture

Status: Needs review » Fixed

Actually this looks pretty good. We're acting on a views alter, and there is probably a chance that a view won't contain a bid. Fixed!

http://drupalcode.org/project/panels.git/commit/a267233

Status: Fixed » Closed (fixed)

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

Clint Eagar’s picture

patch also worked for me

  • Commit a267233 on 7.x-3.x, 8.x-3.x authored by loziju, committed by japerry:
    Issue #2196091 by loziju, scjv: Add a check on view alters to make sure...
monaw’s picture

Can we simplify the check fix from:

if (isset($element['#element']['#block']) && isset($element['#element']['#block']->bid) && strpos((string) $element['#element']['#block']->bid, 'panels_mini') === 0) {

to:

if (isset($element['#element']['#block']->bid) && strpos((string) $element['#element']['#block']->bid, 'panels_mini') === 0) {

since in the first form the second isset should cover the first right?

kopeboy’s picture

Status: Closed (fixed) » Reviewed & tested by the community

How can this be fixed? I have this version and I'm still seeing this error

kopeboy’s picture

Status: Reviewed & tested by the community » Needs review
kopeboy’s picture

I am having this messages on Panel pages where I place Menus with Style: System block.

Panels is missing block id (bid), but I can find the menus I've placed at admin/structure/blocks so they should have a block id even if they are placed in any region from there.

JKingsnorth’s picture

The committed patch fixes the issue for me.

JKingsnorth’s picture

Status: Needs review » Closed (fixed)

This is fixed in the latest dev so let's set the issue status back.

If anyone wants to improve on it then it would be best to open a new issue =]