Skip to content

redirect to referral URL on element save again + adjustment#18483

Open
i-just wants to merge 2 commits into5.xfrom
bugfix/18473-edit-pages-redirect-back
Open

redirect to referral URL on element save again + adjustment#18483
i-just wants to merge 2 commits into5.xfrom
bugfix/18473-edit-pages-redirect-back

Conversation

@i-just
Copy link
Contributor

@i-just i-just commented Feb 26, 2026

Description

v5.9.0 initially shipped with #16140

We then chose to revert that change (via 0fd95b2) because it was causing some issues (#18404 and some additional ones we spotted in Commerce).

This PR restores the redirect mechanism from Brian’s original PR, with a tweak that ensures we only compare the referrer and request URIs (ignoring the query string, etc.).

I tested this against #18473, the scenario from #18404 and against the issue we noticed in Commerce.

Example of an issue we spotted in Commerce:

  • create a product & fully save
  • edit the product; create a draft (not a provisional one)
  • switch back to the canonical & press “Save” (not the shortcut to save and continue)
  • you land back on the draft edit page instead of on the products index page

Related issues

#18473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants