Project

General

Profile

Actions

Bug #98526

closed

Allow import of TypoScript files from inside a TypoScript hierarchy again

Added by Eric Harrer over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2022-10-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In TYPO3 9 to 11 it was possible to import TypoScript files from inside of the TypoScript hierarchy.

Example:

In the file EXT:<extension_key>/Configuration/TypoScript/setup.typoscript write the following lines to import all TypoScript files of a directory EXT:<extension_key>/Configuration/TypoScript/Setup/lib/ from inside the TypoScript object lib:

lib {
    @import 'EXT:<extension_key>/Configuration/TypoScript/Setup/lib/*.typoscript'
}

Inside of file EXT:<extension_key>/Configuration/TypoScript/Setup/lib/parseFunc.typoscript for example you could then just insert

parseFunc {
    # [...]
}

without the preceding lib. object as this has already been defined in the outer wrap.

In TYPO3 12.0.0 this no longer works.

In contrast to TypoScript Setup, this method is still possible in the TSconfig context.

If you define:

mod {
    web_layout {
        BackendLayouts {
            @import 'EXT:<extension_key>/Configuration/TsConfig/Page/mod.web_layout.BackendLayouts/*.tsconfig'
        }
    }
}

and inside of the directory EXT:<extension_key>/Configuration/TsConfig/Page/mod.web_layout.BackendLayouts/ have a file myBackendLayoutKey.tsconfig with the following content:

myBackendLayoutKey {
    title = LLL:EXT:<extension_key>/Resources/Private/Language/locallang_be.xlf:backend_layout.myBackendLayoutKey
    icon = EXT:<extension_key>/Resources/Public/Icons/BackendLayouts/myBackendLayoutKey.svg
    config {
        # [...]
    }
}

without the preceeding object chain mod.web_layout.BackendLayouts. it still works perfectly in TYPO3 12.0.0.

Unless the loss of this feature in the TypoScript Setup context is an intentional breaking change, it should be restored before the LTS version is released or at least the inconsistency with TSconfig behavior should be fixed.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #98523: Allow relative paths for importing TypoScript files againClosed2022-10-04

Actions
Related to TYPO3 Core - Feature #97816: New TypoScript parserClosed2022-06-27

Actions
Actions

Also available in: Atom PDF