TypeError on paginated admin view

Created on 9 July 2025, 27 days ago

Problem

An error occurs when accessing any pages beyond page 1 in the admin interface of the Protected Pages module on Drupal 11.

TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /app/web/modules/contrib/protected_pages/src/Controller/ProtectedPagesController.php on line 101 in Drupal\Component\Utility\Html::escape() (line 431 of /app/web/core/lib/Drupal/Component/Utility/Html.php).

Steps to reproduce

  1. Navigate to /admin/config/system/protected-pages.
  2. If the list spans multiple pages, attempt to go to page 2 or beyond.

The above error is triggered.

Proposed resolution

The controller attempts to pass a null value to Html::escape(), which expects a string.

Data model changes

🐛 Bug report
Status

Active

Version

1.7

Component

Code

Created by

🇬🇧United Kingdom chandraraj

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

Comments & Activities

Production build 0.71.5 2024