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
Device Location drop down does not always populate correctly #5347
Comments
Check for any browser console level errors. |
Device form location drop down not populating
Not seeing any errors in the browser console. |
Did you update to the latest changes? |
Would it be fixed in 1.2.x branch? I tried the 1.2.x branch at initial install but wasn't able to proceed through the initial installation dialog. I instead checked out the 1.2.24 release and it worked just fine. That's why I am currently running 1.2.24 specifically. |
Nevermind this last post. I missed to do a pull on my git checkout after switching to 1.2.x branch. The latest 1.2.x I can upgrade to just fine now. |
If you check the logs tab, there will be a corresponding error at the same time. If you can provide that detail and the backtrace, that would be most useful. |
Yea, that's a bad error. Might be a plugin. You should disable one at a time and see if that improves things. |
What's you PHP version? |
The error was addressed and should now work properly. |
With that latest fix applied the error no longer occurs. However, the location still doesn't populate. |
So I believe that this is a bug because the settings array does not filter by a specific site. However, this may have been done to allow a speed increase for those systems with a lot of devices, so I created a config option to allow the current functionality to enabled. One side effect is that when creating a new device, it will now shoe all locations where the broken functionality only showed None via the ajax calls. |
Describe the bug
I am running Cacti 1.2.24.
The location table in the device form isn't populating with pre-defined values.
To Reproduce
Define different locations for different devices. Create a new device and the previously defined values won't show in the location drop down to select from.
Expected behavior
Have a choice of locations that have already been defined for other devices
Screenshots
Desktop (please complete the following information)
OS: Windows 11
Browser Edge
Version 113.0.1774.57 (Official build) (64-bit)
Smartphone (please complete the following information)
Additional context
I came across https://forums.cacti.net/viewtopic.php?t=60215 looking for a solution, it provided me some places to look for a solution. Here is what is have in the location column in my host table:
Looking up the SQL query from the forum post it is in
cacti/include/global_form.php
around line 1199. It reads:Running the SQL query on my Cacti install I get:
However the form in the UI with the modern theme does not populate with those values. Here is what I see when editing a device:
And this is what I see for a new device:
Looking at the HTML source of the page using the developer menu, I also only see the 'none' value predefine despite the SQL query returning two values in addition to the empty value.
The text was updated successfully, but these errors were encountered: