Commit 9e937b46 authored by Jochen Roth's avatar Jochen Roth Committed by Stefan Bürk
Browse files

[BUGFIX] Exclude doktypes in SiteConfiguration

Currently, only SysFolders are excluded in
the SiteConfiguration overview which allows
to add a SiteConfiguration to pages where
it is superfluous.

This has been fixed by adding doktype spacer, recycler,
external link to the list of excluded doktypes in
the queryBuilder statement.

Resolves: #97609
Releases: main, 11.5
Change-Id: Idfb5a97c8780117b5b478c14e0d2e2946dfbca8e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74604

Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
parent a8fd1882
......@@ -702,6 +702,7 @@ class SiteConfigurationController
/**
* Returns a list of pages that have 'is_siteroot' set
* or are on pid 0 and not in list of excluded doktypes
*/
protected function getAllSitePages(): array
{
......@@ -716,7 +717,12 @@ class SiteConfigurationController
$queryBuilder->expr()->or(
$queryBuilder->expr()->and(
$queryBuilder->expr()->eq('pid', 0),
$queryBuilder->expr()->neq('doktype', PageRepository::DOKTYPE_SYSFOLDER)
$queryBuilder->expr()->notIn('doktype', [
PageRepository::DOKTYPE_SYSFOLDER,
PageRepository::DOKTYPE_SPACER,
PageRepository::DOKTYPE_RECYCLER,
PageRepository::DOKTYPE_LINK,
])
),
$queryBuilder->expr()->eq('is_siteroot', 1)
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment