Review main Merged

83310[TASK] Add tests for copying localized content to non-translated page

André Buchmann CR +2 V +2 Hard +566 −74 updated 05/13/24, 06:43

Commit message

Copy/move pages with existing translation into another site with
different language setup results in orphaned problematic page
translation records. It's not only about a complete page to another
page, but also about copy/move of a record/content element to a page
which does not have the same translations as the original page.

This test verifies the current behavior as a basis for further discussions.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Eric Harrer +1
  • Verified V +2 Done
    • Benni Mack +2
    • Eric Harrer +1
    • Oliver Klee +1
    • core-ci +1 CI

Issues 2

Files 26

Show 6 more files

Review log 3444

Show 1419 earlier messages
  1. André Buchmann uploaded patch set 1 03/07/24, 17:08

  2. core-ci voted on patch set 1 V -1 03/07/24, 17:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54154

  3. André Buchmann uploaded patch set 2 V -1 03/07/24, 17:20

  4. core-ci voted on patch set 2 V +1 03/07/24, 17:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54157

  5. André Buchmann updated the commit message in patch set 3 V +1 03/08/24, 10:05

  6. core-ci voted on patch set 3 V +1 03/08/24, 10:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54225

  7. Benni Mack commented on patch set 3 03/10/24, 23:16

    we call it a NonTranslatedPage instead of "NoneTranslatedPage" - apart from that, this looks legit.
  8. André Buchmann uploaded patch set 4 V +1 03/20/24, 16:13

  9. core-ci voted on patch set 4 V +1 03/20/24, 16:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54730

  10. André Buchmann commented on patch set 4 03/20/24, 16:21

    Reply

    Thx, changed
  11. Benni Mack voted on patch set 4 CR +1 V +1 03/20/24, 23:15

  12. Christian Kuhn commented on patch set 4 03/20/24, 23:21

    wip?
  13. Christian Kuhn commented on patch set 4 CR -1 03/21/24, 06:45

    Reply

    great job, but i guess benni upvoted slightly too early here. it would be great if we could extend the patch with the workspace variants.
  14. Benni Mack commented on patch set 4 CR 0 V 0 03/21/24, 07:11

    Reply

    argh, it was very late ;)
  15. André Buchmann marked it work in progress 04/06/24, 08:26

  16. André Buchmann uploaded patch set 5 CR -1 V +1 04/28/24, 11:05

  17. André Buchmann marked it ready for review 04/28/24, 11:07

  18. André Buchmann marked it work in progress 04/28/24, 11:08

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

  1. André Buchmann uploaded patch set 6 V +1 04/28/24, 12:22

  2. core-ci voted on patch set 6 V +1 04/28/24, 12:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56916

  3. André Buchmann uploaded patch set 7 V +1 04/28/24, 18:39

  4. core-ci voted on patch set 7 V +1 04/28/24, 18:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56928

  5. André Buchmann marked it ready for review 04/28/24, 18:49

  6. André Buchmann commented on patch set 7 04/28/24, 18:50

    Reply

    Workspace tests are now added. Please review them :-)
  7. Oliver Klee updated the commit message in patch set 8 V +1 04/29/24, 07:34

  8. Oliver Klee voted on patch set 8 V +1 04/29/24, 07:34

  9. core-ci voted on patch set 8 V +1 04/29/24, 07:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56955

  10. Benni Mack updated the commit message in patch set 9 V +1 04/29/24, 08:36

  11. Benni Mack voted on patch set 9 CR +1 V +1 04/29/24, 08:36

  12. core-ci voted on patch set 9 V +1 04/29/24, 08:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56957

  13. Oliver Klee voted on patch set 9 V +1 04/29/24, 09:03

  14. Oliver Klee commented on patch set 9 04/29/24, 09:06

    AbstractActionTestCase.php:143

    I'm not a big fan of overriding methods and of `parent::*` calls (and also it's not clear from these methods here that they're expected to be overriden in subclasses). Maybe we can have methods with a different name, or have this method call another (empty) method that then gets overriden in the subclasses. That would feel cleaner and more explicit to me. What do you think?
  15. Christian Kuhn commented on patch set 9 04/29/24, 10:25

    AbstractActionTestCase.php:143 Reply

    That's how *all* DataScenarios tests are structured at the moment: there is a base implementation in the abstracts without #[Test] that does the main magic, single test cases then extend the abstract class methods, call parent, and have #[Test] attribute. I don't like it too much either, but it's a working approach once you're used to it. I strongly suggest to not deviate from that system with new tests now: If changed, it should be changed globally for all DataScenarios/ tests with a dedicated patch.
  16. Christian Kuhn commented on patch set 9 04/29/24, 10:29

    do you think we should have similar scenarios for pages, too? Copying a page that has translations to a page that has not? pages is a bit special in this case, and i think we'll end up with keeping those pages translations on-copy, while we don't keep them when other table records are copied?
  17. Oliver Klee commented on patch set 9 04/29/24, 10:30

    AbstractActionTestCase.php:143 Reply

    Ack, thanks for the explanation.
  18. André Buchmann commented on patch set 9 04/29/24, 12:19

    Reply

    We already have this scenario covered with the `copyPage` tests. They copy the page with uid 89 to 90. 89 has translations to language 1 and 2. The target 90 has no translations.
  19. Eric Harrer commented on patch set 9 CR +1 V +1 05/10/24, 08:39

    The changes seem to follow the usual rules and look plausible to me. The tests run successfully in the local test environment.
  20. André Buchmann updated the commit message in patch set 10 CR +1 V +1 05/10/24, 10:42

  21. Eric Harrer voted on patch set 10 CR +1 V +1 05/10/24, 10:42

  22. core-ci voted on patch set 10 V +1 05/10/24, 10:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/57478

  23. Oliver Klee voted on patch set 10 V +1 05/10/24, 11:25

  24. Benni Mack voted on patch set 10 CR +2 V +2 05/13/24, 06:43

  25. Benni Mack merged patch set 11 05/13/24, 06:43