DEFAULT_USER_PREFERENCES.tables not applied on Reset or on anonymous dashboard #8389

Closed
opened 2025-12-29 20:36:07 +01:00 by adam · 6 comments
Owner

Originally created by @ybizeul on GitHub (Jul 30, 2023).

NetBox version

v3.5.7

Python version

3.10

Steps to Reproduce

  1. Define default i.e. : DEFAULT_USER_PREFERENCES = {"tables":{"DeviceTable":{"columns":["name","rack","device_role","manufacturer","device_type","primary_ip","comments"]}}}
  2. Log in as a new user, and browse to the device table, the default should be honoured
  3. Make a modification to the Device table using "Configure Table" (i.e. remove the "Comments" column)
  4. Save
  5. The "Comments" column is removed
  6. Click again on "Configure Table"
  7. Click on "Reset"
  8. Save
  9. The layout is reset to the NetBox defaults, not to DEFAULT_USER_PREFERENCES value

Additionaly :

  1. Define default i.e. : DEFAULT_USER_PREFERENCES = {"tables":{"DeviceTable":{"columns":["name","rack","device_role","manufacturer","device_type","primary_ip","comments"]}}}
  2. Visit Netbox as a guest
  3. Go to Devices
  4. One would expect that if a user isn't logged in (is a guest), then DEFAULT_USER_PREFERENCES would be used to display informations, instead the NetBox default layout is used

The issue has been discussed here : https://github.com/netbox-community/netbox/discussions/9184#discussioncomment-6584822

Expected Behavior

  1. For logged in users, the layout should revert to DEFAULT_USER_PREFERENCES when using Reset feature
  2. For guests, DEFAULT_USER_PREFERENCES should be used to determine tables columns.

Observed Behaviour

Instead, after reset or when visiting as guest, the table displays the following columns, which I assume are hard coded NetBox defaults :

Name | Status | Tenant | Site | Location | Rack | Role | Manufacturer | Type | IP Address

Also on the dashboard page, the same columns are displayed instead of the one in DEFAULT_USER_PREFERENCES

Originally created by @ybizeul on GitHub (Jul 30, 2023). ### NetBox version v3.5.7 ### Python version 3.10 ### Steps to Reproduce 1. Define default i.e. : `DEFAULT_USER_PREFERENCES = {"tables":{"DeviceTable":{"columns":["name","rack","device_role","manufacturer","device_type","primary_ip","comments"]}}}` 2. Log in as a new user, and browse to the device table, the default should be honoured 3. Make a modification to the Device table using "Configure Table" (i.e. remove the "Comments" column) 4. Save 5. The "Comments" column is removed 6. Click again on "Configure Table" 7. Click on "Reset" 4. Save 5. The layout is reset to the NetBox defaults, not to `DEFAULT_USER_PREFERENCES` value Additionaly : 1. Define default i.e. : `DEFAULT_USER_PREFERENCES = {"tables":{"DeviceTable":{"columns":["name","rack","device_role","manufacturer","device_type","primary_ip","comments"]}}}` 2. Visit Netbox as a guest 3. Go to Devices 4. One would expect that if a user isn't logged in (is a guest), then `DEFAULT_USER_PREFERENCES` would be used to display informations, instead the NetBox default layout is used The issue has been discussed here : https://github.com/netbox-community/netbox/discussions/9184#discussioncomment-6584822 ### Expected Behavior 1. For logged in users, the layout should revert to `DEFAULT_USER_PREFERENCES` when using Reset feature 2. For guests, `DEFAULT_USER_PREFERENCES` should be used to determine tables columns. ### Observed Behaviour Instead, after reset or when visiting as guest, the table displays the following columns, which I assume are hard coded NetBox defaults : ``` Name | Status | Tenant | Site | Location | Rack | Role | Manufacturer | Type | IP Address ``` Also on the dashboard page, the same columns are displayed instead of the one in `DEFAULT_USER_PREFERENCES`
adam added the type: bugstatus: revisions needed labels 2025-12-29 20:36:07 +01:00
adam closed this issue 2025-12-29 20:36:07 +01:00
Author
Owner

@abhi1693 commented on GitHub (Aug 1, 2023):

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

@abhi1693 commented on GitHub (Aug 1, 2023): Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.5.7. 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

@ybizeul commented on GitHub (Aug 4, 2023):

I did include more details on the testing, not sure what else to do.

@ybizeul commented on GitHub (Aug 4, 2023): I did include more details on the testing, not sure what else to do.
Author
Owner

@abhi1693 commented on GitHub (Aug 4, 2023):

I'm still unable to reproduce this issue. I followed your steps on a brand new installation of NetBox (v3.5.7) and after clicking on Reset it reverts to the DEFAULT_USER_PREFERENCES

@abhi1693 commented on GitHub (Aug 4, 2023): I'm still unable to reproduce this issue. I followed your steps on a brand new installation of NetBox (v3.5.7) and after clicking on Reset it reverts to the `DEFAULT_USER_PREFERENCES`
Author
Owner

@ybizeul commented on GitHub (Aug 5, 2023):

I'm now using the docker-compose method to deploy it, same issue.

git clone https://github.com/netbox-community/netbox-docker.git
cd netbox-docker
tee docker-compose.override.yml <<EOF
version: '3.4'
services:
  netbox:
    ports:
      - 8000:8080
EOF
vi configuration/extra.py
# Add on last line :
DEFAULT_USER_PREFERENCES = {"tables":{"DeviceTable":{"columns":["name","rack","device_role","manufacturer","device_type","primary_ip","comments"]}}}
docker compose up -d

docker compose exec netbox /opt/netbox/netbox/manage.py createsuperuser
🧬 loaded config '/etc/netbox/config/configuration.py'
🧬 loaded config '/etc/netbox/config/extra.py'
🧬 loaded config '/etc/netbox/config/logging.py'
🧬 loaded config '/etc/netbox/config/plugins.py'
Username (leave blank to use 'unit'): admin
Email address: admin@localhost
Password:
Password (again):
Superuser created successfully.

When I log in and go to devices, columns are according to DEFAULT_USER_PREFERENCES, see below:
image

Configure table show me this :
image

After Reset I get this :
image

Hence, Reset not reverting to DEFAULT_USER_PREFERENCES.

@ybizeul commented on GitHub (Aug 5, 2023): I'm now using the docker-compose method to deploy it, same issue. ``` git clone https://github.com/netbox-community/netbox-docker.git cd netbox-docker tee docker-compose.override.yml <<EOF version: '3.4' services: netbox: ports: - 8000:8080 EOF vi configuration/extra.py # Add on last line : DEFAULT_USER_PREFERENCES = {"tables":{"DeviceTable":{"columns":["name","rack","device_role","manufacturer","device_type","primary_ip","comments"]}}} docker compose up -d docker compose exec netbox /opt/netbox/netbox/manage.py createsuperuser 🧬 loaded config '/etc/netbox/config/configuration.py' 🧬 loaded config '/etc/netbox/config/extra.py' 🧬 loaded config '/etc/netbox/config/logging.py' 🧬 loaded config '/etc/netbox/config/plugins.py' Username (leave blank to use 'unit'): admin Email address: admin@localhost Password: Password (again): Superuser created successfully. ``` When I log in and go to devices, columns are according to `DEFAULT_USER_PREFERENCES`, see below: ![image](https://github.com/netbox-community/netbox/assets/182035/7f183e4c-08e6-47d2-860c-0f7c000df217) **Configure table** show me this : ![image](https://github.com/netbox-community/netbox/assets/182035/ac7d7c5f-4f17-4cc5-afe2-a6c4636f222e) After **Reset** I get this : ![image](https://github.com/netbox-community/netbox/assets/182035/b6ac576e-3198-4f93-a2e9-9a4dc96765ec) Hence, **Reset** not reverting to `DEFAULT_USER_PREFERENCES`.
Author
Owner

@kkthxbye-code commented on GitHub (Aug 17, 2023):

I cannot replicate this either on v3.5.8.

Copy pasted the exact setting string you posted, and resetting the device table reverted it to what was defined. You will need to make it replicate on a normal non-docker install for us to be able to help.

@kkthxbye-code commented on GitHub (Aug 17, 2023): I cannot replicate this either on v3.5.8. Copy pasted the exact setting string you posted, and resetting the device table reverted it to what was defined. You will need to make it replicate on a normal non-docker install for us to be able to help.
Author
Owner

@jeremystretch commented on GitHub (Sep 21, 2023):

This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.

@jeremystretch commented on GitHub (Sep 21, 2023): This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8389