Bug #89720

TypoScript import from directory loads all files

Added by Mathias Brodala 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Should have
Category:
TypoScript
Target version:
Start date:
2019-11-21
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The "documentation of the TypoScript @import feature"https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/TypoScriptSyntax/Syntax/Includes.html#includes claims that importing from a directory will automatically only load .typoscript files in that directory:

# The filename extension can be omitted and defaults to .typoscript
@import 'EXT:myproject/Configuration/TypoScript/'

However, this is not true. If a directory is imported like this, all files in that directory are imported as TypoScript and then parsed as such, leading to various errors in the Object Browser / Template Analyzer.

Here fileadmin/form_definitions is imported and a form definition exists in this directory:

The Template Analyzer then clearly reveals that the form definition has been imported, too:

2019-11-21_10-29.png View (167 KB) Mathias Brodala, 2019-11-21 10:30

2019-11-21_10-30.png View (181 KB) Mathias Brodala, 2019-11-21 10:31

Associated revisions

Revision 191c9cac (diff)
Added by Mathias Brodala 5 months ago

[BUGFIX] Only load TypoScript files on directory import

Resolves: #89720
Releases: master
Change-Id: I97e7f5b0465527d3a8ebe7190e3bdf710e9d7f54
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62353
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Tested-by: Steffen Frese <>
Tested-by: Benni Mack <>
Reviewed-by: Rémy DANIEL <>
Reviewed-by: Anja Leichsenring <>
Reviewed-by: Steffen Frese <>
Reviewed-by: Felix P. <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review 6 months 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/c/Packages/TYPO3.CMS/+/62353

#2 Updated by Gerrit Code Review 6 months 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/c/Packages/TYPO3.CMS/+/62353

#3 Updated by Mathias Brodala 5 months ago

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

#4 Updated by Benni Mack 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF