Dropdowns for all forms appear empty after upgrade #10409

Closed
opened 2025-12-29 21:31:06 +01:00 by adam · 4 comments
Owner

Originally created by @ethnt on GitHub (Oct 27, 2024).

Deployment Type

Self-hosted

Triage priority

N/A

NetBox Version

v4.1.3

Python Version

3.12

Steps to Reproduce

  1. Beginning on v3.7.8, add data (device roles, for example)
  2. Upgrade to v4.1.3
  3. Attempt to create a device using the previously created device role

Expected Behavior

The dropdowns should be populated with the corresponding data.

Observed Behavior

Dropdowns are empty, despite having data available.

CleanShot 2024-10-27 at 00 03 08@2x
CleanShot 2024-10-27 at 00 03 45@2x

Originally created by @ethnt on GitHub (Oct 27, 2024). ### Deployment Type Self-hosted ### Triage priority N/A ### NetBox Version v4.1.3 ### Python Version 3.12 ### Steps to Reproduce 1. Beginning on v3.7.8, add data (device roles, for example) 2. Upgrade to v4.1.3 3. Attempt to create a device using the previously created device role ### Expected Behavior The dropdowns should be populated with the corresponding data. ### Observed Behavior Dropdowns are empty, despite having data available. ![CleanShot 2024-10-27 at 00 03 08@2x](https://github.com/user-attachments/assets/9423a9f8-7b12-40d9-a31a-bd9d4604ecfa) ![CleanShot 2024-10-27 at 00 03 45@2x](https://github.com/user-attachments/assets/134e2e11-7ee8-45ca-98f9-787a45f83e7e)
adam closed this issue 2025-12-29 21:31:06 +01:00
Author
Owner

@arthanson commented on GitHub (Oct 29, 2024):

@ethnt I think there is something else going wrong here, I just did a test upgrade from v3.7 to v4.1.5 and it works fine (see screenshot). The drop-downs get their data from the REST API so it might possibly be something wrong with that - maybe go to the REST API explorer (link at the bottom of the NetBox UI - the small icons - see second screenshot).

It might be better to close this issue and open it up as a discussion as it will be to the larger community and they might have more suggestions.

Add a new device | NetBox 2024-10-29 11-28-08
Devices | NetBox 2024-10-29 11-30-45

@arthanson commented on GitHub (Oct 29, 2024): @ethnt I think there is something else going wrong here, I just did a test upgrade from v3.7 to v4.1.5 and it works fine (see screenshot). The drop-downs get their data from the REST API so it might possibly be something wrong with that - maybe go to the REST API explorer (link at the bottom of the NetBox UI - the small icons - see second screenshot). It might be better to close this issue and open it up as a discussion as it will be to the larger community and they might have more suggestions. ![Add a new device | NetBox 2024-10-29 11-28-08](https://github.com/user-attachments/assets/89819876-8d4a-430b-9ee0-8a23c3149f4e) ![Devices | NetBox 2024-10-29 11-30-45](https://github.com/user-attachments/assets/2c090b00-9b18-411f-b036-68f6c42cd422)
Author
Owner

@99-lives commented on GitHub (Nov 4, 2024):

Hello,

I'm experiencing the same issue here, but on a completely fresh Netbox docker install.

  • Netbox version: v4.1.6
  • netbox-docker version: 3.0.2
  • PostgreSQL: v16

I've created a single Site, but when I go to create a Rack, I cannot select my Site from the dropdown. The same is for Site to Tennant, or Site to Region. No dropdowns that relate to other objects are populating.
However, when I use the object selector when creating a Rack, it is able to find my Site. But when I select the Site, nothing happens on the web form, and a Javascript error is logged to the console. That error is:

netbox.js?v=4.1.6:20  Uncaught TypeError: Cannot read properties of undefined (reading 'setData')
    at _q (netbox.js?v=4.1.6:20:37103)
    at HTMLAnchorElement.<anonymous> (netbox.js?v=4.1.6:20:37267)
_q @ netbox.js?v=4.1.6:20
(anonymous) @ netbox.js?v=4.1.6:20
  • I've checked the Network tab in the browser dev tools, and all requests succeed.
  • I can use the REST API Explorer to find my Site, and other objects, without issue.
  • The issue is the same in Microsoft Edge, Chrome, and Firefox.

If there's anything more I can do to provide debug information, please let me know.

Cheers.

@99-lives commented on GitHub (Nov 4, 2024): Hello, I'm experiencing the same issue here, but on a completely fresh Netbox docker install. - Netbox version: v4.1.6 - netbox-docker version: 3.0.2 - PostgreSQL: v16 I've created a single Site, but when I go to create a Rack, I cannot select my Site from the dropdown. The same is for Site to Tennant, or Site to Region. No dropdowns that relate to other objects are populating. However, when I use the object selector when creating a Rack, it is able to find my Site. But when I select the Site, nothing happens on the web form, and a Javascript error is logged to the console. That error is: ``` netbox.js?v=4.1.6:20 Uncaught TypeError: Cannot read properties of undefined (reading 'setData') at _q (netbox.js?v=4.1.6:20:37103) at HTMLAnchorElement.<anonymous> (netbox.js?v=4.1.6:20:37267) _q @ netbox.js?v=4.1.6:20 (anonymous) @ netbox.js?v=4.1.6:20 ``` - I've checked the Network tab in the browser dev tools, and all requests succeed. - I can use the REST API Explorer to find my Site, and other objects, without issue. - The issue is the same in Microsoft Edge, Chrome, and Firefox. If there's anything more I can do to provide debug information, please let me know. Cheers.
Author
Owner

@99-lives commented on GitHub (Nov 6, 2024):

Update. Looking at the demo site, I can see that Netbox is making an API call when selecting a dropdown that relates to other objects. It doesn't prepopulate the dropdown on page load.

This API call does not happen on my deployment. Netbox never attempts any API calls to populate the dropdowns. This makes me think it's a Javascript issue somewhere.

@99-lives commented on GitHub (Nov 6, 2024): Update. Looking at the demo site, I can see that Netbox is making an API call when selecting a dropdown that relates to other objects. It doesn't prepopulate the dropdown on page load. This API call does _not_ happen on my deployment. Netbox never attempts any API calls to populate the dropdowns. This makes me think it's a Javascript issue somewhere.
Author
Owner

@99-lives commented on GitHub (Nov 7, 2024):

Just fixed it by regenerating static files. It seems that that process wasn't completing properly. Probably worth investigating further, but now that I'm working, I'm happy.

@99-lives commented on GitHub (Nov 7, 2024): Just fixed it by regenerating static files. It seems that that process wasn't completing properly. Probably worth investigating further, but now that I'm working, I'm happy.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10409