Skip to content

Ensure the Rows Per Page option shows limitations set by configuration #5413

Closed

Description

@esundberg

Describe the bug

Number of rows per page not showing the option to select above 750 rows. Ubuntu 22.04.2, PHP 8.1.2-1

"global_arrays.php"
$item_rows = array(
10 => '10',
15 => '15',
16 => '16',
17 => '17',
18 => '18',
19 => '19',
20 => '20',
21 => '21',
22 => '22',
23 => '23',
24 => '24',
25 => '25',
26 => '26',
27 => '27',
30 => '30',
40 => '40',
44 => '44',
45 => '45',
50 => '50',
100 => '100',
250 => '250',
500 => '500',
750 => '750',
1000 => '1000',
2000 => '2000',
3000 => '3000',
4000 => '4000',
5000 => '5000',
);

However on the setting page the largest number of rows I can select is 750
image

In
'num_rows_table' => array(
'friendly_name' => __('Rows Per Page'),
'description' => __('The default number of rows to display on for a table.'),
'method' => 'drop_array',
'default' => '30',
'array' => $item_rows

At the bottom of the file I printed a debug of $item_rows and recieved the following.
print "Debug
";
print_r($item_rows);
Printing the values of
image

To Reproduce

Steps to reproduce the behavior:

Go to Settings > Visual > Rows Per Page and I only see 750.

Expected behavior

You should see up to 5000

Screenshots

Attached

Desktop (please complete the following information)

  • OS: Windows 10

  • Browser Chrome

  • Version 114.0.5735.248

Additional context

Might be related to the following.
CHANGELOG:-issue#3349: Prevent setting the PHP variable max_input_vars since it is read only
CHANGELOG:-issue#2936: Installer will loop when number of tables exceeds PHP's max_input_vars limit
CHANGELOG:-feature: Adjust the max table rows based upon value of 'max_input_vars'

Activity

  1. esundberg commented on Jul 22, 2023

    @esundberg
    Author

    Hitting a Max_input_vars limit in PHP.

    vi /etc/php/8.1/apache2/php.ini
    Find the following line, uncomment and change the value to more than the max+1
    ; How many GET/POST/COOKIE input variables may be accepted
    max_input_vars = 5001

    Restart Apache (systemctl restart apache2)

    This should probably be an installation check saying that you will be limited to the number of rows per page unless to change this value.

  2. netniV commented on Jul 23, 2023

    @netniV
    Member

    I've added an extra line of text to the help of the field that shows the current value, but anything above the setting - 20 is automatically removed to ensure we have enough fields to handle submissions.

  3. changed the title [-]Rows Per Page - Not all options are available[/-] [+]Ensure the Rows Per Page option shows limitations set by configuration[/+] on Sep 3, 2023
  4. added this to the v1.2.25 milestone on Sep 4, 2023
  5. locked and limited conversation to collaborators on Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourstatus:needs-verificationNamespaced Cacti workflow labeltype:bugNamespaced Cacti workflow labelunverifiedSome days we don't have a clue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions