[BUGFIX] Resolve and link modified slugs in workspaces properly 55/59955/6
authorBenni Mack <benni@typo3.org>
Sat, 9 Mar 2019 13:36:57 +0000 (14:36 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 25 Mar 2019 14:57:29 +0000 (15:57 +0100)
commitb666df05843bdfb6bbd865ebb44b47b88d0b257a
tree652d2f4e672c742576cbeebee333f52c0125682a
parenteb0de49e602240d3021df6eee20193aa6e998d0c
[BUGFIX] Resolve and link modified slugs in workspaces properly

When a page (slug) is modified in a preview workspace,
links to that page need to be changed to the new slug, as the
preview (PageRouter) should evaluate this as well.

1) The PageRouter should include records with "-1"
to find them as well, but then fix the "pid" again to
find the pid of the online version.

2) The PageLink Builder now uses the SiteFinder nstead of SiteMatcher
to detect whether the linked page uid is part of a configured site.
We do not need to create/detect a PseudoSite here, only instances
of Site are of interest.

Resolves: #87871
Releases: master, 9.5
Change-Id: Ifd6add71bec1616049f8c6a50a42bc9f573395e2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59955
Tested-by: Benjamin Franzke <bfr@qbus.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Classes/Routing/PageRouter.php
typo3/sysext/frontend/Classes/Typolink/PageLinkBuilder.php
typo3/sysext/frontend/Tests/Functional/SiteHandling/Fixtures/SlugScenario.yaml
typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugLinkGeneratorTest.php