Bug #95428
closeddifferent behaviour for "Standard" option in frame-class vs space-before/after classes
100%
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...
Files
Updated by Benni Mack about 1 year ago
- Category changed from System/Bootstrap/Configuration to Frontend
Updated by Georg Ringer 12 months ago
- File Bildschirmfoto 2024-06-23 um 21.45.37.png Bildschirmfoto 2024-06-23 um 21.45.37.png added
- Status changed from New to Closed
thanks for creating the issue. checking that out in v13 seems that this now works (probably also in v12)
Updated by Georg Ringer 12 months ago
- File 2024-06-26 15-32-07.mp4 2024-06-26 15-32-07.mp4 added
Updated by Gerrit Code Review 12 months ago
- Status changed from Accepted to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84934
Updated by Gerrit Code Review 12 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84934
Updated by Gerrit Code Review 12 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84934
Updated by Gerrit Code Review 11 months ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84934
Updated by Gerrit Code Review 8 months ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84934
Updated by Gerrit Code Review 4 months ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84934
Updated by Gerrit Code Review 4 months ago
Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88266
Updated by Georg Ringer 4 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 916e8564e3fa41432b48ac6e65415fb81c584b85.