Project

General

Profile

Actions

Bug #88841

closed

Conditions in .tsconfig file are not read

Added by Julian Stock over 5 years ago. Updated over 4 years 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 2 (0 open2 closed)

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 Nägler2018-09-11

Actions
Actions #1

Updated by Jonas Eberle over 5 years ago

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

Updated by Jonas Eberle over 5 years ago

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

Updated by Susanne Moog over 5 years ago

  • Tags set to CodingNight
Actions #4

Updated by Riccardo De Contardi about 5 years ago

  • Category set to TypoScript
Actions #5

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.

Actions #6

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.

Actions #7

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.

Actions

Also available in: Atom PDF