Views Pager setting 'Items per page' with empty value gives WSOD

Created on 23 January 2025, 4 days ago

Problem/Motivation

When creating a View with a pager, a WSOD appears if the pager setting 'items per page' is left empty.
It leave the view unusable, an a new view must be created to resolve the problem.
The following error is logged:

TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in ...\core\lib\Drupal\Component\Render\FormattableMarkup.php on line 238 in Drupal\Component\Utility\Html::escape() (line 431 of ...\core\lib\Drupal\Component\Utility\Html.php).

Steps to reproduce

- create/edit a view
- open the pager settings, clear the value for 'Items per page', save
- WSOD appears.

Proposed resolution

Make the field required. (perhaps also other fields on the page - I did not test)

Remaining tasks

User interface changes

🐛 Bug report
Status

Active

Version

11.1 🔥

Component

views.module

Created by

🇳🇱Netherlands johnv

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024