Review main Merged

51978[BUGFIX] TCA field using MM table is incorrectly duplicates relations

Georg Ringer CR +2 V +2 Easy +6 −8 updated 03/20/17, 09:45

Commit message

The previous change disabled the lookup on the parent UID which resulted
in getting all possible relations due to the missing constraint. Now the
behavior is mitigated by resetting non-numeric values to zero which will
lead to an empty result set - like implicitly for MySQL before.

Review

  • Code review CR +2
    • Oliver Hader +2
    • Thomas Hohn +1
    • Georg Ringer +1
    • Markus Sommer +1
    • Marcus Schwemer +1
  • Verified V +2
    • Oliver Hader +2
    • Thomas Hohn +1
    • Georg Ringer +1
    • Markus Sommer +1
    • Marcus Schwemer +1
    • TYPO3com +1 CI

Files 1

Review log 2023

  1. Georg Ringer uploaded patch set 1 03/07/17, 18:09

  2. TYPO3com voted on patch set 1 V -1 03/07/17, 18:17 Completed build in 08m 18s on Tue, 7 Mar, 07:17 PM Test Summary: 8 of 56410 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8986

  3. Oliver Hader uploaded patch set 2 03/07/17, 22:54

  4. TYPO3com voted on patch set 2 V +1 03/07/17, 23:03 Completed build in 08m 54s on Wed, 8 Mar, 12:03 AM Test Summary: 56410 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8994

  5. Oliver Hader voted on patch set 2 CR +1 03/07/17, 23:12

  6. Thomas Hohn commented on patch set 2 CR +1 V +1 03/08/17, 06:01

    Testet and the SQL error is gone. Would be nice to have this one that is related merged also :-) https://review.typo3.org/#/c/51976/
  7. Georg Ringer voted on patch set 2 CR +1 V +1 03/08/17, 07:38

  8. Timo Webler commented on patch set 2 CR -1 03/08/17, 07:59

    RelationHandler.php:531

    `$uid` is now zero, so this doesn't work. See method `start`
  9. Oliver Hader commented on patch set 2 03/09/17, 10:18

    RelationHandler.php:531 Reply

    If you know it's wrong, you surely can provide the correct change? Thx
  10. Oliver Hader commented on patch set 2 03/09/17, 10:26

    RelationHandler.php:531 Reply

    @Timo: Did you check the invocation in the start() method? readMM is not called at all if $MMuid is empty - the check above avoids direct calls with non-numeric $uid values
  11. Marcus Schwemer voted on patch set 2 V +1 03/15/17, 09:49

  12. Timo Webler commented on patch set 2 CR 0 03/15/17, 09:54

    RelationHandler.php:531 Reply

    OK. But why this method should read data for `uid` 0? Or for example for `uid` -1? The value for `uid` should be greater then 0.
  13. Thomas Hohn commented on patch set 2 03/15/17, 12:04

    RelationHandler.php:531 Reply

    I don't recall explicit checks for conditions like that - the caller should ensure that a valid value is passed to the method ;-)
  14. Markus Sommer voted on patch set 2 CR +1 03/17/17, 12:52

  15. Oliver Hader uploaded patch set 3 03/19/17, 19:05

  16. Oliver Hader commented on patch set 3 03/19/17, 19:07

    I just simplified the patch to just concentrate on the bug - to avoid further side-discussions
  17. TYPO3com voted on patch set 3 V +1 03/19/17, 19:12 Completed build in 06m 12s on Sun, 19 Mar, 08:12 PM Test Summary: 56527 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9342

  18. Georg Ringer voted on patch set 3 CR +1 V +1 03/19/17, 19:15

  19. Thomas Hohn commented on patch set 3 CR +1 V +1 03/20/17, 06:45

    Seems to work - it would be nice if https://review.typo3.org/#/c/51976/ could also be reviewed by someone - since it's in the same area ;-)
  20. Marcus Schwemer voted on patch set 3 CR +1 V +1 03/20/17, 07:52

  21. Markus Sommer commented on patch set 3 CR +1 V +1 03/20/17, 07:57

    Works :)
  22. Oliver Hader voted on patch set 3 CR +2 V +2 03/20/17, 09:45

  23. Gerrit merged patch set 3 03/20/17, 09:45