Review main Merged

58049[BUGFIX] Return correct source record for relations

Nicole Hummel CR +2 V +2 Normal +116 −99 updated 05/05/21, 13:32

Commit message

This change addresses a flaw when resolving ancestor ids of 1:n
relationships - resolving `l10n_source` pointer always was `0`.

Besides that now only non-empty `l10n_parent` or `l10n_source` are
returned as integer. Otherwise `null` is returned and signals that
a corresponding ancestor could not be resolved at all.

Scenario `localizeParentContentChainLanguageSynchronizationSource` of
`DataHandling\IRRE\ForeignField\Modify\ActionTest` was given already,
however `l10n_source` fields were missing in their TCA.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Alexander Opitz +1
    • Markus Klein +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Alexander Opitz +1
    • core-ci +1 CI

Issues 1

Files 20

Review log 4061

Show 2436 earlier messages
  1. Nicole Hummel uploaded patch set 1 08/27/18, 14:17

  2. TYPO3com voted on patch set 1 V -1 08/27/18, 14:27 Completed build in 09m 28s on Mon, 27 Aug, 04:27 PM Test Summary: 3 of 35529 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27131

  3. Nicole Hummel uploaded patch set 2 09/04/18, 11:53

  4. TYPO3com voted on patch set 2 V +1 09/04/18, 12:03 Completed build in 09m 55s on Tue, 4 Sep, 02:03 PM Test Summary: 35980 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27762

  5. Nicole Hummel updated the commit message in patch set 3 09/04/18, 12:28

  6. Nicole Hummel commented on patch set 3 09/04/18, 12:31

    DataMapProcessor.php:1048

    This is not needed as IN() is applied in line 1031 anyway.

    DataMapProcessor.php:1154

    If source and parent are the same, we can simply return source as well.

    DataMapProcessor.php:1180

    prevent ancestor ids 0 in the result set.
  7. TYPO3com voted on patch set 3 V +1 09/04/18, 12:39 Completed build in 11m 22s on Tue, 4 Sep, 02:39 PM Test Summary: 35980 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27768

  8. Nicole Hummel commented on patch set 3 V -1 CR -1 09/04/18, 17:18

    DataMapProcessor.php:1156

    Notice: returning the fieldname here was wrong all the time. We need to return the element value of that field.
  9. Nicole Hummel uploaded patch set 4 09/04/18, 17:20

  10. TYPO3com voted on patch set 4 V +1 09/04/18, 17:28 Completed build in 08m 03s on Tue, 4 Sep, 07:28 PM Test Summary: 35980 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27781

  11. Oliver Hader commented on patch set 4 09/09/18, 08:49

    I looked at the patch for almost an hour now, but do not see the actual bug this is fixing. Most probably removing the "gt" constraint will introduce new side-effects when resolving dependent elements. Can you please point out, which misbehavior shall be fixed?
  12. Nicole Hummel commented on patch set 4 09/09/18, 09:52

    @Olly: Did you see the comments on patch set 3 I made to explain the changes? First: The constraint ">0" in the SQL query should be superfluous, because IN() is already used to limit the result to a subset of items. Removing the greater than zero constraint revealed some more problems in the current API. I guess the constraint was introduced, because the IN() constraint contains "0" as well, because empty anchestores were included as well. This is fixed with the current patch as well. For me this is a problem, because there was a constraint added to correct some other misbehaviour. Furthermore there is this problem, that not the value is returned, but a fieldname converted to int (which returns 0 always as a string does not contain any number). This is solved as well.
  13. Oliver Hader commented on patch set 4 09/09/18, 14:01

    DataMapProcessor.php:1048

    Removing this, will trigger synchronization for free-mode localizations

    DataMapProcessor.php:1154

    Basically this is the real bugfix then only

    DataMapProcessor.php:1180

    I guess this is not needed anymore having the `(int)$fieldNames['source']` fixed
  14. Oliver Hader commented on patch set 4 09/09/18, 14:28

    Besides my comments, can you please point out for which scenario that happened? How can one reproduce the behavior?
  15. Nicole Hummel commented on patch set 4 09/09/18, 18:14

    I'm still validating in which scenario the broken code gets triggered. I found the things by reading the code when dealing with the problem mentioned in this https://forge.typo3.org/issues/86147 ticket. At least the functional tests showed my some problems after I had simply removed the gt() constraint. I then debugged the existing functional tests. You might get some more information when having a view at the broken tests for the first patch set.

    DataMapProcessor.php:1048 Reply

    I don't get your comment, sorry. The result set should be come from IN($idsParameter) that is applied to each constraint here. Can you explain what your comment means, please?

    DataMapProcessor.php:1180 Reply

    I don't know exactly. I have found some tt_content elements with 'source' = 0 but l18n_parent set to some id. My purpose here: change resolveAncesterId() to return 0 (instead of null) and check for 0 explicit. This would also drop dopple return type of that method.
  16. Nicole Hummel commented on patch set 4 09/09/18, 20:32

    @Olly: I think I found a valid use case that gets fixed with this patch. Added some additional information to the forge ticket
  17. Nicole Hummel updated the commit message in patch set 5 09/09/18, 22:10

  18. TYPO3com voted on patch set 5 V +1 09/09/18, 22:19 Completed build in 09m 23s on Mon, 10 Sep, 12:19 AM Test Summary: 35863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27928

  19. Oliver Hader commented on patch set 5 CR -1 09/10/18, 14:08

    See my remarks at https://forge.typo3.org/issues/86141 - this issue cannot be solved currently in a generic approach. This patch would introduce new side effects...
  20. Nicole Hummel uploaded patch set 6 09/10/18, 14:42

  21. TYPO3com voted on patch set 6 V +1 09/10/18, 14:52 Completed build in 09m 40s on Mon, 10 Sep, 04:52 PM Test Summary: 35863 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27946

  22. Nicole Hummel rebased onto patch set 7 09/10/18, 15:55

  23. TYPO3com voted on patch set 7 V +1 09/10/18, 16:11 Completed build in 11m 06s on Mon, 10 Sep, 06:11 PM Test Summary: 35869 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-27955

  24. Oliver Hader voted on patch set 7 V +1 CR +1 09/10/18, 21:04

  25. Andreas Wolf uploaded patch set 8 09/25/18, 14:19

  26. TYPO3com voted on patch set 8 V -1 09/25/18, 14:19 Completed build in 09s on Tue, 25 Sep, 04:19 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28605

  27. Andreas Wolf uploaded patch set 9 09/25/18, 14:23

  28. TYPO3com voted on patch set 9 V -1 09/25/18, 14:33 Completed build in 10m 00s on Tue, 25 Sep, 04:33 PM Test Summary: 3 of 36453 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28606

  29. Andreas Wolf uploaded patch set 10 09/25/18, 15:07

  30. TYPO3com voted on patch set 10 V -1 09/25/18, 15:08 Completed build in 09s on Tue, 25 Sep, 05:08 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28609

  31. Andreas Wolf uploaded patch set 11 09/25/18, 15:10

  32. TYPO3com voted on patch set 11 V -1 09/25/18, 15:21 Completed build in 10m 39s on Tue, 25 Sep, 05:21 PM Test Summary: 3 of 36453 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-28610

  33. Andreas Wolf commented on patch set 11 09/25/18, 15:27

    I added a functional test, but I keep getting the error, both when doing the steps manually and with the functional test.
  34. Benni Mack updated the commit message in patch set 12 12/14/18, 09:57

  35. Benni Mack commented on patch set 12 12/14/18, 09:57

    Updated the releases line
  36. TYPO3com voted on patch set 12 V -1 12/14/18, 10:32 Completed build in 30m 29s on Fri, 14 Dec, 11:32 AM Test Summary: 3 of 49172 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30687

  1. TYPO3com commented on patch set 12 12/06/19, 12:09 Completed build in 07m 53s on Fri, 6 Dec, 12:09 PM Test Summary: 67989 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39148

  2. TYPO3com commented on patch set 12 01/16/20, 10:21 Completed build in 20m 11s on Thu, 16 Jan, 10:21 AM Test Summary: 69455 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40011

  3. TYPO3com commented on patch set 12 01/16/20, 10:44 Completed build in 1h 03m 59s on Thu, 16 Jan, 10:44 AM Test Summary: 69455 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40011

  4. TYPO3com commented on patch set 12 01/16/20, 11:49 Completed build in 1h 05m 01s on Thu, 16 Jan, 11:49 AM Test Summary: 69184 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40024

  5. Henning Liebe uploaded patch set 13 01/16/20, 12:34

  6. TYPO3com voted on patch set 13 V -1 01/16/20, 12:57 Completed build in 22m 27s on Thu, 16 Jan, 12:57 PM Test Summary: 3 of 70820 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40038

  7. Benni Mack rebased onto patch set 14 03/07/20, 20:24

  8. TYPO3com voted on patch set 14 V -1 03/07/20, 20:40 Completed build in 13m 34s on Sat, 7 Mar, 08:40 PM Test Summary: 3 of 72580 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1100

  9. Christian Kuhn wrote 07/16/20, 09:06

    Removed reviewer Christian Kuhn.
  10. Oliver Hader uploaded patch set 15 05/05/21, 09:18

  11. core-ci voted on patch set 15 V -1 05/05/21, 09:35 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11187

  12. Oliver Hader uploaded patch set 16 05/05/21, 09:56

  13. Oliver Hader uploaded patch set 17 05/05/21, 10:03

  14. Oliver Hader commented on patch set 17 05/05/21, 10:05

    Without this patch, but `l10n_source` being using in `irre_tutorial`: * https://gitlab.typo3.org/TYPO3/CI/cms/-/jobs/79381#L233 * expected "child not processed" exception - copied from CI run ``` 1) TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\Modify\ActionTest::localizeParentContentChainLanguageSynchronizationSource RuntimeException: Child record was not processed /builds/TYPO3/CI/cms/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php:642 /builds/TYPO3/CI/cms/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php:452 /builds/TYPO3/CI/cms/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php:353 /builds/TYPO3/CI/cms/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php:389 /builds/TYPO3/CI/cms/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php:278 /builds/TYPO3/CI/cms/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php:152 /builds/TYPO3/CI/cms/typo3/sysext/core/Classes/DataHandling/DataHandler.php:862 ``` Having the change in `DataMapProcessor` applied solved it.
  15. core-ci voted on patch set 16 V +1 05/05/21, 10:07 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11194

  16. Oliver Hader commented on patch set 17 V +1 CR +1 05/05/21, 10:11

    This change is ready for review.

    Reply

  17. core-ci voted on patch set 17 V +1 05/05/21, 10:14 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11195

  18. Markus Klein voted on patch set 17 CR +1 05/05/21, 10:20

  19. Alexander Opitz commented on patch set 17 CR +1 05/05/21, 10:42

    Will test after lunch
  20. Oliver Hader commented on patch set 17 CR -1 05/05/21, 11:21

    Go ahead testing, but don't merge yet
  21. Alexander Opitz commented on patch set 17 V +1 05/05/21, 11:49

    Works fine (also the 9.5 backport)
  22. Oliver Hader commented on patch set 17 CR 0 05/05/21, 11:51

    @Alex thanks for testing... Problem in v9.5 is due to missing back-ports/behavior
  23. Oliver Hader voted on patch set 17 CR +1 05/05/21, 11:51

  24. Oliver Hader voted on patch set 17 V +2 CR +2 05/05/21, 13:32

  25. Oliver Hader merged patch set 18 05/05/21, 13:32