Editing devices by using dropdown fields not possible after upgrade to Netbox v3 #5447

Closed
opened 2025-12-29 19:28:10 +01:00 by adam · 14 comments
Owner

Originally created by @buenyX on GitHub (Sep 30, 2021).

NetBox version

v3.0.4

Python version

3.8

Steps to Reproduce

  1. Upgrade from Netbox v2.11.12 to v3.0.3
  2. Select an existing device and click edit ( /dcim/devices/<ID>/edit/ )
  3. Try to change any dropdown value like "Device role", "Device type", "Site" or "Position"
  4. The dropdown menu appears but you can only select the already selected and set option and ------- to unset the value

Expected Behavior

You should be able to change the values in the dropdown menu to some other value

Observed Behavior

You can only select the current option or unset the current option / value by selecting -------.

For example we have multiple device roles but I can only select the current one. Here's a screenshot of this behavior:
image

In the developer tools I see an error for the CSRF token:
image

But the CSRF token seems to be set according to the source code:
image

Originally created by @buenyX on GitHub (Sep 30, 2021). ### NetBox version v3.0.4 ### Python version 3.8 ### Steps to Reproduce 1. Upgrade from Netbox v2.11.12 to v3.0.3 2. Select an existing device and click edit ( ``/dcim/devices/<ID>/edit/`` ) 3. Try to change any dropdown value like "Device role", "Device type", "Site" or "Position" 4. The dropdown menu appears but you can only select the already selected and set option and ``-------`` to unset the value ### Expected Behavior You should be able to change the values in the dropdown menu to some other value ### Observed Behavior You can only select the current option or unset the current option / value by selecting ``-------``. For example we have multiple device roles but I can only select the current one. Here's a screenshot of this behavior: ![image](https://user-images.githubusercontent.com/10811719/135456782-356e2fc5-21fb-4365-acc2-00ac001ba219.png) In the developer tools I see an error for the CSRF token: ![image](https://user-images.githubusercontent.com/10811719/135457027-18b2ddc8-619c-48cd-a7df-35e69162a976.png) But the CSRF token seems to be set according to the source code: ![image](https://user-images.githubusercontent.com/10811719/135457220-eb1f30b6-bcc5-44a8-b34f-0122ace03e53.png)
adam added the type: bugstatus: revisions needed labels 2025-12-29 19:28:10 +01:00
adam closed this issue 2025-12-29 19:28:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 30, 2021):

Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.0.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.

@jeremystretch commented on GitHub (Sep 30, 2021): Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.0.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

@buenyX commented on GitHub (Sep 30, 2021):

Thanks for your answer & great job @jeremystretch.
I can confirm that I'm using version 3.0.4 and the issue exists there (upgraded from 3.0.3 to 3.0.4 just today to see if the issue is fixed but it is not).

Unfortunately I can't provide you any details for a clean installation, it happened on our production installation.

@buenyX commented on GitHub (Sep 30, 2021): Thanks for your answer & great job @jeremystretch. I can confirm that I'm using version 3.0.4 and the issue exists there (upgraded from 3.0.3 to 3.0.4 just today to see if the issue is fixed but it is not). Unfortunately I can't provide you any details for a clean installation, it happened on our production installation.
Author
Owner

@ziggekatten commented on GitHub (Sep 30, 2021):

Missing static stuff?

Run a ./manage.py collectstatic

Reset cache in your browser.

Solved an similar issue when we upgraded from 2.11

@ziggekatten commented on GitHub (Sep 30, 2021): Missing static stuff? Run a ./manage.py collectstatic Reset cache in your browser. Solved an similar issue when we upgraded from 2.11
Author
Owner

@buenyX commented on GitHub (Sep 30, 2021):

Thanks for your hint but that did nothing :/

(venv) root@netbox:/opt/netbox# python3 /opt/netbox/netbox/manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings:

    /opt/netbox/netbox/static

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

0 static files copied to '/opt/netbox/netbox/static', 429 unmodified.

Everyone in the company does have the same problem, so the browser cache shouldn't be a problem here.
Anyway I've tried a new browser session with everything cleaned up but that also did not work.

@buenyX commented on GitHub (Sep 30, 2021): Thanks for your hint but that did nothing :/ ``` (venv) root@netbox:/opt/netbox# python3 /opt/netbox/netbox/manage.py collectstatic You have requested to collect static files at the destination location as specified in your settings: /opt/netbox/netbox/static This will overwrite existing files! Are you sure you want to do this? Type 'yes' to continue, or 'no' to cancel: yes 0 static files copied to '/opt/netbox/netbox/static', 429 unmodified. ``` Everyone in the company does have the same problem, so the browser cache shouldn't be a problem here. Anyway I've tried a new browser session with everything cleaned up but that also did not work.
Author
Owner

@jeremystretch commented on GitHub (Sep 30, 2021):

What requests does your browser show when you open the page? Open the developer console (F12) and select the network tab, then refresh the page. You should see the initial request for the UI view followed by several REST API requests. What is the response status of each?

@jeremystretch commented on GitHub (Sep 30, 2021): What requests does your browser show when you open the page? Open the developer console (F12) and select the network tab, then refresh the page. You should see the initial request for the UI view followed by several REST API requests. What is the response status of each?
Author
Owner

@buenyX commented on GitHub (Sep 30, 2021):

Every request is responded with a 200 OK but I don't see any REST API requests..

All requests:
image

Display options under the GET request for .../edit
image

@buenyX commented on GitHub (Sep 30, 2021): Every request is responded with a 200 OK but I don't see any REST API requests.. All requests: ![image](https://user-images.githubusercontent.com/10811719/135489629-4dbec08d-643b-4c61-a064-73b72c4ad2f4.png) Display options under the GET request for .../edit ![image](https://user-images.githubusercontent.com/10811719/135489460-d3d833bd-ffa2-44b1-aa27-229eb4cbaf7f.png)
Author
Owner

@ziggekatten commented on GitHub (Sep 30, 2021):

Hold on here. 0 files copied? Did you answer yes?

@ziggekatten commented on GitHub (Sep 30, 2021): Hold on here. 0 files copied? Did you answer yes?
Author
Owner

@jeremystretch commented on GitHub (Sep 30, 2021):

collectstatic will only copy modified files by default.

@jeremystretch commented on GitHub (Sep 30, 2021): `collectstatic` will only copy modified files by default.
Author
Owner

@ziggekatten commented on GitHub (Sep 30, 2021):

This is not my experience. If I run the command it always copies files. Just did a test on an existing installation, 406 files copied. And running it again showed the same.

@ziggekatten commented on GitHub (Sep 30, 2021): This is not my experience. If I run the command it always copies files. Just did a test on an existing installation, 406 files copied. And running it again showed the same.
Author
Owner

@jeremystretch commented on GitHub (Sep 30, 2021):

Not sure what to tell you. This is how it works for me.

$ ./manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings:

    /opt/netbox/netbox/static

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

210 static files copied to '/opt/netbox/netbox/static', 215 unmodified.
$ ./manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings:

    /opt/netbox/netbox/static

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

0 static files copied to '/opt/netbox/netbox/static', 425 unmodified.
@jeremystretch commented on GitHub (Sep 30, 2021): Not sure what to tell you. This is how it works for me. ``` $ ./manage.py collectstatic You have requested to collect static files at the destination location as specified in your settings: /opt/netbox/netbox/static This will overwrite existing files! Are you sure you want to do this? Type 'yes' to continue, or 'no' to cancel: yes 210 static files copied to '/opt/netbox/netbox/static', 215 unmodified. $ ./manage.py collectstatic You have requested to collect static files at the destination location as specified in your settings: /opt/netbox/netbox/static This will overwrite existing files! Are you sure you want to do this? Type 'yes' to continue, or 'no' to cancel: yes 0 static files copied to '/opt/netbox/netbox/static', 425 unmodified. ```
Author
Owner

@buenyX commented on GitHub (Sep 30, 2021):

Hold on here. 0 files copied? Did you answer yes?

Yes, I did answer it with a yes

@buenyX commented on GitHub (Sep 30, 2021): > Hold on here. 0 files copied? Did you answer yes? Yes, I did answer it with a yes
Author
Owner

@jeremystretch commented on GitHub (Oct 6, 2021):

@buenyX have you had any luck with this? I'm afraid there's not much more we can do to help absent instructions that can reproduce the issue.

@jeremystretch commented on GitHub (Oct 6, 2021): @buenyX have you had any luck with this? I'm afraid there's not much more we can do to help absent instructions that can reproduce the issue.
Author
Owner

@buenyX commented on GitHub (Oct 7, 2021):

Unfortuantely not but I'll try to dig more into this when I have some time.

Are there any steps that you would recommend to start the analyze?
Maybe somewhere specific in the database or some commands via CLI?

I could upload our database to you if it would help to reproduce the issue.

@buenyX commented on GitHub (Oct 7, 2021): Unfortuantely not but I'll try to dig more into this when I have some time. Are there any steps that you would recommend to start the analyze? Maybe somewhere specific in the database or some commands via CLI? I could upload our database to you if it would help to reproduce the issue.
Author
Owner

@jeremystretch commented on GitHub (Oct 7, 2021):

Ok, I'm going to move this to a discussion as it's not currently reproducible.

@jeremystretch commented on GitHub (Oct 7, 2021): Ok, I'm going to move this to a discussion as it's not currently reproducible.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5447