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.
A new bug was introduced with the code added to render_pane
function for IPE in 7.x-3.10. If the user is attempting to perform in-place editing on the front page of a site, the destination is set to "front". This causes the following error to be thrown:
Notice: Trying to get property of non-object in node_page_title() (line 2200 of /modules/node/node.module).
This can be fixed by checking if the current destination is "front", and skipping the evaluation if it is. Please review the attached patch, or let me know if there's a more appropriate way to fix the problem. Thanks.
Comment | File | Size | Author |
---|---|---|---|
panels-ipe_front_page_error-1.patch | 1.04 KB | ron_s | |
Comments
Comment #2
ron_s CreditAttribution: ron_s commentedRelated patch: https://www.drupal.org/project/panels/issues/2897658
Comment #3
ron_s CreditAttribution: ron_s commentedJust to clarify, this error is seen when using IPE + Mini Panels. The Mini Panels sub-module redirects the user to a separate page to perform modifications, and the page will have a
?destination=front
query string. This is what generates the error.Comment #4
joelpittetThanks for the report @ron_s, I'm a bit leary of the solution, where is 'front' path coming from?
Comment #5
ron_s CreditAttribution: ron_s commentedThe front path is coming from the
_panels_mini_ipe_editor
function in the Mini Panels In-Place Editor module. This provides IPE functionality for mini-panels.It creates a "Return to previous page" button that for the instance when on the front page, will have a destination = "front":
See:
https://git.drupalcode.org/project/panels_mini_ipe/-/blob/7.x-1.x/panels...
https://www.drupal.org/project/panels_mini_ipe
Comment #6
ron_s CreditAttribution: ron_s commentedThis patch still applies cleanly to the new 7.x-3.11 release.
Let me know if I can provide any further information, or if we should take a different approach to resolve this issue.
Comment #7
joelpittetThanks @ron_s, I'll add it to the target for the next release.
Comment #8
joelpittetComment #9
joseph.olstadtriggered more tests