Call to a member function getCurrentPage() on null

Created on 14 March 2025, 25 days ago

Problem/Motivation

When the comment field has ajax pagination enabled, I am seeing the following error:

Error: Call to a member function getCurrentPage() on null in ajax_comments_entity_display_build_alter() (line 366 of modules/contrib/ajax_comments/ajax_comments.module).

Steps to reproduce

  1. Edit the default display for a node type with comments enabled.
  2. Update a Comment field on a node and check "Enable Ajax Comments" and "Use ajax pagination".
  3. Save changes to the node display.
  4. View any node of the updated node type.

Proposed resolution

Update ajax_comments_entity_display_build_alter() to defensively check if there is a pager.

🐛 Bug report
Status

Active

Component

Code

Created by

🇦🇺Australia elimw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024