Cable creation drop-downs not filtering for possible values #4163

Closed
opened 2025-12-29 18:33:33 +01:00 by adam · 4 comments
Owner

Originally created by @4xoc on GitHub (Oct 5, 2020).

Environment

  • Python version: 3.7.9
  • NetBox version: > 2.9.x (tested with 2.9.2 & 2.9.4)
  • Docker image: netboxcommunity/netbox:v2.9.2-ldap & netboxcommunity/netbox:v2.9.4-ldap

Steps to Reproduce

  1. upgrade to any version > 2.9
  2. try to create a new cable connection
  3. select a device
  4. select an interface

Expected Behavior

"Device" drop-down shows devices of the same rack. After device is selected "Name" shows a list of interfaces and allows selecting only non-connected interfaces.

Observed Behavior

The possible values for the "Device" aren't filtered by the same rack as they used to. After selecting a device, the drop down list for interfaces lists all interfaces that exist across any device. Selecting any interface that is called the same way causes an error when creating the connection. It looks like one has to select the right "eth0" for the device out of a list of many but without any way of knowing.

I've compared the API requests made on the cable creating page with a v2.7.8 and found that the api requests on v2.9.x don't include any filters like device_id. Looking through the commits I assume https://github.com/netbox-community/netbox/pull/4987 has caused this but this is more or less a guess.

Originally created by @4xoc on GitHub (Oct 5, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.7.9 * NetBox version: > 2.9.x (tested with 2.9.2 & 2.9.4) * Docker image: netboxcommunity/netbox:v2.9.2-ldap & netboxcommunity/netbox:v2.9.4-ldap <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. upgrade to any version > 2.9 2. try to create a new cable connection 3. select a device 4. select an interface <!-- What did you expect to happen? --> ### Expected Behavior "Device" drop-down shows devices of the same rack. After device is selected "Name" shows a list of interfaces and allows selecting only non-connected interfaces. <!-- What happened instead? --> ### Observed Behavior The possible values for the "Device" aren't filtered by the same rack as they used to. After selecting a device, the drop down list for interfaces lists *all* interfaces that exist across any device. Selecting any interface that is called the same way causes an error when creating the connection. It looks like one has to select the right "eth0" for the device out of a list of many but without any way of knowing. I've compared the API requests made on the cable creating page with a v2.7.8 and found that the api requests on v2.9.x don't include any filters like device_id. Looking through the commits I assume https://github.com/netbox-community/netbox/pull/4987 has caused this but this is more or less a guess.
adam closed this issue 2025-12-29 18:33:33 +01:00
Author
Owner

@DanSheps commented on GitHub (Oct 5, 2020):

Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v2.9.4. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.

@DanSheps commented on GitHub (Oct 5, 2020): Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v2.9.4. Please re-confirm the reported behavior on the current stable release and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. Remember to include the steps taken to create any initial objects or other data.
Author
Owner

@4xoc commented on GitHub (Oct 6, 2020):

You're absolutely right it works fine and turned out to be a misconfiguration on my side.

@4xoc commented on GitHub (Oct 6, 2020): You're absolutely right it works fine and turned out to be a misconfiguration on my side.
Author
Owner

@JLundqvist commented on GitHub (Oct 8, 2020):

You're absolutely right it works fine and turned out to be a misconfiguration on my side.

I'm experiencing the exact same problem as described. How did you fix it?

@JLundqvist commented on GitHub (Oct 8, 2020): > You're absolutely right it works fine and turned out to be a misconfiguration on my side. I'm experiencing the exact same problem as described. How did you fix it?
Author
Owner

@4xoc commented on GitHub (Oct 8, 2020):

The problem was with an old version of the forms2.js being served. Reason for me was an issue with the nginx used to serve older static files. Check out where you're serving those files from and if you have something that gives you old, cached data.

@4xoc commented on GitHub (Oct 8, 2020): The problem was with an old version of the forms2.js being served. Reason for me was an issue with the nginx used to serve older static files. Check out where you're serving those files from and if you have something that gives you old, cached data.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4163