When you run Drupal in a sub-directory, the destination parameter that gets added to (edit) links inside a View is missing the base path and the language prefix after an AJAX reload.
Steps to verify.
- Create a subsite setup with name "
subsite
" so paths are likewww.example.com/subsite/*
- Create a view with content listing and a column for
Content: Operations links
- Also expose some filter like
content type
- Enable
Use AJAX
underAdavanced > Other
- Visit the newly created view
- On initial load, while hovering on
Edit
, you will see the destination url has "/subsite
" as prefix - Apply one of the exposed filters, like
content type
- Now on hovering
Edit
, you won't see destination url has a prefix "/subsite
" - If you continue and edit the node and directly save the node, site breaks with untrusted url, because the prefix '"
/subsite
" is missing
Error message related to this problem as described:
Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.
The error is caused by views not properly replacing the destination parameters with the expected prefix. The patch number 2 fixes this problem.