Problem/Motivation
When a view displays bulk form field, we are able to do bulk actions on the listed content.
If the page has a destination
query parameter set, some actions (which require an additional step like a confirm form for example) do not work anymore. The redirect to destination
occurs before the redirect to $operation_definition['confirm_form_route_name']
.
Steps to reproduce
- Install using Umami to have some content available
- Go to the content overview (
admin/content
) - Add a
destination
parameter in the URL (eg.destination=/
) - Select one or more content
- Choose the "Delete content" action then "Apply to selected items"
Expected: a confirm form is displayed
Current: we are redirected on the destination
Proposed resolution
#2950883: Allow form redirects to ignore ?destination query parameter introduced the \Drupal\Core\Form\FormStateInterface::setIgnoreDestination()
helper. Call it before the redirect.