Notice: Trying to get property of non-object in block_class_preprocess_panels_pane() (line 46 of block_class.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wtrv created an issue. See original summary.

wtrv’s picture

Patch attached

wtrv’s picture

Status: Active » Needs review
DYdave’s picture

@wtrv

How to reproduce the bug?
Care to elaborate a little bit more than just pasting the notice?

Any relationship with #1386774: Panels and related modules: Compatibility issues....

Talk about really doing the bare minimum.....

wtrv’s picture

Hi Dave,

The bug is happening the instant the Block class module is enabled together with the panels module.

Once the block_class_preprocess_panels_pane function is hit, the notice is thrown because there was no check wether the $var['pane'] variable is indeed an object and $vars['pane']->type is not in fact empty.

It is in fact related to #1386774: Blocks in panel panes, but because of the minor alteration I did not reopen the issue.

I'm still trying to get the hang of this.. so I would appreciate it if you would refrain from such comments in the future.

DYdave’s picture

Hi @wtrv,

Thanks a lot for the speedy reply and the additional information.

We definitely greatly appreciate your efforts of contribution to the module.

so I would appreciate it if you would refrain from such comments in the future.

Nothing personal, just had to let everybody else know that we had very little (almost nothing) on the problem you just reported.

You tagged 7.x-2.3, have you tried testing the issue with block_class-7.x-2.x-dev.
Additionally, I know panels and ctools have been undergoing quite a lot of changes, it would be fantastic if you could please specify the version of the related modules?

Thanks again very much for your reporting/testing, feedback and comments.

DYdave’s picture

Version: 7.x-2.3 » 7.x-2.x-dev
Related issues: +#1386774: Panels and related modules: Compatibility issues

Sorry, didn't see 7.x-2.3 is actually the same as the dev atm.
Changing version.

DYdave’s picture

Assigned: wtrv » Unassigned
Priority: Minor » Normal
wtrv’s picture

Hi Dave,

Thanks for clarifying.

Panels: 7.x-3.5
Ctools: 7.x-1.9

DYdave’s picture

yeah.... @wtrv
sorry again about earlier.... we all have our moods and down times...

If you could potentially test again with corresponding dev versions for panels and ctools it would be awesome and greatly appreciated.

Having a feeling this might not necessarily be a block class-only problem

Thanks again very much for your involvement and help in module's development.

wtrv’s picture

Yeah.. no problem at all man.
I'm just learning the ropes as well :)

You're right in saying it's not really a block class problem.
Did some further testing an noticed that a custom pane was causing the issue. Because the $vars['pane'] object never got set.

The extra check on the variable I added in the patch should therefore not be necessary.
I don't think it's bad practise to have it there, but I'm leaving that up to you.

Thanks for your time and advice!

DYdave’s picture

Splendid! :)

Any idea if there would be a related issue in panels or ctools?
If by any chance you were able to find a related ticket, it would be very helpful if you could please provide a link or even better, update this issue directly with the related one(s) from panels/ctools (see the "Related issues" field, in the "Issue summary & relationships" fieldset, right above the "Files" fieldset).

I agree with you, the extra check wouldn't do any harm and getting this patch committed at some point doesn't seem unlikely.
But I think things will keep on moving on the ctools/panels side, so I guess we will probably have to wait for a bit and see what happens there (at least until their next stable release).
I've been having compatibility issues with panels AND ctools in many block, Views or formatter related modules I've been maintaining.... so I've seen quite a lot of changes going on there.

Anyhow, glad there's no hard feelings, especially for a first impression :P.
We definitely value your help and involvement in the community.
Thanks again!
Cheers!

wtrv’s picture

Yeah,

I fully agree. We should postpone this.
Thanks to you too for keeping up the good work and being such an active member of the community!

Cheers

wtrv’s picture

Status: Needs review » Postponed
berenddeboer’s picture

Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

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