Skip to content

Commit

Permalink
[BUGFIX] Add missing elementKey for getFieldType in OverrideFieldsUti…
Browse files Browse the repository at this point in the history
…lity

Fixes: #584
(cherry picked from commit 4a8af93)
  • Loading branch information
nhovratov committed Aug 31, 2023
1 parent 103f741 commit 0bbb903
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Utility/OverrideFieldsUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ public static function restructureTcaDefinitions(TableDefinitionCollection $tabl
}

$fieldTypeTca = $tcaDefinition->getField($fieldKey);
$fieldType = $fieldTypeTca->getFieldType();
$fieldType = $fieldTypeTca->getFieldType($element->key);

if ($fieldType->equals(FieldType::PALETTE)) {
$paletteDefinition = $ttContentDefinition->palettes->getPalette($fieldKey);
foreach ($paletteDefinition->showitem as $paletteFieldKey) {
$paletteTcaDefinition = $tcaDefinition->getField($paletteFieldKey);
$paletteFieldType = $paletteTcaDefinition->getFieldType();
$paletteFieldType = $paletteTcaDefinition->getFieldType($element->key);
if (!$paletteFieldType->canBeShared()) {
continue;
}
Expand Down

0 comments on commit 0bbb903

Please sign in to comment.