Skip to content

Commit

Permalink
[BUGFIX] Avoid additional SQL query in slug lookup for pages
Browse files Browse the repository at this point in the history
PageRepository->fixVersioningPid() needs "t3ver_wsid" and "t3ver_oid"
to resolve a version, otherwise previewing in workspace context takes
another SQL query per page slug candidate.

Resolves: #91556
Releases: master, 10.4, 9.5
Change-Id: Ie95365fe76cd2e6e502324c5dbe145651795cff1
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64659
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
bmack committed Jun 3, 2020
1 parent ef695e4 commit be569e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/Routing/PageRouter.php
Expand Up @@ -404,7 +404,7 @@ protected function getPagesFromDatabaseForCandidates(array $slugCandidates, int
->add(GeneralUtility::makeInstance(FrontendWorkspaceRestriction::class, null, null, $searchLiveRecordsOnly));

$statement = $queryBuilder
->select('uid', 'l10n_parent', 'pid', 'slug', 'mount_pid', 'mount_pid_ol', 't3ver_state', 'doktype')
->select('uid', 'l10n_parent', 'pid', 'slug', 'mount_pid', 'mount_pid_ol', 't3ver_state', 'doktype', 't3ver_wsid', 't3ver_oid')
->from('pages')
->where(
$queryBuilder->expr()->eq(
Expand Down

0 comments on commit be569e7

Please sign in to comment.