Review main Merged

85721[BUGFIX] Migrate allowLanguageSynchronization in columnsOverrides

Oli Bartsch CR +2 V +2 Normal +162 −6 updated 09/10/24, 17:21

Commit message

Because the Localization\State does currently not support
columnsOverrides, the localization state selector wizard
throws an exception when setting allowLanguageSynchronization
via columnsOverrides.

This is now mitigated by removing the non working option
from TCA via TcaMigration and informing the integrator
about it.

Additionally is the Localization\State checked in the
wizard and an early return is done to prevent null
pointer exceptions.

Review

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

Issues 2

Files 4

Review log 3038

Show 1113 earlier messages
  1. Oli Bartsch uploaded patch set 1 08/22/24, 09:32

  2. Oli Bartsch uploaded patch set 2 08/22/24, 09:36

  3. core-ci voted on patch set 1 V -1 08/22/24, 09:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63972

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

  5. Christian Kuhn voted on patch set 2 CR +1 08/22/24, 13:27

  6. Christian Kuhn commented on patch set 2 08/22/24, 13:29

    slightly confused phpstan does not mumble on such stuff "calling method on object that may be null" or something.
  7. Andreas Kienast commented on patch set 2 CR +1 08/22/24, 14:09

    Reply

    phpstan reports this once we're on level 8: > 8. report calling methods and accessing properties on nullable types https://phpstan.org/user-guide/rule-levels
  8. Jochen Roth voted on patch set 2 CR +1 V +1 09/09/24, 09:03

  9. Oliver Hader commented on patch set 2 09/09/24, 10:09

    I guess the whole widget should not be rendered in case `LocalizationState` is `null`...
  10. Benjamin Franzke commented on patch set 2 09/09/24, 10:11

    Reply

    ack, therefore crossposting https://forge.typo3.org/issues/104693#note-4 here: > Is there any concrete example on how to reproduce?
  11. Oli Bartsch commented on patch set 2 09/09/24, 18:27

    Reply

    Yes add this to your Configuration/TCA/Overrides/tt_content.php > $GLOBALS['TCA']['tt_content']['types']['shortcut']['columnsOverrides']['records']['config']['behaviour']['allowLanguageSynchronization'] = true;
  12. Oli Bartsch uploaded patch set 3 CR +1 V +1 09/09/24, 19:04

  13. Oli Bartsch commented on patch set 3 09/09/24, 19:05

    Reply

    You are right, the wizard is no longer rendered in case localization state can not be resolved.
  1. Benjamin Franzke voted on patch set 3 CR +1 09/09/24, 19:05

  2. core-ci voted on patch set 3 V +1 09/09/24, 19:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65135

  3. Oliver Hader commented on patch set 3 CR +1 V +1 09/09/24, 19:27

    Code-wise it looks good and still renders the widget when expected...

    LocalizationStateSelector.php:49

    `\TYPO3\CMS\Core\DataHandling\Localization\State::fromJSON` only is `null` in case the static configuration does not support allow language synchronization. Thus, I was not able to reproduce the `missing or wrong database values` aspect like mentioned in the description.
  4. Benjamin Franzke commented on patch set 3 CR -1 09/09/24, 19:52

    `Localization/State::getFieldNames` needs to take `['columnsOverrides']` into account, as we'd silently ignoring ``` $GLOBALS['TCA']['tt_content']['types']['shortcut']['columnsOverrides']['records']['config']['behaviour']['allowLanguageSynchronization'] = true; ``` in this case.
  5. Oli Bartsch uploaded patch set 4 CR +1 V +1 09/10/24, 09:29

  6. Oli Bartsch commented on patch set 4 09/10/24, 09:31

    LocalizationStateSelector.php:49 Reply

    Done
  7. core-ci voted on patch set 4 V -1 09/10/24, 09:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65199

  8. Oli Bartsch uploaded patch set 5 V -1 09/10/24, 09:39

  9. Oliver Hader commented on patch set 5 09/10/24, 09:41

    I've created a PoC for an alternative, to resolve the sub-schemas as well. → https://review.typo3.org/c/Packages/TYPO3.CMS/+/85976
  10. core-ci voted on patch set 5 V -1 09/10/24, 09:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65201

  11. core-ci voted on patch set 5 V +1 09/10/24, 10:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65201

  12. Oliver Hader commented on patch set 5 09/10/24, 14:04

    Reply

    It does not work out unless using the record object... Besides that, `l10n_mode=exclude` should be handled as well...
  13. Oliver Hader commented on patch set 5 09/10/24, 14:18

    Reply

    `l10n_mode=exclude` currently does is not considered in `DataMapProcessor` (which is a different story), thus I'd be fine with the change as it is right now.
  14. Oliver Hader commented on patch set 6 V +1 09/10/24, 14:19

    Published edit on patch set 5.
  15. Oliver Hader voted on patch set 6 CR +1 V +1 09/10/24, 14:19

  16. Nikita Hovratov commented on patch set 6 09/10/24, 14:24

    TcaMigration.php:1479

    in the
  17. core-ci voted on patch set 6 V +1 09/10/24, 14:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65260

  18. Oli Bartsch commented on patch set 7 CR +1 V +1 09/10/24, 14:41

    Published edit on patch set 6.
  19. Oli Bartsch commented on patch set 7 09/10/24, 14:41

    TcaMigration.php:1479 Reply

    Done
  20. Oliver Hader voted on patch set 7 CR +1 V +1 09/10/24, 14:44

  21. core-ci voted on patch set 7 V +1 09/10/24, 14:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/65265

  22. Jochen Roth voted on patch set 7 CR +1 V +1 09/10/24, 15:21

  23. Nikita Hovratov voted on patch set 7 CR +1 09/10/24, 16:50

  24. Oli Bartsch voted on patch set 7 CR +2 V +2 09/10/24, 17:21

  25. Oli Bartsch merged patch set 8 09/10/24, 17:21