Review main Merged

61719[BUGFIX] Use latest slug in PopulatePageSlug

Sybille Peters CR +2 V +2 Easy +1 −1 updated 01/17/20, 14:42

Commit message

PopulatePageSlug is an upgrade wizard which migrates existing slugs
from realurl tables to the table pages.slug.

In realurl, when the page title changed, the realurl slug changed
(if not fixed). Realurl handled this by adding temporary entries to
its tables which would be used to redirect the URL to its new location.
These entries had a fixed expiration date (expire > 0). The final
slug had no expiration date (expire = 0)

The previous behaviour in PopulatePageSlug preferred entries from
tx_realurl_pathdata with an expiration date (expire > 0) over
entries without (expire = 0). This would prefer (temporary) entries
that were only used for the redirects over the final slug.

This patch uses the 'uid' for sorting in descending order, which
will always use the latest entry for a specific page / language
combinations.

Review

  • Code review CR +2 Done
    • Frank Nägler +2
    • Sascha Rademacher +1
    • Albrecht Köhnlein +1
  • Verified V +2 Done
    • Frank Nägler +2
    • Sascha Rademacher +1
    • Albrecht Köhnlein +1
    • TYPO3com +1 CI

Issues 2

Files 1

Review log 3244

Show 1619 earlier messages
  1. Sybille Peters uploaded patch set 1 09/18/19, 07:49

  2. TYPO3com voted on patch set 1 V -1 09/18/19, 08:00 Completed build in 10m 22s on Wed, 18 Sep, 08:00 AM Test Summary: 1 of 47848 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36530

  3. Albrecht Köhnlein commented on patch set 1 09/18/19, 09:05

    PopulatePageSlugs.php:251

    If you want to find records, which expired in the past or expired just now, the correct line should be: $queryBuilder->expr()->lte('expire', $queryBuilder->createNamedParameter($currentTimestamp)) ... which means "expire <= now".
  4. Sybille Peters uploaded patch set 2 09/18/19, 10:10

  5. Sybille Peters commented on patch set 2 09/18/19, 10:10

    PopulatePageSlugs.php:251 Reply

    Actually, it was intended to get all that have not expired yet (expire > current) as was already done before. The expire != 0 makes no sense though and is unnessecary. I will remove. The intention was to prioritize the records with expire = 0 and then prioritize records with greater expire date. Since we can't use an order that will put expire =0 first and then order by expire DESC I split up the query into 2. Not so pretty, but hopefully effective.
  6. Albrecht Köhnlein commented on patch set 2 09/18/19, 10:14

    PopulatePageSlugs.php:251 Reply

    Than your comment in line 243 is wrong, where you write "use expired slugs (...)" ;-)
  7. TYPO3com voted on patch set 2 V +1 09/18/19, 10:21 Completed build in 11m 08s on Wed, 18 Sep, 10:21 AM Test Summary: 47553 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36535

  8. Sybille Peters uploaded patch set 3 09/18/19, 11:34

  9. Sybille Peters commented on patch set 3 09/18/19, 11:35

    PopulatePageSlugs.php:251 Reply

    right. Is now fixed.
  10. TYPO3com voted on patch set 3 V +1 09/18/19, 11:45 Completed build in 11m 00s on Wed, 18 Sep, 11:45 AM Test Summary: 47553 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-36540

  11. Jörg Bösche voted on patch set 3 CR +1 10/07/19, 14:09

  12. Sascha Rademacher voted on patch set 3 CR +1 10/08/19, 06:19

  13. Julian Geils voted on patch set 3 CR +1 10/08/19, 06:29

  14. Benni Mack commented on patch set 3 01/09/20, 14:10

    Hey Sybille, isn't this fixed with https://review.typo3.org/c/Packages/TYPO3.CMS/+/62795 ?
  15. Sybille Peters commented on patch set 3 01/09/20, 14:49

    @benni I don't know. I would have to check.
  16. Sybille Peters commented on patch set 3 01/09/20, 14:58

    @benni My intention was to give the entries with no expiration (expire=0) a higher priority than the ones which will expire (expire!=0). They should be used first. Your patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/62795 uses sort by expire DESC, so the one with the highest value (to be expired) would be preferred (instead of values with no expiry). I don't like the 2 queries either very much but I think this is the best way to do it, currently.
  17. Albrecht Köhnlein commented on patch set 3 01/10/20, 08:10

    > Patch Set 3: > > Hey Sybille, > > isn't this fixed with https://review.typo3.org/c/Packages/TYPO3.CMS/+/62795 ? In your both patches, you do ordering by `expires` - but how do you know, which is the latest change? Maybe the configuration and expiring rules changed somehow? Why not sort by `uid DESC` to get the latest entry?
  18. Sybille Peters commented on patch set 3 01/10/20, 08:42

    > Patch Set 3: > > > Patch Set 3: > > > > Hey Sybille, > > > > isn't this fixed with https://review.typo3.org/c/Packages/TYPO3.CMS/+/62795 ? > > In your both patches, you do ordering by `expires` - but how do you know, which is the latest change? Maybe the configuration and expiring rules changed somehow? Why not sort by `uid DESC` to get the latest entry? I agree. Sorting by uid DESC sounds like a good solution.
  19. Sybille Peters uploaded patch set 4 01/10/20, 11:54

  1. Albrecht Köhnlein voted on patch set 4 V +1 CR +1 01/10/20, 11:59

  2. TYPO3com voted on patch set 4 V -1 01/10/20, 12:10 Completed build in 15m 49s on Fri, 10 Jan, 12:10 PM Test Summary: 68909 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39784

  3. TYPO3com commented on patch set 4 01/10/20, 13:47 Completed build in 18m 52s on Fri, 10 Jan, 01:47 PM Test Summary: 24 of 58961 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39786

  4. TYPO3com commented on patch set 4 01/10/20, 13:56 Completed build in 17m 16s on Fri, 10 Jan, 01:56 PM Test Summary: 16 of 58650 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39787

  5. TYPO3com commented on patch set 4 01/10/20, 14:05 Completed build in 26m 25s on Fri, 10 Jan, 02:05 PM Test Summary: 1 of 68512 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39788

  6. TYPO3com voted on patch set 4 V +1 01/10/20, 14:40 Completed build in 1h 27m 38s on Fri, 10 Jan, 02:40 PM Test Summary: 69191 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39788

  7. Alexander Schnitzler commented on patch set 4 01/12/20, 12:00

    I wouldn't understand that oneliner without the description. Any chance we can rewrite the commit message to make it more meaningful?
  8. Sybille Peters commented on patch set 4 01/12/20, 12:11

    > Patch Set 4: > > (1 comment) I agree about the commit msg. I am eating right now. I can do it later or you can go ahead.

    Reply Unresolved

    Done
  9. Sybille Peters uploaded patch set 5 01/12/20, 12:45

  10. Sybille Peters wrote 01/12/20, 12:46

    Description set to "Update commit message"
  11. Sybille Peters updated the commit message in patch set 6 01/12/20, 12:48

  12. Sybille Peters updated the commit message in patch set 7 01/12/20, 12:55

  13. TYPO3com voted on patch set 5 V +1 01/12/20, 13:03 Completed build in 11m 13s on Sun, 12 Jan, 01:03 PM Test Summary: 69191 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39812

  14. TYPO3com voted on patch set 6 V +1 01/12/20, 13:11 Completed build in 18m 46s on Sun, 12 Jan, 01:11 PM Test Summary: 69191 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39814

  15. TYPO3com voted on patch set 7 V +1 01/12/20, 13:17 Completed build in 13m 51s on Sun, 12 Jan, 01:17 PM Test Summary: 69187 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-39815

  16. Albrecht Köhnlein voted on patch set 7 V +1 CR +1 01/12/20, 14:54

  17. Steffen Frese voted on patch set 7 CR +1 01/14/20, 07:16

  18. Sascha Rademacher voted on patch set 7 CR +1 01/16/20, 09:27

  19. Felix P. voted on patch set 7 CR +1 01/16/20, 09:39

  20. Susi Moog updated the commit message in patch set 8 01/16/20, 10:01

  21. TYPO3com voted on patch set 8 V +1 01/16/20, 10:32 Completed build in 14m 33s on Thu, 16 Jan, 10:32 AM Test Summary: 70372 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-40013

  22. Albrecht Köhnlein voted on patch set 8 V +1 CR +1 01/16/20, 12:05

  23. Sascha Rademacher voted on patch set 8 V +1 CR +1 01/16/20, 12:25

  24. Frank Nägler voted on patch set 8 V +2 CR +2 01/17/20, 14:42

  25. Frank Nägler merged patch set 9 01/17/20, 14:42