fix: properly forward return urls where missing

This commit is contained in:
Björn Fromme
2026-08-11 14:34:46 +02:00
parent 102e1c1c3c
commit 48cd2d6b67
27 changed files with 194 additions and 24 deletions
+15
View File
@@ -192,6 +192,21 @@ class AppRuntime implements RuntimeExtensionInterface
return rawurlencode($masterRequest->getRequestUri());
}
/**
* Passes the return url of the current page on to the next one.
*
* Used by links that lead deeper into a detail view or trigger an action on it:
* they have to keep pointing back at where the user originally came from instead
* of at the page they sit on. Null when there is nothing to pass on, so that the
* url generator drops the parameter rather than emitting an empty one.
*/
public function getForwardedReturnUrl(): ?string
{
$returnUrl = $this->requestStack->getMainRequest()?->query->get('r');
return is_string($returnUrl) && '' !== $returnUrl ? $returnUrl : null;
}
public function renderQaAttribute(string $label, ?string $value = null): string
{
if ('test' !== $this->environment) {