Bug #92568

PopulatePageSlugs upgrade wizard migrates wrong RealURL path data entry

Added by Mathias Brodala 8 days ago. Updated 4 days ago.

Status:
Resolved
Priority:
Must have
Category:
Link Handling, Site Handling & Routing
Target version:
Start date:
2020-10-15
Due date:
% Done:

100%

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

Description

The PopulatePageSlugs upgrade wizard allows to migrate entries from tx_realurl_pathdata. However, due to an additional DESC sorting, the wrong entry is used in case there is more than one for a page. This can actually happen often for $reasons.

Given the following two entries in tx_realurl_pathdata:

uid ... pagepath expire
1 ... first/path 0
2 ... second/path 0

RealURL will use the first/path, but the PopulatePageSlugs upgrade wizard will use the second/path. This leads to changed URLs after the upgrade.

RealURL itself does not apply any explicit sorting:

https://github.com/dmitryd/typo3-realurl/blob/2.6.2/Classes/Cache/DatabaseCache.php#L286

        $row = $this->databaseConnection->exec_SELECTgetSingleRow('*', 'tx_realurl_pathdata',
            'pid=' . (int)$pageId .
                ' AND language_id=' . (int)$languageId .
                ' AND rootpage_id=' . (int)$rootPageId .
                ' AND mpvar=' . ($mpVar ? $this->databaseConnection->fullQuoteStr($mpVar, 'tx_realurl_pathdata') : '\'\'') .
                ' AND expire=0'
        );

Thus in this case ASC is used by default.

Associated revisions

Revision 4d427521 (diff)
Added by Mathias Brodala 4 days ago

[BUGFIX] Migrate the most accurate RealURL page path to page slugs

Use the same sorting logic for page paths RealURL used, even if not consistently.

Resolves: #92568
Releases: 10.4, 9.5
Change-Id: Id01be5ed57cb5cf62d0a04bfcfd1e4cd8733fea5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66148
Tested-by: TYPO3com <>
Tested-by: Christian Kuhn <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Torben Hansen <>
Reviewed-by: Christian Kuhn <>
Reviewed-by: Anja Leichsenring <>

Revision 95ed3e3c (diff)
Added by Mathias Brodala 4 days ago

[BUGFIX] Migrate the most accurate RealURL page path to page slugs

Use the same sorting logic for page paths RealURL used, even if not consistently.

Resolves: #92568
Releases: 10.4, 9.5
Change-Id: Id01be5ed57cb5cf62d0a04bfcfd1e4cd8733fea5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66143
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review 8 days ago

  • Status changed from New to Under Review

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/+/66143

#2 Updated by Gerrit Code Review 8 days ago

Patch set 2 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/+/66143

#3 Updated by Gerrit Code Review 8 days ago

Patch set 3 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/+/66143

#4 Updated by Gerrit Code Review 8 days ago

Patch set 4 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/+/66143

#5 Updated by Gerrit Code Review 8 days ago

Patch set 5 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/+/66143

#6 Updated by Gerrit Code Review 8 days ago

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/c/Packages/TYPO3.CMS/+/66147

#7 Updated by Gerrit Code Review 8 days ago

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

#8 Updated by Gerrit Code Review 8 days ago

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

#9 Updated by Gerrit Code Review 8 days ago

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

#10 Updated by Gerrit Code Review 4 days ago

Patch set 6 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/+/66143

#11 Updated by Gerrit Code Review 4 days ago

Patch set 7 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/+/66143

#12 Updated by Mathias Brodala 4 days ago

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

Also available in: Atom PDF