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.
Problem/Motivation
I have a site that is using panelizer and the custom_breadcrumbs_panels and I've continually seen the error messages below because the handler does not contain a display variable. The breadcrumbs appear to work even with the Warning/Notice.
Error messages
Notice: Trying to get property of non-object in custom_breadcrumbs_panels_ctools_render_alter() (line 131 of /var/www/html/sites/all/modules/contrib/custom_breadcrumbs/custom_breadcrumbs_panels/custom_breadcrumbs_panels.module).
Warning: Invalid argument supplied for foreach() in custom_breadcrumbs_panels_ctools_render_alter() (line 131 of /var/www/html/it/sites/all/modules/contrib/custom_breadcrumbs/custom_breadcrumbs_panels/custom_breadcrumbs_panels.module).
Proposed resolution
Check that the $handler->conf['display'] exists before trying to reference it.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2848472_check-handler_1.patch | 970 bytes | zipymonkey |
Comments
Comment #2
zipymonkey CreditAttribution: zipymonkey commentedCreated a patch to check that the $handler->conf['display'] exists before referencing it.
Comment #3
zipymonkey CreditAttribution: zipymonkey commentedComment #4
renatogHi people.
I applied the patch and works good for me.
Before:
After:
Thank you very much @zipymonkey.
Good Work.
Regards.
Comment #6
renatogFixed.
Commited in dev branch.
Thank you very much for your contribution @zipymonkey.
Good Work.
Regards.