Bug #95428
opendifferent behaviour for "Standard" option in frame-class vs space-before/after classes
0%
Description
I added a new frame_class option called 'container'.
Then I have overridden the standard option for the frame_class and space_before_class / space_after_class fields in my_ext/Configuration/TCA/Overrides/tt_content.php like:
$GLOBALS['TCA']['tt_content']['types']['textmedia']['columnsOverrides']['frame_class']['config']['default'] = 'container';
$GLOBALS['TCA']['tt_content']['types']['textmedia']['columnsOverrides']['space_before_class']['config']['default'] = 'medium';
$GLOBALS['TCA']['tt_content']['types']['textmedia']['columnsOverrides']['space_after_class']['config']['default'] = 'medium';
So, if I create a new Text&Media content element, the default values for
frame_class would be container and
space_before_class = medium and space_after_class = medium
I can then change the option in the frame_class back to Standard or any other value that's available in the dropdown.
The same can't be done in the space_before/after_class fields.
If I choose the Standard option the value jumps back to medium. So, selecting the Standard option (which would mean zero space) is not possible anymore.
To solve this, I changed the TCA config for space_before_class / space_after_class in public/typo3/sysext/frontend/Configuration/TCA/tt_content.php to
'space_before_class' => [
'exclude' => true,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:space_before_class',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 'default' ],
.....
],
'default' => 'default'
]
],
After changing the empty value to a string, I can now select the default value in the space_after/before_class field again.
It seems that the problem is the empty value...?
Because the Standard option has "no space" at all, I would suggest to rename the Standard option to "Kein Abstand" with the value "none".
I assume that would solve the problem.
Or add default as value to the Standard option...
No data to display