Project

General

Profile

Actions

Bug #95428

open

different behaviour for "Standard" option in frame-class vs space-before/after classes

Added by David Menzel about 3 years ago. Updated about 1 month ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Frontend
Start date:
2021-10-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
TCA, space_before_class, space_after_class, frame_class
Complexity:
Is Regression:
Sprint Focus:

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

Actions #1

Updated by Benni Mack 5 months ago

  • Category changed from System/Bootstrap/Configuration to Frontend
Actions #2

Updated by Georg Ringer 5 months ago

thanks for creating the issue. checking that out in v13 seems that this now works (probably also in v12)

Actions #3

Updated by Georg Ringer 5 months ago

  • Status changed from Closed to Accepted
Actions #5

Updated by Gerrit Code Review 5 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

Actions #6

Updated by Gerrit Code Review 5 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

Actions #7

Updated by Gerrit Code Review 5 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

Actions #8

Updated by Gerrit Code Review 4 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

Actions #9

Updated by Gerrit Code Review about 1 month 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

Actions

Also available in: Atom PDF