Error redirect in bulk-editing under HTMX navigation results in a blank page #10267

Closed
opened 2025-12-29 21:29:11 +01:00 by adam · 2 comments
Owner

Originally created by @bctiemann on GitHub (Sep 19, 2024).

Deployment Type

NetBox Cloud

NetBox Version

v4.1.0

Python Version

3.10

Steps to Reproduce

  1. Ensure HTMX navigation is enabled
  2. Select a Device with multiple Interfaces
  3. Select the Interfaces tab
  4. Don't select any interfaces, but click "Edit Selected"

Expected Behavior

Page should remain on the Interfaces object list, and a toast should appear saying "No interfaces were selected" as occurs under non-HTMX navigation.

Observed Behavior

The page is replaced with a blank pane, and no toast appears.

This is because BulkEditView is encountering an error and issuing a redirect to the get_return_url, but because it's happening in an HTMX container the browser doesn't render it properly at the top level.

485d3aee37/netbox/netbox/views/generic/bulk_views.py (L701-L701)

Error conditions like this need to be handled in a different way under HTMX.

Originally created by @bctiemann on GitHub (Sep 19, 2024). ### Deployment Type NetBox Cloud ### NetBox Version v4.1.0 ### Python Version 3.10 ### Steps to Reproduce 1. Ensure HTMX navigation is enabled 2. Select a Device with multiple Interfaces 3. Select the Interfaces tab 4. Don't select any interfaces, but click "Edit Selected" ### Expected Behavior Page should remain on the Interfaces object list, and a toast should appear saying "No interfaces were selected" as occurs under non-HTMX navigation. ### Observed Behavior The page is replaced with a blank pane, and no toast appears. This is because `BulkEditView` is encountering an error and issuing a `redirect` to the `get_return_url`, but because it's happening in an HTMX container the browser doesn't render it properly at the top level. https://github.com/netbox-community/netbox/blob/485d3aee3757547b864f733f01fb3c2fc174e8e2/netbox/netbox/views/generic/bulk_views.py#L701-L701 Error conditions like this need to be handled in a different way under HTMX.
adam added the type: bugnetboxseverity: lowtopic: htmx navigation labels 2025-12-29 21:29:11 +01:00
adam closed this issue 2025-12-29 21:29:11 +01:00
Author
Owner

@arthanson commented on GitHub (Sep 23, 2024):

blocked by. #17571

@arthanson commented on GitHub (Sep 23, 2024): blocked by. #17571
Author
Owner

@jeremystretch commented on GitHub (Nov 7, 2025):

Closing this out as the experimental HTMX navigation feature is being removed in NetBox v4.5.

@jeremystretch commented on GitHub (Nov 7, 2025): Closing this out as the experimental HTMX navigation feature is being removed in NetBox v4.5.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10267