-
-
Notifications
You must be signed in to change notification settings - Fork 215
Description
Bug Report
There is a bug in 300_content_general_columns.php in TYPO3 14 when extending the frames palette showitem.
The current code appends fields to the palette without a leading comma before the first added item. Because of this, the existing last field and the newly appended --linebreak-- are concatenated incorrectly. As a result, fields such as space_after_class may no longer appear correctly in the backend.
Affected code:
// Add fields to default palettes
$GLOBALS['TCA']['tt_content']['palettes']['frames']['showitem'] .= '
--linebreak--,
frame_layout,
frame_options,
--linebreak--,
background_color_class,
--linebreak--,
background_image,
background_image_options,
';
Problem:
The appended string starts directly with --linebreak-- instead of a comma.
This can break the TCA showitem list, depending on the previous last item in the palette definition.
For example, space_after_class may be missing in the backend because the generated showitem string becomes invalid.
Expected behavior:
The appended fields should be added as separate items in the showitem list, and existing fields such as space_after_class should remain visible in the backend.
Suggested fix:
Add a leading comma before the appended items.
Fixed code:
// Add fields to default palettes
$GLOBALS['TCA']['tt_content']['palettes']['frames']['showitem'] .= '
,
--linebreak--,
frame_layout,
frame_options,
--linebreak--,
background_color_class,
--linebreak--,
background_image,
background_image_options,
';