Review main Merged

89781[BUGFIX] Correctly handle TextTableElement delimiter fallback

Christian Weiske CR +2 V +2 Easy +2 −2 updated 07/24/25, 15:18

Commit message

When a table content element has no table_delimiter field,
the first save fails.

A TCA database row's field values are either
- array, when the field is visible in the form
- simple type, when the field is not in the form
  (with its default value)

When saving the element the first time, the table_delimiter default value
is a string "124", causing the `$row['table_delimiter'][0]` to do a
substring operation. This leads to failure.

Upon saving the next time, the default value is an integer and all is
fine.

This patch fixes the problem by checking if the value is really an array
before trying to access the first array element.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • Christian Weiske +1
  • Verified V +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
    • Christian Weiske +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 711

  1. Christian Weiske uploaded patch set 1 06/20/25, 14:02

  2. core-ci voted on patch set 1 V -1 06/20/25, 14:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80534

  3. core-ci commented on patch set 1 06/20/25, 16:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80534

  4. core-ci commented on patch set 1 06/20/25, 17:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80534

  5. Garvin Hicking commented on patch set 2 V -1 06/20/25, 21:11

    Published edit on patch set 1.
  6. core-ci voted on patch set 2 V +1 06/20/25, 21:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/80536

  7. Christian Weiske voted on patch set 2 CR +1 V +1 06/23/25, 08:00

  8. Garvin Hicking commented on patch set 2 06/23/25, 09:02

    Please note, I only fixed the CI error for null coalescing, I could not yet verify/review this - feedback much appreciated. Maybe you can reset your vote, Christian - usually unless someone else completely rewrites the patch you don't need to vote as the owner. I appreciate your agreement on my change of course, thanks! 😊
  9. Garvin Hicking commented on patch set 2 CR +1 V +1 06/23/25, 17:07

    Ok now: This works for me, thanks! :-)
  10. Benni Mack voted on patch set 2 CR +2 V +2 07/24/25, 15:18

  11. Benni Mack merged patch set 3 07/24/25, 15:18