Skip to content
Snippets Groups Projects
Commit 5787a90f authored by Jochen Roth's avatar Jochen Roth Committed by Andreas Fernandez
Browse files

[BUGFIX] Add returnUrl for Open Documents/Recently Used Documents

A click on open/recently used documents the returnUrl was not set
which led to a blank content frame when the close button on the
record was clicked.

This issue is fixed by adding the EditDocumentController's returnUrl to
the OpenDocs payload and re-using it in the toolbar items. However, this
will not work with already existing entries and a consistent behavior
cannot be assured due to potentially (dis)allowed modules for each
backend user.

Resolves: #94214
Releases: main, 12.4
Change-Id: I29680172735a5c28c46268cd14b7e26dd0997cd9
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79862


Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent 76ac42af
Branches
Tags
No related merge requests found
......@@ -988,6 +988,7 @@ class EditDocumentController
$this->storeArray,
$this->storeUrl,
$this->firstEl,
$this->returnUrl,
];
$this->getBackendUser()->pushModuleData('FormEngine', [$this->docHandler, $this->storeUrlMd5]);
BackendUtility::setUpdateSignal('OpendocsController::updateNumber', count($this->docHandler));
......
......@@ -162,7 +162,7 @@ class OpendocsToolbarItem implements ToolbarItemInterface, RequestAwareToolbarIt
$result['table'] = $table;
$result['record'] = $record;
$result['label'] = strip_tags(htmlspecialchars_decode($document[0]));
$uri = $this->uriBuilder->buildUriFromRoute('record_edit') . '&' . $document[2];
$uri = $this->uriBuilder->buildUriFromRoute('record_edit', ['returnUrl' => $document[4] ?? null]) . '&' . $document[2];
$pid = (int)$document[3]['pid'];
if ($document[3]['table'] === 'pages') {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment