Project

General

Profile

Actions

Bug #85867

closed

@import in addPageTSConfig does not work correctly

Added by Kevin Appelt over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2018-08-15
Due date:
% Done:

100%

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

Description

There seems to be a problem with the new import syntax (in the current dev-master) if you use it in ext_localconf.php.

TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
    '@import \'EXT:myextension/Configuration/TsConfig/Page.tsconfig\''
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
    '@import \'EXT:myextension/Configuration/TsConfig/User.tsconfig\''
);

The part with addPageTSConfig is the flaky part. The method addUserTSConfig is working as expected.
The same import with the old syntax is working as expected.

This is what i can see in the backend (whole line is dark red like all [global] lines):

[GLOBAL]### @import 'EXT:myextension/Configuration/TsConfig/Page.tsconfig' begin ###

followed by the imported code (which has working @includes) which gets completely ignored.

Same problem if i add a new line in front of it like so:

TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
    '
@import \'EXT:myextension/Configuration/TsConfig/Page.tsconfig\''
);

So solve the problem I have to add a random line in front of the @import - like so:
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
    'thisisfordebuggingreasons = 1
    @import \'EXT:myextension/Configuration/TsConfig/Page.tsconfig\''
);

with this result (yes, no new line before the ###)
[GLOBAL]
thisisfordebuggingreasons = 1### @import 'EXT:myextension/Configuration/TsConfig/Page.tsconfig' begin ###

again followed by the imported code (which has working @includes) which get not ignored now.

Actions #1

Updated by Kevin Appelt over 6 years ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58090

Actions #3

Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58090

Actions #4

Updated by Gerrit Code Review over 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58090

Actions #5

Updated by Benni Mack over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF