Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Setting "Device Threads" will not be saved correctly #4279

Closed
browniebraun opened this issue May 21, 2021 · 1 comment
Closed

Default Setting "Device Threads" will not be saved correctly #4279

browniebraun opened this issue May 21, 2021 · 1 comment
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@browniebraun
Copy link
Member

Describe the bug

Instead of the real selected value Cacti stores the selected index of the dropdown menu.
But within scripts like /CLI/add_device.php the value will be directly used with

$device_threads = read_config_option('device_threads');

To Reproduce

Set the default number of threads to 4 for example, log in to MySQL and read the value from settings:

select * from settings where name = 'device_threads';

MySQL will return 3 in this case.

Expected behavior

select * from settings where name = 'device_threads' will return 4, not 3.

Bug is in

1.2.16, 17 ...

located in /include/global_settings.php, ~ line 578

'device_threads' => array( 'friendly_name' => __('Device Threads'), 'description' => __('The default number of Device Threads. This is only applicable when using the Spine Data Collector.'), 'method' => 'drop_array', 'default' => '1', 'array' => array(1, 2, 3, 4, 5, 6) ),

'array' => definition should start with index 1 not 0. ( 1=>1, .... )

@browniebraun browniebraun added bug Undesired behaviour unverified Some days we don't have a clue labels May 21, 2021
@TheWitness
Copy link
Member

You do have direct commit access you know ;)

TheWitness added a commit that referenced this issue Jun 25, 2021
Default Setting "Device Threads" will not be saved correctly
@TheWitness TheWitness added resolved A fixed issue and removed unverified Some days we don't have a clue labels Jun 25, 2021
@TheWitness TheWitness added this to the 1.2.18 milestone Jun 25, 2021
@netniV netniV closed this as completed Jun 30, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants