Review main Abandoned

82260[BUGFIX] Add missing TCA default values for select-mm fields

Stefan Bürk CR 0 V 0 Easy +4 −0 updated 12/20/23, 12:25

Commit message

With #102279 default schema definition creation based
on TCA configuration has been added for `type=select`
fields.

MM relation parent count fields are set to not-nullable
integer fields with a database default of `(int)0`. By
nature a database uses the database default value only
if field is not provided or provided as `NULL` value.
Not providing a TCA default value uses empty string `""`
as value, which is swallowed silently by most database
enginges expect `PostgreSQL` which kisses the floor with

  SQLSTATE[22P02]: Invalid text representation: 7
  ERROR:  invalid input syntax for integer: ""

This change adds TCA default for some `ext:styleguide`
tables to mitigate this issue during record creation.

Review

  • Code review CR 0
  • Verified V 0

Issues 3

Files 2

Review log 911

  1. Stefan Bürk uploaded patch set 1 12/20/23, 07:35

  2. core-ci voted on patch set 1 V +1 12/20/23, 07:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50835

  3. Stefan Bürk commented on patch set 1 12/20/23, 07:57

    ^ was a nightly, not a pre-merged. I cancelled the pre-merge
  4. Stefan Bürk updated the commit message in patch set 2 V +1 12/20/23, 08:13

  5. Anja Leichsenring voted on patch set 2 CR +1 V +1 12/20/23, 08:14

  6. core-ci voted on patch set 2 V +1 12/20/23, 08:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50836

  7. Oli Bartsch commented on patch set 2 12/20/23, 08:41

    Unresolved

    So, why does this not apply for other fields defining MM, e.g. for the type=inline fields? And, since this looks like devs have to adjust their TCA now, I suggest to add this to the changelog.
  8. Christian Kuhn commented on patch set 2 CR -1 12/20/23, 09:32

    Unresolved

    i think this is just a workaround since generator tries to write strings here in the first place. maybe we should fix generator instead for these fields. will have a deeper look ...
  9. Oliver Klee voted on patch set 2 CR +1 12/20/23, 10:09

  10. Christian Kuhn commented on patch set 2 12/20/23, 12:25

  11. Christian Kuhn abandoned the change 12/20/23, 12:25