Project

General

Profile

Actions

Bug #79737

closed

Registered pageTSconfig file won't allow relative paths for include

Added by Christian Müller almost 8 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2017-02-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

As described in the documentation ([[https://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/Syntax/Includes/]]) you can use relative paths to include a file or a bunch of files inside a folder.
This works as expected as long as you include your TSconfig as default TSconfig by calling \ExtensionManagementUtility::addPageTSConfig() in your ext_localconf.php.

If you register your TSconfig for possible includes by calling ExtensionManagementUtility::registerPageTSConfigFile() in your /Configuration/TCA/Overrides/pages.php, relative paths for file/directory include do not work.

Example code:

# FILE: /Configuration/TSconfig/Page.ts
<INCLUDE_TYPOSCRIPT: source="FILE:./RTE.ts">
# FILE: /Configuration/TSconfig/RTE.ts
RTE >

Include of RTE.ts with relative path works:

// FILE: ext_localconf.php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
    '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:foo/Configuration/TSconfig/Page.ts">'
);

Include of RTE.ts with relative path doesn't work:

// FILE: /Configuration/TCA/Overrides/pages.php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
    'foo',
    'Configuration/TSconfig/Page.ts',
    'foo - PageTS'
);

To make the include work for registered TSconfig you have to use one of these:

# FILE: /Configuration/TSconfig/Page.ts
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:foo/Configuration/TSconfig/RTE.ts">

# OR:

<INCLUDE_TYPOSCRIPT: source="FILE:typo3conf/ext/foo/Configuration/TSconfig/RTE.ts">

All these examples also apply for relative paths to directories (DIR:./BackendLayouts/ extension="ts").


Related issues 2 (0 open2 closed)

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

Actions
Has duplicate TYPO3 Core - Bug #85825: Page TSconfig is not loaded when registering record and using relative pathsClosed2018-08-13

Actions
Actions #1

Updated by Christian Müller almost 8 years ago

  • Category set to TypoScript
Actions #2

Updated by Ralf Merz over 7 years ago

Hi guys,

maybe not exactly the same, but I just recognized in v8.6.1:
In the TS template record, using "info / modify" there is the recommendation to use

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:site_myproject/Configuration/TypoScript/setup.ts">

Now I noticed that this does not work, but this:

<INCLUDE_TYPOSCRIPT: source="FILE:typo3conf/ext/site_myproject/Configuration/TypoScript/setup.ts">

So "EXT:" cannot be used somehow.

Is this related here or should this be a new issue?

Cheers
merzilla

Actions #3

Updated by Markus Kobligk over 7 years ago

I can confirm the behaviour described in the OP under TYPO3 8.7.1

Nested including of TS files does not work when the original file is loaded with ExtensionManagementUtility::registerPageTSConfigFile(),
no matter if that function call is placed in Configuration/TCA/Overrides/pages.php or in the ext_tables.php.

Actions #4

Updated by Christian Müller over 7 years ago

  • TYPO3 Version changed from 7 to 8
  • PHP Version set to 7.0
Actions #5

Updated by Georg Ringer over 4 years ago

  • Has duplicate Bug #85825: Page TSconfig is not loaded when registering record and using relative paths added
Actions #6

Updated by Jochen Roth almost 3 years ago

Just had a quick look and tested with the new syntax, will have a closer look soonish

Does not work

@import 'NewContentElements.typoscript'
@import 'TCEFORM.typoscript'

Works as expected:

@import 'EXT:tsd_core/Configuration/PageTSConfig/NewContentElements.typoscript'
@import 'EXT:tsd_core/Configuration/PageTSConfig/TCEFORM.typoscript'

Actions #7

Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

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

Actions #8

Updated by Gerrit Code Review almost 3 years ago

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

Actions #9

Updated by Gerrit Code Review almost 3 years ago

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

Actions #10

Updated by Gerrit Code Review almost 3 years ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72737

Actions #11

Updated by Gerrit Code Review almost 3 years ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72737

Actions #12

Updated by Gerrit Code Review 7 months ago

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

Actions #13

Updated by Gerrit Code Review 7 months ago

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

Actions #14

Updated by Gerrit Code Review 7 months ago

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

Actions #15

Updated by Gerrit Code Review 7 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83712

Actions #16

Updated by Gerrit Code Review 7 months ago

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

Actions #17

Updated by Christian Kuhn 6 months ago

Actions #18

Updated by Gerrit Code Review 6 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83712

Actions #19

Updated by Gerrit Code Review 6 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83712

Actions #20

Updated by Gerrit Code Review 6 months ago

Patch set 4 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84036

Actions #21

Updated by Benjamin Franzke 6 months ago

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

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF