Bug #88841

Conditions in .tsconfig file are not read

Added by Julian Stock about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2019-07-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
CodingNight
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues

Related to TYPO3 Core - Bug #86923: Symfony expressions/conditions doesn't work in user-tsconfigClosed2018-11-14

Actions
Related to TYPO3 Core - Bug #86229: Symfony expressions/conditions doesn't work in user-tsconfigClosedFrank Naegler2018-09-11

Actions
#1

Updated by Jonas Eberle about 2 years ago

  • Related to Bug #86923: Symfony expressions/conditions doesn't work in user-tsconfig added
#2

Updated by Jonas Eberle about 2 years ago

  • Related to Bug #86229: Symfony expressions/conditions doesn't work in user-tsconfig added
#3

Updated by Susanne Moog about 2 years ago

  • Tags set to CodingNight
#4

Updated by Riccardo De Contardi about 2 years ago

  • Category set to TypoScript
#5

Updated by Frank Naegler almost 2 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.

#6

Updated by Alexander Böhm almost 2 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.

#7

Updated by Susanne Moog over 1 year 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.

Also available in: Atom PDF