Bug #87697

Copying a page copies the slug without making it unique

Added by Helmut Hummel 10 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-02-12
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

  • Have a site configuration
  • Create a page
  • Copy that page

Expectation: the copied page has a unique slug

Actual result: the copied page has the identical slug as the original, leading to a slug conflict

duplicate_slug.png View (59.3 KB) André Schließer, 2019-03-01 09:39

correct_slug.png View (58.4 KB) André Schließer, 2019-03-01 09:39

Associated revisions

Revision 672290f8 (diff)
Added by Helmut Hummel 9 months ago

[BUGFIX] Make slugs unique when copying pages

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.

Resolves: #87697
Releases: master, 9.5
Change-Id: Iac5fa7adc673c41662b652e932c23b90633e0d5d
Reviewed-on: https://review.typo3.org/c/59686
Tested-by: TYPO3com <>
Tested-by: Jürgen Venne <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Jürgen Venne <>
Reviewed-by: Anja Leichsenring <>

Revision a4d06382 (diff)
Added by Helmut Hummel 9 months ago

[BUGFIX] Make slugs unique when copying pages

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.

Resolves: #87697
Releases: master, 9.5
Change-Id: Iac5fa7adc673c41662b652e932c23b90633e0d5d
Reviewed-on: https://review.typo3.org/c/59830
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review 10 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59686

#2 Updated by André Schließer 9 months ago

I found an other scenario to produce duplicate slugs:

  • Create a sysfolder (level 1)
  • Add a second sysfolder as cild of first (level 2)
  • Create a page on level 1 with the same name like the second sysfolder

With his patch this scenario is also fixed:

Without patch With patch

#3 Updated by Gerrit Code Review 9 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59686

#4 Updated by Gerrit Code Review 9 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59686

#5 Updated by Gerrit Code Review 9 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59686

#6 Updated by Gerrit Code Review 9 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59830

#7 Updated by Helmut Hummel 9 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#8 Updated by Benni Mack 7 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF