Review main Merged Breaking

82300[!!!][TASK] Unify _PAGES_OVERLAY_UID and _LOCALIZED_UID

Benni Mack CR +2 V +2 Normal +134 −88 updated 01/06/24, 20:35

Commit message

When doing language overlays in PageRepository
an overlaid language for a page received special properties:

* "_PAGES_OVERLAY_UID" (the UID of the translated page)
* "_PAGES_OVERLAY" (a flag indicating that a translation happened)
* "_PAGES_OVERLAY_LANGUAGE" (the sys_language_uid record)
* "_PAGES_OVERLAY_REQUESTEDLANGUAGE" (info which language was requested)

For regular records (non-pages) only one special property
was used "_LOCALIZED_UID".

This patch unifies the properties, as this was a historical
technical debt due to "pages" vs. "pages_language_overlays"
and other records.

"_PAGES_OVERLAY_UID" is replaced with "_LOCALIZED_UID",
"_PAGES_OVERLAY" is removed as a isset check for "_LOCALIZED_UID"
can be used
"_PAGES_OVERLAY_LANGUAGE" is replaced in favor of the native "sys_language_uid"
field
"_PAGES_OVERLAY_REQUESTEDLANGUAGE" is replaced with "_REQUESTED_OVERLAY_LANGUAGE"
and now also available for non-page records

As seen in the changes, some code can now be simplified
due to superfluous checks on "_PAGES_OVERLAY_UID" and directly
using "_LOCALIZED_UID".

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 18

Review log 2027

Show 12 earlier messages
  1. Benni Mack uploaded patch set 1 01/03/24, 10:34

  2. core-ci voted on patch set 1 V -1 01/03/24, 10:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51069

  1. Benni Mack uploaded patch set 2 V -1 01/03/24, 11:40

  2. core-ci voted on patch set 2 V +1 01/03/24, 11:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51074

  3. Benni Mack uploaded patch set 3 V +1 01/03/24, 17:14

  4. core-ci voted on patch set 3 V -1 01/03/24, 17:19 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51084

  5. Chris Müller commented on patch set 3 01/03/24, 17:34

    Breaking-102627-RemovedSpecialPropertiesOfPageArraysInPageRepository.rst:64

    You mean "in favor of a isset($page['_LOCALIZED_UID') check instead."?
  6. Benni Mack uploaded patch set 4 V -1 01/03/24, 21:14

  7. Benni Mack commented on patch set 3 01/03/24, 21:14

    Breaking-102627-RemovedSpecialPropertiesOfPageArraysInPageRepository.rst:64 Reply

    you are right, fixed
  8. core-ci voted on patch set 4 V +1 01/03/24, 21:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51087

  9. Simon Schaufelberger commented on patch set 4 01/04/24, 01:16

    an

    Breaking-102627-RemovedSpecialPropertiesOfPageArraysInPageRepository.rst:33

    due to?
  10. Benni Mack commented on patch set 5 V +1 01/04/24, 08:13

    Published edit on patch set 4.
  11. Benni Mack updated the commit message in patch set 6 01/04/24, 08:13

  12. core-ci voted on patch set 5 V +1 01/04/24, 08:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51097

  13. core-ci voted on patch set 6 V +1 01/04/24, 08:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51098

  14. Benni Mack commented on patch set 6 01/04/24, 08:32

    Reply

    Done

    Breaking-102627-RemovedSpecialPropertiesOfPageArraysInPageRepository.rst:33 Reply

    Done
  15. Oli Bartsch commented on patch set 6 01/04/24, 12:53

    PageRepository.php:642

    Using another column name than `sys_language_uid` will no break the overlay functionality since ['ctrl']['languageField'] is no longer respected, but we use the hard-coded name instead.
  16. Simon Schaufelberger commented on patch set 6 01/04/24, 12:59

    Breaking-102627-RemovedSpecialPropertiesOfPageArraysInPageRepository.rst:34

    "and are used to it for historical reasons" would be easier to understand. "used to due to..." is this corrrect english?
  17. Benni Mack commented on patch set 6 01/04/24, 14:39

    PageRepository.php:642 Reply

    I don't understand your comment
  18. Oli Bartsch commented on patch set 6 01/04/24, 15:09

    PageRepository.php:642 Reply

    Instead of setting `_PAGES_OVERLAY_LANGUAGE` to the value of `$row[$languageField]`, while `$languageField` represents the configured `TCA[ctrl][languageField]` value, we now use hard-coded `sys_language_uid`. This means, in case a developer does use a different field name in `TCA[ctrl][languageField]`, overlay functionality will break since there might be no `sys_language_uid` field at all.
  19. Benni Mack commented on patch set 7 V +1 01/05/24, 08:24

    Published edit on patch set 6.
  20. Benni Mack commented on patch set 7 01/05/24, 08:24

    PageRepository.php:642 Reply

    that would influence many other places then, can be handled separately

    Breaking-102627-RemovedSpecialPropertiesOfPageArraysInPageRepository.rst:34 Reply

    Done
  21. Oli Bartsch commented on patch set 7 CR +1 V +1 01/05/24, 08:25

    PageRepository.php:642 Reply

    ACK
  22. core-ci voted on patch set 7 V +1 01/05/24, 08:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51127

  23. Stefan Bürk voted on patch set 7 CR +1 V +1 01/06/24, 15:08

  24. Benni Mack voted on patch set 7 CR +2 V +2 01/06/24, 20:35

  25. Benni Mack merged patch set 8 01/06/24, 20:35