Bug #88841
closedConditions in .tsconfig file are not read
0%
Description
Hey,
I'm including a include.tsconfig file in the backend for GridElement configuration with the following content:
[PIDinRootline = 1462]
<INCLUDE_TYPOSCRIPT: source="FILE: EXT:my_gridelements/Configuration/TSconfig/includeMyConfig.tsconfig">
[END]
This is working as expected. When setting the PIDinRootline to an invalid value, my GridElements aren't there.
But when it comes to rendering in the frontend, this is not working. I have to remove the whole condition. First, I thought this is something related to the new Symfony Expression changes that came with TYPO3 v9, but it's still happening on the old conditions that are still working in general.
Here's a (maybe) related ticket: https://forge.typo3.org/issues/86923
Thanks for reading, have a nice day.
Updated by Jonas Eberle over 5 years ago
- Related to Bug #86923: Symfony expressions/conditions doesn't work in user-tsconfig added
Updated by Jonas Eberle over 5 years ago
- Related to Bug #86229: Symfony expressions/conditions doesn't work in user-tsconfig added
Updated by Frank Nägler about 5 years ago
- Status changed from New to Needs Feedback
Julian Stock wrote:
But when it comes to rendering in the frontend, this is not working. I have to remove the whole condition.
Maybe I don't understand the problem, but TSConfig is related to BE only and is not scope of the frontend.
From the documentation (https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/Introduction/Index.html):
TSconfig is used in TYPO3 to configure and customize the backend on a page and a user or group basis.
Updated by Alexander Böhm almost 5 years ago
I can confirm this issue.
The "issue" in this case is that gridelements is using the page TSConfig to check and generate the layout of the gridelement in frontend.
In /gridelements/Classes/Backend/LayoutSetup.php:110
protected function loadLayoutSetup($pageId)
{
// Load page TSconfig.
if (\TYPO3_MODE === 'FE') {
$pageTSconfig = $GLOBALS['TSFE']->getPagesTSconfig();
} else {
$pageTSconfig = BackendUtility::getPagesTSconfig($pageId);
}
So for some reason "$GLOBALS['TSFE']->getPagesTSconfig()" and "BackendUtility::getPagesTSconfig($pageId)" are doing different things regarding conditions.
Updated by Susanne Moog over 4 years ago
- Status changed from Needs Feedback to Closed
This has been changed in latest version with #89718 - in the past BackendUtility and TSFE behaved differently regarding conditions / TS config parsing - which before #89718 gridelements should have incorporated. As the parsing has been streamlined in v10 and will not be changed in older versions due to BC reasons, I'm going to close this issue.