Skip to content

Commit

Permalink
[BUGFIX] Allow set sorting via TS
Browse files Browse the repository at this point in the history
As the default flexform value for sorting is set to 'Default' the override via TS does not work by default

Resolves: #421
  • Loading branch information
georgringer committed Jan 19, 2023
1 parent 94a8e1f commit 9cfc51a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/Utility/TypoScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public function override(array $previousData, array $tsData)
}
}
} else {
if ($fieldName === 'sortBy' && ($previousData['sortBy'] ?? '' === 'default') && (($tsData['settings']['sortBy'] ?? '') !== '')) {
unset($previousData['sortBy']);
}
// if flexform setting is empty and value is available in TS
if (((!isset($previousData[$fieldName]) || (string)$previousData[$fieldName] === '') || (strlen($previousData[$fieldName]) === 0))
&& isset($tsData['settings'][$fieldName])
Expand Down

0 comments on commit 9cfc51a

Please sign in to comment.