Skip to content

Return URL is not preserved when using "create and add another" button #8101

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

Closed
candlerb opened this issue Dec 17, 2021 · 5 comments
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@candlerb
Copy link
Contributor

NetBox version

v3.1.1

Python version

3.8

Steps to Reproduce

  1. Create a device with an interface, say IP 192.168.5.1/24
  2. Create FHRP group ID 1, with address 192.168.5.2/24, status Active, "Create and add another"
  3. Create FHRP group ID 2, with address 192.168.5.3/24, status Active, "Create"
  4. Go to the device, view the interface
  5. Click "Assign group". Click "Cancel". This correctly returns to the interface.
  6. Click "Assign group". Select group ID 1, priority 0, click "Create and add another"
  7. Click "Cancel"

Expected Behavior

Return to the interface page (/dcim/interfaces/NNN/)

Observed Behavior

Returns to the Netbox home page. It has forgotten the navigation route to the correct place

@candlerb candlerb added the type: bug A confirmed report of unexpected behavior in the application label Dec 17, 2021
@jeremystretch jeremystretch self-assigned this Dec 20, 2021
@jeremystretch
Copy link
Member

I'm not able to replicate this on v3.1.1. After assigning the FHRP group, I'm redirected to the interface view via a 302 response as expected.

Can you inspect the form submission in the browser when assigning the group to verify whether the return_url value is being passed?

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Dec 20, 2021
@DanSheps
Copy link
Member

You need to assign the first group, then the return_url on the cancel button does not properly populate.

Additionally, it looks like it populates the wrong return_url on the "create group" button

@jeremystretch
Copy link
Member

Ah, my mistake. I think I was clicking "create" instead.

@jeremystretch
Copy link
Member

This doesn't seem to be related to FHRP groups specifically, but rather ObjectEditView in general.

@jeremystretch jeremystretch changed the title FHRP "create and add another" does not remember return path Return URL is preserved when using "create and add another" button Dec 20, 2021
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Dec 20, 2021
@jeremystretch jeremystretch changed the title Return URL is preserved when using "create and add another" button Return URL is not preserved when using "create and add another" button Dec 20, 2021
@jeremystretch
Copy link
Member

This looks like a regression introduced in b957739

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants