Set min and max values for "Maximum number of bundle sub-menus to display"

Created on 12 December 2023, 6 months ago
Updated 3 January 2024, 6 months ago

Problem/Motivation

There should be validation to set minimum and maximum value for the "Maximum number of bundle sub-menus to display" field.

Steps to reproduce

  1. Enable the module "Admin Toolbar Extra Tools"
  2. Go to "/admin/config/user-interface/admin-toolbar-tools"
  3. In the "Maximum number of bundle sub-menus to display" try to enter like 9000, 10000 or -5, -10 and save the form. Currently all values are accepted.

Proposed resolution

Add #min and #max properties to the field "max_bundle_number" in "admin_toolbar/admin_toolbar_tools/src/Form/AdminToolbarToolsSettingsForm.php"

Remaining tasks

Code changes and decision about value for #max.

User interface changes

NA

API changes

NA

Data model changes

NA

🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

🇮🇳India Prashant.c Dharamshala

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

Merge Requests

Comments & Activities

  • Issue created by @Prashant.c
  • 🇮🇳India sidharth_soman Bangalore

    I don't really think there's a need to include the '#max' property since there is already a warning about performance issues given a large number of sub-menus.

    For now, here's a patch with max=500 and min=1.

  • Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update 6 months ago
    Waiting for branch to pass
  • 🇮🇳India Prashant.c Dharamshala
  • Merge request !67Min & Max values → (Open) created by Prashant.c
  • Status changed to Needs review 6 months ago
  • Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update 6 months ago
    Waiting for branch to pass
  • 🇮🇳India Sandeep_k New Delhi

    Verified and tested patch f3408119.patch on Drupal version- 9.5.11-dev. The patch was applied successfully and looks good to me.

    Testing Steps:

    • Enable the module "Admin Toolbar Extra Tools"
    • Go to> admin/config/user-interface/admin-toolbar-tools- Shared before results.
    • Download the shared patch and Apply.
    • Reverify this issue on admin/config/user-interface/admin-toolbar-tools.

    Testing Results:
    f3408119.patch was applied successfully & validations are added now for min (1)and max (500) values.

    Moving this ticket to RTBC.

  • Status changed to RTBC 6 months ago
Production build 0.69.0 2024