Bug #104576
closed
Disabled sys_template records are included via basedOn
Added by Sebastian Michaelsen 3 months ago.
Updated about 17 hours ago.
Description
When you include a disabled TypoScript template via the basedOn
field, the TypoScript record is loaded and effective on the website.
In TYPO3 v11 it worked as expected (disabled record is not effective), upgrading to v12 we experience this issue.
Files
- Category set to TypoScript
- Status changed from New to Needs Feedback
Some findings, also shared on slack where this was reported in #typo3-cms:
That's odd. vendor/typo3/cms-core/Classes/TypoScript/IncludeTree/SysTemplateTreeBuilder.php
in method getBasedOnSysTemplateRowsFromDatabase
calls:
$queryBuilder->setRestrictions($this->getSysTemplateQueryRestrictionContainer());
and that uses:
$restrictionContainer = GeneralUtility::makeInstance(DefaultRestrictionContainer::class);
if ($this->context->getPropertyFromAspect('visibility', 'includeHiddenContent', false)) {
$restrictionContainer->removeByType(HiddenRestriction::class);
}
so theoretically it should include the basedOn records only if the context property includeHiddenContent is enabled. Any chance you set that somewhere?
Or do you maybe use the frontend admin simulator toolbar and have that property enabled?
- Status changed from Needs Feedback to Closed
We have finally gotten to the bottom of this and it's not a TYPO3 core issue. What we did was, we disabled TypoScript records in an Update script, using DataHandler and forgot to add the cache clearing in the script. So the TypoScript record was disabled in the backend, but effective in the frontend - until the frontend cache was cleared.
Thanks for getting back to it and adding feedback, this is much appreciated :)
Also available in: Atom
PDF