url_querystring.core_override setting can be null

Created on 20 September 2023, about 1 year ago

Problem/Motivation

Since Pagerer 8.x-2.0 it is possible to override Drupal core's querystring so to use dots instead of commas

My pagerer.settings.yml does not have the `url_querystring` parameters, I have no idea why the settings were not exported following the `pagerer_update_8211`

Either way , when upgrading to Pagerer 3.0, which has stricter type checking, I get the following error:
TypeError: Cannot assign null to property Drupal\pagerer\PagererParameters::$querystringOverride of type bool in Drupal\pagerer\PagererParameters->__construct()

The constructor for PagererParameters and PagererManager both assume `url_querystring.core_override` contains a valid boolean value and do not provide a default.

Now I realise everything has been done to make sure these `url_querystring` settings are present on all installations, but in these is there a reason the constructors for PagererParameters and PagererManager couldn't set a default value for `core_override` (which they do for some of the other `url_querystring` properties)?? Anyway I'm putting this patch in to temporarily resolve the issue for myself while I deploy the updated settings.

Steps to reproduce

Install version 2.0 of the module
Remove all `url_querystring` settings from the site and re-import the config
Upgrade to version 3.0

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom kalpaitch

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

Comments & Activities

Production build 0.71.5 2024