Review main Merged

80518[BUGFIX] Ensure copied records keep l10n_state behavior

Benni Mack CR +2 V +2 Normal +52 −1 updated 08/15/23, 14:05

Commit message

This change adds a test for localized pages that have
a l10n_source "custom" value (e.g. "pages.author").

When copying the page and its translation,
the l10n_state field is then set to "source",
which is wrong.

copyRecord() sets l10n_source=0, however DataMapItem
expects "null". The patch makes DataMapItem understand
0 as value for l10n_source as well.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Jörg Bösche +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Christian Kuhn +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 1823

  1. Benni Mack uploaded patch set 1 08/11/23, 08:58

  2. Benni Mack updated the commit message in patch set 2 08/11/23, 08:58

  3. core-ci voted on patch set 1 V +1 08/11/23, 09:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45367

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

  5. Benni Mack uploaded patch set 3 V +1 08/11/23, 10:53

  6. Benni Mack voted on patch set 3 CR +1 08/11/23, 10:58

  7. Benni Mack voted on patch set 3 CR 0 08/11/23, 10:58

  8. Benni Mack wrote 08/11/23, 10:58

    Topic set to DataHandler
  9. core-ci voted on patch set 3 V +1 08/11/23, 11:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45378

  10. Oliver Klee commented on patch set 3 08/11/23, 12:17

    DataMapItem.php:222

    Now that we have three comparisons, an `in_array` might be called for: `if (!in_array($this->source, [0, null, $this->parent], true)) {`
  11. Benni Mack updated the commit message in patch set 4 V +1 08/11/23, 20:59

  12. core-ci voted on patch set 4 V +1 08/11/23, 21:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45397

  13. Christian Kuhn commented on patch set 4 08/14/23, 10:17

    DataMapItem.php:222 Reply

    i'd prefer to keep as proposed: the combined boolean expressions are easier to grasp.
  14. Oliver Klee commented on patch set 4 08/14/23, 10:18

    DataMapItem.php:222 Reply

    Ack
  15. Christian Kuhn uploaded patch set 5 V +1 08/14/23, 10:30

  16. Christian Kuhn voted on patch set 5 V +1 CR +1 08/14/23, 10:31

  17. core-ci voted on patch set 5 V +1 08/14/23, 10:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45475

  18. Oliver Klee voted on patch set 5 V +1 08/14/23, 16:39

  19. Jörg Bösche voted on patch set 5 CR +1 08/14/23, 19:05

  20. Andreas Kienast voted on patch set 5 V +1 CR +1 08/15/23, 12:10

  21. Stefan Bürk commented on patch set 5 V +1 CR +1 08/15/23, 13:25

    DataHandler.php:3749

    Is this sentence complete ?
  22. Stefan Bürk commented on patch set 5 V +2 CR +2 08/15/23, 13:46

    DataHandler.php:3749 Reply

    Done
  23. Stefan Bürk merged patch set 6 08/15/23, 14:05