Actions
Bug #85867
closed@import in addPageTSConfig does not work correctly
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