Review main Merged

61500[FEATURE] Re-implement old PIDupinRootline condition in TypoScript

Elias Häußler CR +2 V +2 Normal +80 −16 updated 01/24/20, 17:22

Commit message

The TypoScript condition matcher is now able to match pages up in the
root line as the old "PIDupinRootline" behavior was. By using the new
"tree.rootLineParentIds" expression, one can check if a given page is
part of the root line but not currently on the requested page.

Example:

  [30 in tree.rootLineParentIds]
      ...
  [end]

This is basically the same as:

  [30 in tree.rootLineIds && page["uid"] != 30]
      ...
  [end]

Review

  • Code review CR +2 Done
    • Susi Moog +2
    • Daniel Goerz +1
  • Verified V +2 Done
    • Susi Moog +2
    • Daniel Goerz +1
    • TYPO3com +1 CI

Issues 1

Files 5

Review log 3045

Show 1420 earlier messages
  1. Elias Häußler uploaded patch set 1 08/15/19, 14:57

  2. TYPO3com voted on patch set 1 V +1 08/15/19, 15:07 Completed build in 10m 29s on Thu, 15 Aug, 03:07 PM Test Summary: 47211 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35709

  3. Georg Ringer commented on patch set 1 08/15/19, 15:09

    I would also merge that into 9.5 which means that the rst needs to belong into the 9.5.x directory and in the rst change wording to "prior to 9"
  4. Elias Häußler uploaded patch set 2 08/15/19, 15:17

  5. TYPO3com voted on patch set 2 V +1 08/15/19, 15:28 Completed build in 10m 32s on Thu, 15 Aug, 03:28 PM Test Summary: 47211 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35710

  6. Sven Juergens voted on patch set 2 CR +1 08/16/19, 08:26

  7. Jan Delius commented on patch set 2 V -1 08/20/19, 08:40

    Currently the function call "array_column($this->rootline, 'pid')" returns the 0 by the top page in the tree. Even though I don't think anyone does this query, the old function will produce different results in the following example: [0 in tree.rootLineParentIds] = true [PIDupinRootline = 0] = false
  8. Elias Häußler uploaded patch set 3 08/20/19, 09:44

  9. Elias Häußler commented on patch set 3 08/20/19, 09:49

    > Patch Set 2: Verified-1 > > Currently the function call "array_column($this->rootline, 'pid')" returns the 0 by the top page in the tree. Even though I don't think anyone does this query, the old function will produce different results in the following example: > > [0 in tree.rootLineParentIds] = true > > [PIDupinRootline = 0] = false Thanks, good point! Fixed that in the current patch.
  10. TYPO3com voted on patch set 3 V +1 08/20/19, 09:58 Completed build in 14m 19s on Tue, 20 Aug, 09:58 AM Test Summary: 47211 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-35743

  11. Elias Häußler uploaded patch set 4 09/05/19, 16:30

  12. TYPO3com voted on patch set 4 V +1 09/05/19, 16:42 Completed build in 11m 07s on Thu, 5 Sep, 04:42 PM Test Summary: 47364 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36109

  13. Frank Nägler commented on patch set 4 09/06/19, 14:34

    We did not forget to implement that but deliberately did not do it because the solution is the condition already mentioned in the ticket. I opt for not merging this change.
  14. Elias Häußler commented on patch set 4 09/09/19, 09:09

    > Patch Set 4: > > We did not forget to implement that but deliberately did not do it because the solution is the condition already mentioned in the ticket. > > I opt for not merging this change. You're totally true – on the other hand, I think a standalone expression will make something like this way better readable: [tree.rootLineIds in [25,34,39,44] && page["uid"] not in [25,34,39,44]] IMHO this should be equivalent to the classic "PIDupinRootline": [PIDupinRootline = 25,34,39,44] With the patch, the following, shorter expression would be way better readable and understandable (in my opinion) – at least in cases of duplicate code and redundancies: [tree.rootLineParentIds in [25,34,39,44]] Especially for checks against multiple PIDs in conditions, the expression would be a nice improvement as it can solve multiple use cases at once.
  15. Elias Häußler uploaded patch set 5 09/09/19, 09:42

  16. TYPO3com voted on patch set 5 V +1 09/09/19, 09:51 Completed build in 09m 15s on Mon, 9 Sep, 09:51 AM Test Summary: 47388 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36212

  17. Susi Moog commented on patch set 5 09/11/19, 13:14

    Did not review the patch yet, however I think the change is an improvement for integrators and a valid combination of conditions (maybe alias or short-hand is the right word here).
  18. Elias Häußler rebased onto patch set 6 09/12/19, 14:26

  19. TYPO3com voted on patch set 6 V +1 09/12/19, 14:49 Completed build in 21m 43s on Thu, 12 Sep, 02:49 PM Test Summary: 47542 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36383

  20. Elias Häußler rebased onto patch set 7 09/17/19, 11:15

  1. TYPO3com voted on patch set 7 V +1 09/17/19, 11:26 Completed build in 10m 48s on Tue, 17 Sep, 11:26 AM Test Summary: 47562 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36501

  2. Frank Nägler commented on patch set 7 10/11/19, 09:47

    I am still against this change, but I will not block it.
  3. Daniel Goerz uploaded patch set 8 01/22/20, 11:43

  4. Daniel Goerz commented on patch set 8 01/22/20, 11:45

    rebased
  5. TYPO3com voted on patch set 8 V -1 01/22/20, 11:53 Completed build in 09m 57s on Wed, 22 Jan, 11:53 AM Test Summary: 3 of 71000 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40131

  6. TYPO3com commented on patch set 8 01/22/20, 13:58 Completed build in 09m 30s on Wed, 22 Jan, 01:58 PM Test Summary: 3 of 71000 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40140

  7. Daniel Goerz commented on patch set 8 01/22/20, 14:10

    Elias, could you have a look at the tests, they are failing: TYPO3\CMS\Backend\Tests\Functional\Configuration\TypoScript\ConditionMatching\ConditionMatcherTest::PIDupinRootlineConditionMatchesSinglePageIdInRootline Failed asserting that false is true. /srv/bamboo/xml-data/build-dir/CORE-GTC-FPG0PHP7304/typo3/sysext/backend/Tests/Functional/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php:177
  8. Elias Häußler commented on patch set 8 01/23/20, 09:18

    > Patch Set 8: > > Elias, could you have a look at the tests, they are failing: > > TYPO3\CMS\Backend\Tests\Functional\Configuration\TypoScript\ConditionMatching\ConditionMatcherTest::PIDupinRootlineConditionMatchesSinglePageIdInRootline > Failed asserting that false is true. > > /srv/bamboo/xml-data/build-dir/CORE-GTC-FPG0PHP7304/typo3/sysext/backend/Tests/Functional/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php:177 i'm on it
  9. Elias Häußler uploaded patch set 9 01/23/20, 09:43

  10. TYPO3com voted on patch set 9 V +1 01/23/20, 09:56 Completed build in 12m 44s on Thu, 23 Jan, 09:56 AM Test Summary: 70575 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40162

  11. Susi Moog uploaded patch set 10 01/24/20, 13:39

  12. TYPO3com voted on patch set 10 V -1 01/24/20, 13:50 Completed build in 11m 06s on Fri, 24 Jan, 01:50 PM Test Summary: 1 of 71028 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40186

  13. TYPO3com voted on patch set 10 V +1 01/24/20, 13:52 Completed build in 24m 02s on Fri, 24 Jan, 01:52 PM Test Summary: 70578 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40186

  14. Daniel Goerz commented on patch set 10 01/24/20, 14:41

    ConditionMatcher.php:50 Unresolved

    Why are we slicing with -2 here? Combined with 'pid' this does not look right.

    ConditionMatcher.php:54 Unresolved

    I dont get this. Isn't it either array_slice(array_column($this->rootline, 'uid'), 0, -1); or just array_column($this->rootline, 'pid') but not both (taking the pid AND slicing)?
  15. Daniel Goerz commented on patch set 10 01/24/20, 16:34

    Testing this, revealed the following: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63024
  16. Daniel Goerz uploaded patch set 11 01/24/20, 16:42

  17. Daniel Goerz commented on patch set 11 01/24/20, 16:42

    Expecting Tests to fail now
  18. TYPO3com voted on patch set 11 V -1 01/24/20, 16:51 Completed build in 09m 09s on Fri, 24 Jan, 04:51 PM Test Summary: 6 of 71028 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40195

  19. Susi Moog rebased onto patch set 12 01/24/20, 16:52

  20. Daniel Goerz uploaded patch set 13 01/24/20, 16:56

  21. TYPO3com voted on patch set 12 V +1 01/24/20, 17:10 Completed build in 17m 16s on Fri, 24 Jan, 05:10 PM Test Summary: 70578 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40197

  22. TYPO3com voted on patch set 13 V +1 01/24/20, 17:13 Completed build in 15m 49s on Fri, 24 Jan, 05:13 PM Test Summary: 70578 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40198

  23. Daniel Goerz voted on patch set 13 V +1 CR +1 01/24/20, 17:15

  24. Susi Moog voted on patch set 13 V +2 CR +2 01/24/20, 17:21

  25. Susi Moog merged patch set 14 01/24/20, 17:22