Review main Merged

63757[BUGFIX] Fix order of deleting page translations in DataHandler

Sybille Peters CR +2 V +2 Normal +67 −3 updated 03/24/20, 20:22

Commit message

If a page translation exists, it should be deleted before the
original page.

It the translation is deleted after the deletion of the original
page, this will result in an error because the existance and
delete permissions of the original page is checked before
deletion of the translated page.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Benni Mack +2
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 1825

  1. Sybille Peters uploaded patch set 1 03/17/20, 13:27

  2. TYPO3com voted on patch set 1 V +1 03/17/20, 13:39 Completed build in 11m 36s on Tue, 17 Mar, 01:39 PM Test Summary: 72036 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1400

  3. Oliver Klee commented on patch set 1 03/17/20, 15:45

    Can we have tests for this?
  4. Sybille Peters uploaded patch set 2 03/23/20, 12:11

  5. Sybille Peters commented on patch set 2 03/23/20, 12:11

    > Patch Set 1: > > Can we have tests for this? I added a test
  6. TYPO3com voted on patch set 2 V -1 03/23/20, 12:25 Completed build in 14m 04s on Mon, 23 Mar, 12:25 PM Test Summary: 72225 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1610

  7. TYPO3com commented on patch set 2 03/23/20, 12:43 Completed build in 10m 54s on Mon, 23 Mar, 12:43 PM Test Summary: 72225 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1612

  8. Sybille Peters uploaded patch set 3 03/23/20, 13:41

  9. Sybille Peters commented on patch set 3 03/23/20, 13:44

    I am not sure if my new test will get automatically executed: This executes my new test (which currently fails locally on purpose): Build/Scripts/runTests.sh -s functional typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DeleteTranslatedSubpages.php This does not: Build/Scripts/runTests.sh -s functional typo3/sysext/core/Tests/Functional/ This does not: Build/Scripts/runTests.sh -s functional typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/ This does not: Build/Scripts/runTests.sh -s functional Shouldn't all tests get executed?
  10. Georg Ringer commented on patch set 3 CR -1 03/23/20, 13:47

    DeleteTranslatedSubpages.php:25

    class + filename must end with Test
  11. TYPO3com voted on patch set 3 V +1 03/23/20, 13:53 Completed build in 12m 10s on Mon, 23 Mar, 01:53 PM Test Summary: 72225 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1621

  12. Sybille Peters uploaded patch set 4 03/23/20, 13:55

  13. Sybille Peters commented on patch set 4 03/23/20, 13:57

    DeleteTranslatedSubpages.php:25 Reply

    Done
  14. TYPO3com voted on patch set 4 V +1 03/23/20, 14:08 Completed build in 12m 37s on Mon, 23 Mar, 02:08 PM Test Summary: 72228 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1623

  15. Alexander Schnitzler commented on patch set 4 03/23/20, 14:15

    DeleteTranslatedSubpagesTest.php:52

    I fail to see the connection between sys_log and the code you changed. I believe that your statement is true but it's hard to verify. Don't we have a better way to verify that this fix works? Like checking $dataHandler->errors or so?
  16. Sybille Peters commented on patch set 4 03/23/20, 14:37

    DeleteTranslatedSubpagesTest.php:52 Reply

    Without my change in DataHandler, this test will fail. It will report an entry in sys_log. I can have a look to see if there is a better way to test for errors.
  17. Sybille Peters commented on patch set 4 03/23/20, 14:47

    DeleteTranslatedSubpagesTest.php:52 Reply Unresolved

    Currently if an error occurs, a flash message is sent and a sys_log is created in deletePages(): /** @var FlashMessage $flashMessage */ $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $res, '', FlashMessage::ERROR, true); /** @var FlashMessageService $flashMessageService */ $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); $flashMessageService->getMessageQueueByIdentifier()->addMessage($flashMessage); $this->newlog($res, SystemLogErrorClassification::USER_ERROR); I don't really see why the flash message gets sent there anyway. This breaks if called via command line. Changing this however is kind of beyond the scope of this patch ... I can try to make minimal change and add an entry to $this->errorLog ...
  18. Sybille Peters uploaded patch set 5 03/23/20, 14:56

  19. Sybille Peters rebased onto patch set 6 03/23/20, 15:06

  20. TYPO3com voted on patch set 5 V +1 03/23/20, 15:08 Completed build in 11m 46s on Mon, 23 Mar, 03:08 PM Test Summary: 72228 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1628

  21. TYPO3com voted on patch set 6 V +1 03/23/20, 15:19 Completed build in 13m 06s on Mon, 23 Mar, 03:19 PM Test Summary: 72228 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1629

  22. Benni Mack voted on patch set 6 V +1 CR +1 03/24/20, 16:48

  23. Georg Ringer voted on patch set 6 V +1 CR +1 03/24/20, 19:31

  24. Benni Mack voted on patch set 6 V +2 CR +2 03/24/20, 20:22

  25. Benni Mack merged patch set 7 03/24/20, 20:22