Issue Bug Closed

#104732altLabelField in lowlevel not exploded

Philipp Parzer 08/26/24, 06:26 updated 12/02/25, 14:33

Description

https://github.com/TYPO3/typo3/blob/v13.2.1/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php#L1112
https://github.com/TYPO3/typo3/blob/v13.2.1/typo3/sysext/frontend/Configuration/TCA/tt_content.php#L6

TCA config ‘label_alt’ can be comma separated values
in lowlevel DatabaseIntegrityController the value is not exploded
Leads to Undefined array key “subheader,bodytext”

Problem exists in V11 too

Reviews 2

History 617

  1. Garvin Hicking commented and changed category status New Needs Feedback <span data-processor="relativetime" data-value="2024-08-26T17:09:11+00:00" > 08/26/24, 17:09 </span>

    Could you list more details on how to reproduce, error stacktrace? Or is this a tocket you’re preparing a patch for?

  2. Philipp Parzer commented <span data-processor="relativetime" data-value="2024-08-27T05:07:32+00:00" > 08/27/24, 05:07 </span>

    • go to DB Check
    • Full Search
    • Advanced Query
    • select Page Content (tt_content)
    • select uid,header,l18n_parent
    • where l18n_parent = <uid></uid>

    page doesn’t refresh
    error in the log module

    I think there must be content elements without a header
    tested with TYPO3 11 and PHP 8.2

  3. Gerrit Code Review pushed patch set 1 for main to change 86193 status Needs Feedback Under Review <span data-processor="relativetime" data-value="2024-09-19T06:58:59+00:00" > 09/19/24, 06:58 </span>

  4. Garvin Hicking commented and changed status Under Review Needs Feedback <span data-processor="relativetime" data-value="2024-09-19T07:08:15+00:00" > 09/19/24, 07:08 </span>

    I created a patch for it, could you have a look at it if it works for you:

    https://review.typo3.org/c/Packages/TYPO3.CMS/+/86193

  5. Gerrit Code Review pushed patch set 3 for main to change 86193 status Needs Feedback Under Review <span data-processor="relativetime" data-value="2024-09-20T12:38:18+00:00" > 09/20/24, 12:38 </span>

  6. Garvin Hicking commented <span data-processor="relativetime" data-value="2025-03-26T12:30:09+00:00" > 03/26/25, 12:30 </span>

    Updated steps to reproduce for this patch:

    Steps to reproduce:

    1. Check label_alt with at least ONE select relation:

    • have a tt_content entry <uid> with an empty “header” column (i.e. UID=42) and a CType like “text”</uid>
    • have a tt_content.php override (or edit sysext/frontend/Configuration/TCA/tt_content.php) with ‘label_alt’ => ‘subheader,bodytext,CType’
    • have caches flushed ;)
    • go to DB Check
    • select Full Search
    • select Advanced Query
    • select Page Content (tt_content)
    • select uid,header,l18n_parent
    • Add condition WHERE (Transl.Org) l18n_parent = <uid></uid>

    Check for the “Query” where part, the dropdown for selecting the uid, for your empty UID=42. It should show the “CType” (=value “Regular Text Element”) for entry [42] (due to the empty header).

    2. Check label_alt WITHOUT a select relation

    • Same as above, but with “subheader,bodytext” only

    Now entries should show a fallback of “[]” for any field where neither header, subheader nor bodytext was filled!

    3. Check label_alt on relations of the RESULT

    Now do the same again, with the option “Use formatted strings, labels and dates instead of original values for results” in “Query options”.

    This then modifies the RESULT listing (not the filter dropdowns). It should yield a result list with table keys: uid, header, l18n_parent.

    Instead of “4” for “l18n_parent” it should show the resolved label_alt values. Check this with both label_alt=“subheader,bodytext,CType” and label_alt=“subheader,bodytext”.

  7. Garvin Hicking commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-03-27T05:15:09+00:00" > 03/27/25, 05:15 </span>

    Applied in changeset commit:3a5eb7b495ff872260a349c8bd7342aef661aabe.