Review main Merged

95621[BUGFIX] Respect prepend_tname when creating MM tables

Benni Mack CR +2 V +2 Normal +106 −32 updated 09/14/26, 07:57

Commit message

A TCA "group" field with an "MM" table and "prepend_tname" set
stores the table name of every relation in the "tablenames"
column of the MM table, even when "allowed" names only a single
table.

DefaultTcaSchema did not take "prepend_tname" into account. It
created "tablenames" only for the local side of a relation using
"MM_oppositeUsage" and for a group field allowing more than one
table. Extensions relying on the automatic creation of MM tables
from TCA therefore ended up with a table without that column,
and every write of such a relation failed.

The column is now created for these fields as well. "fieldname"
is not added and the primary key stays "uid_local, uid_foreign",
because RelationHandler never writes a field name for
"prepend_tname" relations.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • Stefan Bürk +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Benni Mack +2
    • Jochen Roth +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 89

  1. Benni Mack uploaded patch set 1 09/03/26, 22:31

  2. core-ci voted on patch set 1 V +1 09/03/26, 22:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107786

  3. Josua Vogel voted on patch set 1 CR +1 09/04/26, 05:56

  4. Stefan Bürk commented on patch set 1 CR +1 V +1 09/14/26, 05:01

    I guess we should also rename the `prepend_tname` option to a full name (with compat layer) at some point ;)
  5. Benni Mack voted on patch set 1 CR +2 V +2 09/14/26, 06:24

  6. Benni Mack voted on patch set 1 CR 0 V 0 09/14/26, 06:24

  7. Jochen Roth voted on patch set 1 CR +1 V +1 09/14/26, 07:56

  8. Benni Mack voted on patch set 1 CR +2 V +2 09/14/26, 07:57

  9. Benni Mack merged patch set 2 09/14/26, 07:57