Review main Merged

59176[BUGFIX] Fix ActionMenuItemViewHelper select-attribute

Kevin Ditscheid CR +2 V +2 Easy +26 −9 updated 03/07/20, 20:22

Commit message

This commit fixes the setting of the select-attribute for menu items,
that have a different arguments-array given to them, but the same
controller => action combination as other menu items.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Susi Moog +1
  • Verified V +2 Done
    • Benni Mack +2
    • Susi Moog +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 2330

Show 35 earlier messages
  1. Kevin Ditscheid uploaded patch set 1 12/17/18, 09:24

  2. TYPO3com voted on patch set 1 V -1 12/17/18, 09:25 Completed build in 10s on Mon, 17 Dec, 10:25 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30761

  3. Kevin Ditscheid updated the commit message in patch set 2 12/17/18, 09:28

  4. TYPO3com voted on patch set 2 V -1 12/17/18, 09:31 Completed build in 21s on Mon, 17 Dec, 10:31 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-30763

  5. Kevin Ditscheid uploaded patch set 3 12/21/18, 14:05

  1. TYPO3com voted on patch set 3 V +1 12/21/18, 14:26 Completed build in 19m 22s on Fri, 21 Dec, 03:26 PM Test Summary: 48176 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-31032

  2. Kevin Ditscheid uploaded patch set 4 01/02/19, 13:09

  3. TYPO3com voted on patch set 4 V -1 01/02/19, 13:09 Completed build in 09s on Wed, 2 Jan, 02:09 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-31187

  4. Kevin Ditscheid uploaded patch set 5 01/02/19, 13:56

  5. TYPO3com voted on patch set 5 V +1 01/02/19, 14:06 Completed build in 09m 51s on Wed, 2 Jan, 03:06 PM Test Summary: 47833 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-31189

  6. Oliver Klee commented on patch set 5 01/02/19, 14:47

    Is 8.7 affected as well?
  7. Kevin Ditscheid commented on patch set 5 01/02/19, 14:54

    > (1 comment) I did not test this with 8.7, yet
  8. Stefanos Karasavvidis commented on patch set 5 01/08/19, 14:28

    It seems that there are unnecessary code lines. I've tested against 9 and the current dev version. It is sufficient to to compare the request arguments with the arguments of the viewhelper arguments. What I am not sure of is whether the request arguments may have additional, unrelated arguments. In this case, the array_diff would not work. You would have to check with an additional array_diff, with opposite order of arguments to make sure.

    ActionMenuItemViewHelper.php:92

    I would rename this to $requestArguments

    ActionMenuItemViewHelper.php:99

    if the tag has already the selected attribute, there is no need to add it again. In combination with the removal of the else below, it would be unnecessary

    ActionMenuItemViewHelper.php:102

    The else statement is unnecessary.
  9. Stefanos Karasavvidis commented on patch set 5 01/08/19, 14:32

    please see comments within the code. There are unnecessary code lines. Tested with current dev and 9. What I am unsure of is whether the request arguments may have additional, unrelated arguments. In this case the array_diff would not work, and you would have to call a 2nd array_diff with opposite argument order to make sure
  10. Kevin Ditscheid uploaded patch set 6 02/14/19, 17:00

  11. TYPO3com voted on patch set 6 V +1 02/14/19, 17:14 Completed build in 14m 12s on Thu, 14 Feb, 06:14 PM Test Summary: 46561 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32205

  12. Susi Moog commented on patch set 6 02/23/19, 19:48

    Can you add a short "how to reproduce" to the ticket to make it easier to test?
  13. Stefanos Karasavvidis commented on patch set 6 V +1 02/24/19, 10:31

    added test extension to ticket to reproduce it
  14. Joerg Kummer voted on patch set 6 V +1 02/24/19, 11:28

  15. Oliver Klee commented on patch set 6 03/25/19, 11:10

    ActionMenuItemViewHelper.php:93

    Can we please move this to a separate, well-named method?

    ActionMenuItemViewHelper.php:95

    Can we remove this comment by having well-named local variables instead? (In the current version, I find the code very hard to grok.)
  16. Alexander Schnitzler commented on patch set 6 05/08/19, 09:36

    I'd like to ask what's the status here because I was asked to postpone https://review.typo3.org/c/Packages/TYPO3.CMS/+/59625 until this one gets merged. Any news?
  17. Alexander Schnitzler commented on patch set 6 07/02/19, 15:14

    > Patch Set 6: > > I'd like to ask what's the status here because I was asked to postpone https://review.typo3.org/c/Packages/TYPO3.CMS/+/59625 until this one gets merged. Any news? ping
  18. Steffen Frese commented on patch set 6 CR -1 07/08/19, 07:01

    ActionMenuItemViewHelper.php:108

    why not just compare them like `$requestArguments === $viewHelperArguments`. Also array_diff throughs a notice if one of the arrays is multidimensional and this is very slow in comparison
  19. Susi Moog uploaded patch set 7 02/28/20, 07:34

  20. Susi Moog commented on patch set 7 02/28/20, 07:35

    ActionMenuItemViewHelper.php:108 Reply Unresolved

    multidimensional: not a problem, both arrays are flattened before comparison comparing with === fails if the order is different, would need a loose comparison (==) which is kinda ugly, or a sort beforehand (which is also kinda slow), so I left it like it is - I guess in this case (backend action menus) the performance impact is negliable.
  21. TYPO3com voted on patch set 7 V +1 02/28/20, 07:45 Completed build in 11m 12s on Fri, 28 Feb, 07:45 AM Test Summary: 72003 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-767

  22. Kevin Ditscheid commented on patch set 7 02/28/20, 08:04

    Wow, that's quite a bit more complicated then I expected it to be :-/
  23. Susi Moog commented on patch set 7 V +1 CR +1 02/28/20, 08:25

    > Patch Set 7: > > Wow, that's quite a bit more complicated then I expected it to be :-/ @Kevin: Can you test if it still does what you expect?
  24. Benni Mack voted on patch set 7 V +2 CR +2 03/07/20, 20:22

  25. Benni Mack merged patch set 8 03/07/20, 20:22