Review main Merged

80012[BUGFIX] Localize children of all languages element

André Buchmann CR +2 V +2 Hard +856 −1 updated 09/08/23, 21:54

Commit message

When the parent record has been set to sys_language_uid=-1, but the
child record has translations, it should be displayed in the correct
language. Setting the languageUid for the querySettings to -1 results
in display of the default language record of the child.

Review

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

Issues 1

Files 22

Show 2 more files

Review log 2942

Show 1117 earlier messages
  1. André Buchmann uploaded patch set 1 07/12/23, 13:32

  2. André Buchmann uploaded patch set 2 07/12/23, 13:37

  3. core-ci voted on patch set 1 V -1 07/12/23, 13:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44080

  4. core-ci voted on patch set 2 V -1 07/12/23, 13:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44082

  5. André Buchmann uploaded patch set 3 V -1 07/12/23, 14:01

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

  7. Oliver Klee commented on patch set 3 07/12/23, 14:47

    Can we please cover this with a regression test (a functional test)?
  8. Oliver Klee commented on patch set 3 07/12/23, 15:02

    Reply

    (marking this comment as not resolved yet)
  9. André Buchmann uploaded patch set 4 V +1 07/28/23, 12:55

  10. core-ci voted on patch set 4 V -1 07/28/23, 13:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44673

  11. André Buchmann marked it work in progress 07/28/23, 13:33

  12. André Buchmann uploaded patch set 5 V -1 07/28/23, 14:25

  13. core-ci voted on patch set 5 V -1 07/28/23, 14:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44677

  14. André Buchmann uploaded patch set 6 V -1 07/29/23, 10:49

  15. André Buchmann uploaded patch set 7 07/29/23, 10:52

  16. core-ci voted on patch set 6 V -1 07/29/23, 10:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44730

  17. André Buchmann uploaded patch set 8 07/29/23, 10:58

  1. core-ci voted on patch set 7 V -1 07/29/23, 11:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44731

  2. André Buchmann uploaded patch set 9 07/29/23, 11:05

  3. core-ci voted on patch set 8 V -1 07/29/23, 11:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44732

  4. core-ci voted on patch set 9 V +1 07/29/23, 11:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44733

  5. André Buchmann marked it ready for review 07/29/23, 11:13

  6. André Buchmann commented on patch set 9 07/29/23, 11:14

    Reply

    Tests are now implemented
  7. Stefan Bürk commented on patch set 9 07/29/23, 14:41

    ParentChildTranslation.php:26

    Should be "ParentChildTranslationTest". We use a `Test` suffix for tests, which is a casual practice for unit/functional tests.
  8. André Buchmann uploaded patch set 10 V +1 07/30/23, 09:15

  9. core-ci voted on patch set 10 V -1 07/30/23, 09:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44746

  10. André Buchmann commented on patch set 10 07/30/23, 09:32

    ParentChildTranslation.php:26 Reply

    Sorry, missed that. Is now fixed.
  11. core-ci commented on patch set 10 07/30/23, 10:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44746

  12. Stefan Bürk commented on patch set 10 07/30/23, 12:01

    ParentChildTranslation.php:26 Reply

    Now the test is executed in CI and failing for postgres.
  13. André Buchmann uploaded patch set 11 V -1 07/31/23, 08:01

  14. Benni Mack commented on patch set 11 07/31/23, 08:04

    very nice work!!!
  15. core-ci voted on patch set 11 V +1 07/31/23, 08:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44779

  16. anonymized-98012 voted on patch set 11 CR +1 08/31/23, 07:21

  17. anonymized-98012 voted on patch set 11 V +1 09/01/23, 07:41

  18. Oliver Klee voted on patch set 11 V +1 09/01/23, 10:34

  19. Stefan Bürk commented on patch set 11 09/05/23, 13:32

    Nice work. Found some minor things. TBH - did not gasp this in the first run. Need to play around more with it and have a relook - and think about further implications. Not sure if the tests are "sufficient" enough. I have a feeling that we oversee forther things, but I might be wrong. Will take a relook the next days.

    MainController.php:24

    test controller, no need for extending. make final.

    MainController.php:28

    We can use ccp here (with readonly). V11 support can change this than to this variant.

    Child.php:27

    Is this not superfluous with the native property type ?

    Child.php:34

    return type is superfluous.

    Child.php:44

    Param type is superfluous.

    Main.php:30

    superfluous ?

    Main.php:37

    superfluous

    Main.php:85

    superfluous

    Main.php:95

    superfluous

    Main.php:105

    superfluous

    Main.php:115

    superfluous

    Main.php:125

    superfluous - the comment is nearly useless, and the method/variable name makes it obious

    Squeeze.php:27

    superfluous

    Squeeze.php:34

    superfluous

    Squeeze.php:41

    superfluous

    Squeeze.php:51

    superfluous

    Squeeze.php:61

    superfluous

    Squeeze.php:71

    superfluous

    sys_template.php:5

    CORE usually uses ``` defined('TYPO3') or die(); ``` which is also the "recommended" snippet communicated. We should keep that and not starting mixing it in the core / fixture extensions.

    tt_content.php:5

    ``` defined('TYPO3') or die(); ```

    ext_localconf.php:6

    ``` defined('TYPO3') or die(); ```

    ext_tables.sql:1

    Core way is to have comment lines per create-table set. We should keep that for fixture extensions also (as best-practice). ``` # # Table structure for table 'tx_parentchildtranslation_domain_model_main' # ``` same for other tables in this file ...

    ParentChildTranslationTest.php:38

    Only needed two times .. avoid the property and this in the setUp method, and instead use it directly in the test functions below. Remove this along with the property in L30. Avoiding state in test classes if possible.

    ParentChildTranslationTest.php:46

    Avoid the property and call directly: ``` $this->get(MainRepository::class)->createQuery(); ```

    ParentChildTranslationTest.php:73

    Avoid the property and call directly: ``` $this->get(MainRepository::class)->createQuery(); ```
  20. André Buchmann uploaded patch set 12 CR +1 V +1 09/05/23, 14:20

  21. core-ci voted on patch set 12 V +1 09/05/23, 14:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/46241

  22. André Buchmann commented on patch set 12 09/05/23, 14:50

    Reply

    Thanks for the review. I've added the proposed code changes. Let me know if you find more test cases.

    MainController.php:24 Reply

    Class is now final

    MainController.php:28 Reply

    used readonly. Wasn't sure if I should do this due to php compatibility

    Child.php:27 Reply

    I think so. Removed

    Child.php:34 Reply

    Removed

    Child.php:44 Reply

    Removed

    Main.php:30 Reply

    Removed

    Main.php:37 Reply

    Removed

    Main.php:85 Reply

    Removed

    Main.php:95 Reply

    Removed

    Main.php:105 Reply

    Removed

    Main.php:115 Reply

    Removed

    Main.php:125 Reply

    Removed

    Squeeze.php:27 Reply

    Removed

    Squeeze.php:34 Reply

    Removed

    Squeeze.php:41 Reply

    Removed

    Squeeze.php:51 Reply

    Removed

    Squeeze.php:61 Reply

    Removed

    Squeeze.php:71 Reply

    Removed

    sys_template.php:5 Reply

    I agree. It's changed.

    tt_content.php:5 Reply

    Changed

    ext_localconf.php:6 Reply

    Changed

    ext_tables.sql:1 Reply

    Added comment for each table

    ParentChildTranslationTest.php:38 Reply

    Thanks for the hint to improve the logic. It's removed with L30

    ParentChildTranslationTest.php:46 Reply

    Changed

    ParentChildTranslationTest.php:73 Reply

    Changed
  23. Benni Mack voted on patch set 12 V +1 CR +1 09/08/23, 20:13

  24. Stefan Bürk voted on patch set 12 V +2 CR +2 09/08/23, 21:03

  25. Stefan Bürk merged patch set 13 09/08/23, 21:54