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.
Notice: Trying to get property of non-object in block_class_preprocess_panels_pane() (line 46 of block_class.module).
Comment | File | Size | Author |
---|---|---|---|
#2 | block_class-2696177-2-7.x.patch | 519 bytes | wtrv |
|
Comments
Comment #2
wtrv CreditAttribution: wtrv at Wunder commentedPatch attached
Comment #3
wtrv CreditAttribution: wtrv at Wunder commentedComment #4
DYdave CreditAttribution: DYdave at DAVYIN Internet Solutions / 戴文信息科技有限公司 commented@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.....
Comment #5
wtrv CreditAttribution: wtrv at Wunder commentedHi 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.
Comment #6
DYdave CreditAttribution: DYdave at DAVYIN Internet Solutions / 戴文信息科技有限公司 commentedHi @wtrv,
Thanks a lot for the speedy reply and the additional information.
We definitely greatly appreciate your efforts of contribution to the module.
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.
Comment #7
DYdave CreditAttribution: DYdave at DAVYIN Internet Solutions / 戴文信息科技有限公司 commentedSorry, didn't see 7.x-2.3 is actually the same as the dev atm.
Changing version.
Comment #8
DYdave CreditAttribution: DYdave at DAVYIN Internet Solutions / 戴文信息科技有限公司 commentedComment #9
wtrv CreditAttribution: wtrv at Wunder commentedHi Dave,
Thanks for clarifying.
Panels: 7.x-3.5
Ctools: 7.x-1.9
Comment #10
DYdave CreditAttribution: DYdave at DAVYIN Internet Solutions / 戴文信息科技有限公司 commentedyeah.... @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.
Comment #11
wtrv CreditAttribution: wtrv at Wunder commentedYeah.. 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!
Comment #12
DYdave CreditAttribution: DYdave at DAVYIN Internet Solutions / 戴文信息科技有限公司 commentedSplendid! :)
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!
Comment #13
wtrv CreditAttribution: wtrv at Wunder commentedYeah,
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
Comment #14
wtrv CreditAttribution: wtrv at Wunder commentedComment #15
berenddeboer CreditAttribution: berenddeboer at Xplain Hosting commented