Bug #90163
openSite config still being used even if page is no longer site root
0%
Description
If the "Use as Root Page" flag is removed from the properties of a page with its own site config, that site config is still being used in the FE, if the config.yaml file is still present.
This can be highly misleading as the page is no longer visually recognizable as a site root in BE. Additionally, it shows up under "Unassigned site configurations" in sites management, with the explanation:
"The following sites don't belong to any page anymore and can be removed."
This also suggests that the site config is no longer in use, while it actually still is.
IMHO, this is actually a missing feature: an easy way to disable/enable a site configuration without having to rename/delete the respective config.yaml. I had hoped that this could be achieved by temporarily removing the "Use page as Root Page" flag.
Updated by Frank Berger over 4 years ago
I had the same problem today as well.
Three separate sites where merged into a new one with a new siteconfig. The old siteconfig was still used on the pages in frontend and backend (slug field). Only solution was to remove the site/X/config.yaml files alltogether.
This is a valid scenario during the lifetime of a site with multiple domains. For example Microsites or Landingpages that are later merged into the main site, which probably is an editorial task. Checking then the Siteconfig Module will reveal that those extraneous config.yaml are marked as inactive.
The process that parses and caches the siteconfig should only parse and cache those where the rootPageId references a page-record where the root flag is actually set.
a fix would probably be somewhere here: \TYPO3\CMS\Core\Configuration\SiteConfiguration::getAllSiteConfigurationFromFiles
Updated by Benni Mack about 2 years ago
- Related to Bug #93423: wrong https in slug of one page added
Updated by Riccardo De Contardi 7 months ago ยท Edited
- TYPO3 Version changed from 9 to 12
- PHP Version changed from 7.2 to 8.1
IMHO it is still reproducible on 13.2.0-dev (latest main) with the following procedure:
Prerequisites¶
- A TYPO3 installation with
- a "Home" root page (the one auto-created with the installation for example)
- a Site Config with the following (minimal) setup:
- Root Page ID [rootPageId]
: Home
- Site Identifier [identifier]
: main
- Website title [websiteTitle]
: TITLE
- Entry Point [base]
: https://typo3.main.it.ddev.site:8443
with this config, for example, a subpage "test" will have
- URL: https://typo3.main.it.ddev.site:8443/test/
- TAG <title>
: TITLE: test
Test procedure¶
- Create a subpage of "test" called "Test-90163"
- mark it as root
[is_siteroot]
= 1 (tab Behavior)
The page has the following characteristics:
- URL: https://typo3.main.it.ddev.site:8443/test/test-90163
- TAG <title>
: TITLE: Test-90163
- Go to "sites" module > the new root page "Test-90163" has been detected and TYPO3 offers to create a new config file; create a new config entry with the following (minimal) setup
- Site Identifier [identifier]
: test-90163
- Website title [websiteTitle]
: MY TITLE IS test-90163
- Entry Point [base]
: https://typo3.main.it.ddev.site:8443/mysubsite
now the page has the following characteristics:
- URL: https://typo3.main.it.ddev.site:8443/mysubsite/test/test-90163
- TAG <title>
: MY TITLE IS test-90163: Test-90163
- Now Edit again "Test-90163"
- unmark it as root
[is_siteroot]
= 0 , save it
Results¶
- on the Sites module the "test-90163" config is no more listed
- The page can be still reached with the URL: https://typo3.main.it.ddev.site:8443/mysubsite/test/test-90163
- If I edit the page > Tab General > URL Segment
[slug]
: the "fixed" part is stillhttps://typo3.main.it.ddev.site:8443/mysubsite
- TAG
<title>
: it is still: MY TITLE IS test-90163: Test-90163 - I have no way to tell that there is a Site config applied to that page AFAICS
- To undo the config, I deleted it on the filesystem and cleared the cache
I suspect that the same issue applies to TYPO3 12, therefore I raise the version to 12