- Issue created by @johnv
- 🇳🇿New Zealand quietone
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies → .
I have raised a Merge Request (MR) to address the TypeError that occurs when in view Items per page is left empty. This issue was causing unexpected behavior, and the MR ensures proper handling of such cases to prevent errors.
- 🇳🇱Netherlands johnv
The issue 🐛 Implement constraints for Pager config Active contains a directive to use constraints, rather than if-then constructions.
if (is_null($value)) {$value = '';}
can be shorter with$value ??= 0;
. Setting 0 since we expect integers. - First commit to issue fork.
- Merge request !11050Added Required attribute in pager options form in views → (Open) created by Unnamed author
- 🇮🇳India niranjan_panem Gurugram
I added the required attribute in pager options form in views below is the patchhttps://git.drupalcode.org/project/drupal/-/merge_requests/11050.patch
- 🇳🇱Netherlands johnv
Thank you ,
whenever you create a patch/MR for an issue, you may set the issue status to 'Needs review'
it seems your MR contains too much code.These changes in buildOptionsForm(&$form, ..) are not necessary, since $form is returned by reference.
core/modules/views/src/Plugin/views/pager/Full.php | 1 + core/modules/views/src/Plugin/views/pager/Mini.php | 1 + core/modules/views/src/Plugin/views/pager/Some.php | 1 +
You will not need to create/change buildOptionsForm() for the follwing, since they will inherit from SqlBase
core/modules/views/src/Plugin/views/pager/Full.php core/modules/views/src/Plugin/views/pager/Mini.php
So, you will only need to duplicate the changes from Some.php to SqlBase.php
core/modules/views/src/Plugin/views/pager/Some.php
I will now set the issue status to 'Needs work'.
The Needs Review Queue Bot → tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.