Review main Merged

59686[BUGFIX] Make slugs unique when copying pages

Helmut Hummel CR +2 V +2 Easy +19 −13 updated 03/01/19, 16:02

Commit message

When a page is copied the slug for the copied page
needs to be unique for a site. To accomplish that,
the site for the record is fetched. Since this new
record does not have a uid yet, the parent page uid
must be used to determine the site.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Jürgen Venne +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Jürgen Venne +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 2024

  1. Helmut Hummel uploaded patch set 1 02/12/19, 17:49

  2. Guido Schmechel commented on patch set 1 02/12/19, 17:54

    SlugHelper.php:253

    isUniqueInPid isn't affected?
  3. TYPO3com voted on patch set 1 V +1 02/12/19, 18:02 Completed build in 13m 12s on Tue, 12 Feb, 07:02 PM Test Summary: 46561 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32167

  4. Joerg Kummer commented on patch set 1 V +1 02/12/19, 18:06

    works for me
  5. Richard Haeser voted on patch set 1 CR +1 02/12/19, 20:55

  6. André Buchmann commented on patch set 1 V +1 CR +1 02/12/19, 22:27

    Tested successfully in master and 9.5 isUniqueInPid seems not to be affected: Installed news in 9.5, changed the TCA setting to "uniqueInPid", created a new news-record and copied it. It's allways appended by "-1".
  7. Oliver Hader commented on patch set 1 02/13/19, 07:31

    Hm... good one... so either I could see that in `RecordState` behavior or in a prior normalization step before building `RecordState`. Besides that we just extend the test cases with these scenarios...
  8. Helmut Hummel commented on patch set 1 02/13/19, 07:52

    @olly yes, thought about putting that into record state as well. however was wondering about the return type of string in this method and also was not sure about intention and other use cases of resolveNodeAggregateIdentifier tests? yes. should be added of course. I just wanted to have a first quick fix in place for a project and raise awareness here in upstream.

    SlugHelper.php:253 Reply

    yes and no. since for any other records than pages, the id of the containing page is returned, and unique in pid does not make much sense for pages, this fix would be enough. but it is correct that in theory uniqueness pid is affected as well, so the fix should rather be applied in a more generic place.
  9. Guido Schmechel commented on patch set 1 V +1 CR +1 02/22/19, 17:07

    Tested with pages "Test1" and "Test1-1". Slug is build as "test1-2". All fine :-)
  10. Markus Klein commented on patch set 1 02/28/19, 21:47

    SlugHelper.php:253 Reply

    Helmut, can you please rephrase your question. What do you mean with "uniqueness pid"? Thanks.
  11. Guido Schmechel commented on patch set 1 V -1 03/01/19, 11:40

    -1 until clarification
  12. Benni Mack commented on patch set 1 03/01/19, 13:39

    SlugHelper.php:253 Reply Unresolved

    Markus, the issue that Helmut fixed, is only regarding "pages" that have the wrong pid on creation. When using "uniqueInPid" this would become an issue as well. However, "uniqueInPid" is a different story (different code, different place), and needs to be fixed in a different area.
  13. Guido Schmechel voted on patch set 1 V +1 03/01/19, 13:43

  14. Benni Mack commented on patch set 1 CR -2 03/01/19, 13:44

    Adding tests now
  15. Benni Mack uploaded patch set 2 03/01/19, 14:03

  16. Benni Mack voted on patch set 2 V +1 CR +1 03/01/19, 14:04

  17. Benni Mack uploaded patch set 3 03/01/19, 14:10

  18. TYPO3com voted on patch set 2 V -1 03/01/19, 14:16 Completed build in 12m 19s on Fri, 1 Mar, 03:16 PM Test Summary: 46605 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32456

  19. TYPO3com voted on patch set 3 V -1 03/01/19, 14:48 Completed build in 28m 01s on Fri, 1 Mar, 03:48 PM Test Summary: 46605 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32460

  20. Anja Leichsenring uploaded patch set 4 03/01/19, 15:36

  21. TYPO3com voted on patch set 4 V +1 03/01/19, 15:48 Completed build in 12m 11s on Fri, 1 Mar, 04:48 PM Test Summary: 46641 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32467

  22. Jürgen Venne voted on patch set 4 V +1 CR +1 03/01/19, 15:58

  23. Anja Leichsenring voted on patch set 4 V +2 CR +2 03/01/19, 16:02

  24. Anja Leichsenring merged patch set 5 03/01/19, 16:02