Review main Merged

72276[BUGFIX] Do not use hardcoded field name for belayoutwizard

Oli Bartsch CR +2 V +2 Normal +60 −55 updated 11/24/21, 18:36

Commit message

TCA renderType=belayoutwizard did previously not
work for custom fields, as can be seen in styleguide
`tx_styleguide_elements_basic.text_20`.

BackendLayoutWizardElement used the hardcoded
field name "config", which however is only used for
the "backend_layout" table. Additionally, using the
raw database value instead of the processed
"itemFormElValue" led to further issues, e.g. when
the field is defined with "l10n_display=defaultAsReadonly".

This is now fixed by using the "itemFormElValue",
since this is the correct value, which is also added
to the corresponding input field and would also
contain the "default" for new records.

Additionally, the given parsed itemFormElValue is
now checked to start with the correct root level
key "backend_layout.". This prevents undefined
array key warnings, triggered when a malformed
default value is used for the field.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Nikita Hovratov +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Jochen Roth +1
    • Nikita Hovratov +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1012

  1. Oli Bartsch uploaded patch set 1 11/23/21, 19:05

  2. core-ci voted on patch set 1 V -1 11/23/21, 19:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19685

  3. Oli Bartsch commented on patch set 1 11/23/21, 20:11

    Currently failing due to wrong default value in tx_styleguide_elements_basic.text_20. See https://github.com/TYPO3/styleguide/pull/246
  4. Oli Bartsch uploaded patch set 2 11/23/21, 22:25

  5. core-ci voted on patch set 2 V +1 11/23/21, 22:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19688

  6. Oli Bartsch commented on patch set 2 11/23/21, 22:50

    Reply

    Added some checks to prevent those warnings, in case malformed default values are configured. Anyways, styleguide needs to be updated to provide a valid example.
  7. Jochen Roth voted on patch set 2 V +1 CR +1 11/24/21, 13:21

  8. Benni Mack voted on patch set 2 V +1 CR +1 11/24/21, 16:38

  9. Nikita Hovratov commented on patch set 2 V +1 CR +1 11/24/21, 17:33

    This enables now editing custom be-layout fields, nice! But there is another issue: Default
  10. Nikita Hovratov commented on patch set 2 11/24/21, 17:34

    Reply

    Nvm the TCA in styleguide was wrong.
  11. Oli Bartsch voted on patch set 2 V +2 CR +2 11/24/21, 18:36

  12. Oli Bartsch merged patch set 3 11/24/21, 18:36