Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Use default page id for fetching a site in SlugService
The rebuildSlugsForSlugChange function of SlugService updates slugs of sub pages and also creates redirects for them, after changing the slug of their parent page. This process requires to fetch the corresponding site configuration. In cases like changing the slug of a localized root page this throws a SiteNotFoundException, because the site is always mapped to the default page id which can not be determined for localized root pages because their pid is 0. It's therefore necessary to always use the default page id for fetching the site through SiteFinder. Resolves: #92733 Releases: master, 10.4 Change-Id: I8b41647d63d444982b2d2d6f209dea4278034488 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66353 Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Benni Mack <benni@typo3.org> Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by: Benni Mack <benni@typo3.org> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
- Loading branch information
1 parent
818abee
commit 67dde9c
Showing
3 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
typo3/sysext/redirects/Tests/Functional/Service/Fixtures/SlugServiceTest_pages_test4.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<dataset> | ||
<pages> | ||
<uid>1</uid> | ||
<pid>0</pid> | ||
<title>Root 1</title> | ||
<slug>/</slug> | ||
</pages> | ||
<pages> | ||
<uid>2</uid> | ||
<pid>1</pid> | ||
<title>Dummy 1-2</title> | ||
<slug>/dummy-1-2</slug> | ||
</pages> | ||
<pages> | ||
<uid>3</uid> | ||
<pid>1</pid> | ||
<title>Dummy 1-3</title> | ||
<slug>/dummy-1-3</slug> | ||
</pages> | ||
<pages> | ||
<uid>4</uid> | ||
<pid>2</pid> | ||
<title>Dummy 1-2-3</title> | ||
<slug>/dummy-1-2/dummy-1-2-3</slug> | ||
</pages> | ||
<pages> | ||
<uid>5</uid> | ||
<pid>0</pid> | ||
<title>Root 1 german</title> | ||
<slug>/</slug> | ||
<l10n_parent>1</l10n_parent> | ||
<l10n_source>1</l10n_source> | ||
<sys_language_uid>1</sys_language_uid> | ||
</pages> | ||
<pages> | ||
<uid>6</uid> | ||
<pid>1</pid> | ||
<title>Dummy 1-2 german</title> | ||
<slug>/dummy-1-2</slug> | ||
<l10n_parent>2</l10n_parent> | ||
<l10n_source>2</l10n_source> | ||
<sys_language_uid>1</sys_language_uid> | ||
</pages> | ||
<pages> | ||
<uid>7</uid> | ||
<pid>1</pid> | ||
<title>Dummy 1-3 german</title> | ||
<slug>/dummy-1-3</slug> | ||
<l10n_parent>3</l10n_parent> | ||
<l10n_source>3</l10n_source> | ||
<sys_language_uid>1</sys_language_uid> | ||
</pages> | ||
<pages> | ||
<uid>8</uid> | ||
<pid>2</pid> | ||
<title>Dummy 1-2-3 german</title> | ||
<slug>/dummy-1-2/dummy-1-2-3</slug> | ||
<l10n_parent>4</l10n_parent> | ||
<l10n_source>4</l10n_source> | ||
<sys_language_uid>1</sys_language_uid> | ||
</pages> | ||
</dataset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters