wagtail / wagtail

A Django content management system focused on flexibility and user experience

Home Page:https://wagtail.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redirect to unstyled search results page after completing editorial action on page

alxbridge opened this issue · comments

Issue Summary

When doing an admin-wide search, results pulled in via XMLHttpRequest use an incorrect next querystring parameter in their action links. This means that editors are brought to an unstyled search results page on completing their action.

Steps to Reproduce

  1. Start a new project and create test content which can be searched for
  2. Navigate to /admin/pages/search/
  3. Enter a search query into the box at the top of the page
  4. Open the ... action menu for one of the search results, and choose the Edit (*) action.
  5. Edit the page and publish it
  6. The browser is redirected to /admin/pages/search/results/, which is unstyled.
  • Expected behaviour: the next parameter ends the action journey on /admin/pages/search/.

(*also applies to any action which sets a next parameter in its link querystring)

Screenshots

Screenshot from 2024-04-17 12-14-58

Screenshot from 2024-04-17 12-10-26

This appears to be similar to #11177

  • I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: yes

Technical details

  • Python version: 3.10.12
  • Django version: 5.0.3
  • Wagtail version: 6.0.2
  • Browser version: Firefox 125.0

Confirmed on current main branch.

Can I take this one