Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bctiemann opened this issue Sep 19, 2024 · 1 comment
Labels
netbox severity: low Does not significantly disrupt application functionality, or a workaround is available status: blocked Another issue or external requirement is preventing implementation topic: htmx navigation For issues where HTMX navigation is enabled type: bug A confirmed report of unexpected behavior in the application

Comments

@bctiemann
Copy link
Contributor

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.

return redirect(self.get_return_url(request))

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

@bctiemann bctiemann added type: bug A confirmed report of unexpected behavior in the application status: needs triage This issue is awaiting triage by a maintainer topic: htmx navigation For issues where HTMX navigation is enabled status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs triage This issue is awaiting triage by a maintainer labels Sep 19, 2024
@arthanson arthanson added the status: blocked Another issue or external requirement is preventing implementation label Sep 23, 2024
@arthanson
Copy link
Collaborator

blocked by. #17571

@arthanson arthanson removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Sep 23, 2024
@jeremystretch jeremystretch added the netbox label Nov 1, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
netbox severity: low Does not significantly disrupt application functionality, or a workaround is available status: blocked Another issue or external requirement is preventing implementation topic: htmx navigation For issues where HTMX navigation is enabled type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants