Skip to content

Missing comma in 300_content_general_columns.php breaks frames palette showitem configuration in TYPO3 14 #1617

@webagenturyahya

Description

@webagenturyahya

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,
';

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions