Commit 59b7d0d8 authored by Morton Jonuschat's avatar Morton Jonuschat Committed by Markus Klein
Browse files

[BUGFIX] Only check 'CType' when removing items from NewContentElementWizard

Fix the behavior of keepItems in the NewContentElementWizard to only
remove invalid items based on the CType key. Without this patch any
invalid value in tt_content_defValues would result in the content
element being invisible in the wizard.

Resolves: #76242
Related: #61114
Releases: master, 7.6
Change-Id: I31af8e8e7f095d3af01740165900474d7e05a9a5
Reviewed-on: https://review.typo3.org/48226

Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
parent f1dade69
......@@ -519,7 +519,7 @@ class NewContentElementController extends AbstractModule
);
}
$isNotInKeepItems = !empty($keepItems[$fN]) && !in_array($fV, $keepItems[$fN]);
if ($authModeDeny || $fN === 'CType' && in_array($fV, $removeItems[$fN]) || $isNotInKeepItems) {
if ($authModeDeny || $fN === 'CType' && (in_array($fV, $removeItems[$fN]) || $isNotInKeepItems)) {
// Remove element all together:
unset($wizardItems[$key]);
break;
......
Supports Markdown
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