Commit d6732046 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Benni Mack

[BUGFIX] Prevent saveAndClose in MultiStep wizard

With #90461 a new option "saveAndClose" was added
to the newContentElement wizard. When opening the
wizard and selecting a content type with such option set,
the new element will directly be created - no FormEngine
interaction - and placed at the position (colPos, sorting),
the user opened the wizard.

This functionality however does not work when the wizard
was opened without such page context, for example via the
"new record view" in the recordlist. The position must then
be defined by the user explicitly in the MultiStep wizard, so
no "saveAndClose" functionality is available in such cases.

Resolves: #93876
Releases: master, 10.4
Change-Id: I8c7c7b632533a6f2d2bbe01a103a25ce441acf2c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68726Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 03bbd188
......@@ -268,8 +268,8 @@ class NewContentElementController
$aOnClick = "document.editForm.defValues.value=unescape('" . rawurlencode($wInfo['params']) . "');goToalt_doc();";
}
// Go to DataHandler directly instead of FormEngine
if ($wInfo['saveAndClose'] ?? false) {
// Go to DataHandler directly instead of FormEngine - Only when colPos must not be selected
if (($wInfo['saveAndClose'] ?? false) && $onClickEvent !== '') {
$urlParams = [];
$id = StringUtility::getUniqueId('NEW');
parse_str($wInfo['params'], $urlParams);
......
Markdown is supported
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