benjaminkott / benjaminkott/bootstrap_package
Missing comma in 300_content_general_columns.php breaks frames palette showitem configuration in TYPO3 14
- Dominant language
- PHP
- Stars
- 355
- Forks
- 212
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 31
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,
';
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in 300_content_general_columns.php at the tt_content frames palette showitem append shown in the issue. Check how the appended items join the existing palette string, then verify that the fields remain separate and that space_after_class is still visible in the TYPO3 backend.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100