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
When viewing a page with embedded displays of nodes that have pagination enabled and no body field in the requested display, a notice similar to the following is thrown:
Notice: Undefined index: body in pagination_node_view() (line 261 of ..../sites/all/modules/contrib/pagination/pagination.module).
Note that this is not about the body field not being present on the content type, but that it is not present in the view mode being displayed.
Proposed resolution
In pagination_node_view, check if the body field is set.
Remaining tasks
Community Review
Comment | File | Size | Author |
---|---|---|---|
#3 | pagination_node_view-2117719-3.patch | 3.11 KB | FluxSauce |
Comments
Comment #1
raystuart CreditAttribution: raystuart commentedIssue #2117719 by raystuart: Fix undefined body in pagination_node_view.
Comment #2
FluxSauce CreditAttribution: FluxSauce commentedWorks for me.
Comment #3
FluxSauce CreditAttribution: FluxSauce commentedFound one more notice, fixed in attached, please review.