Bug #17090
closedwrong INCLUDE_TYPOSCRIPT does not output error message
100%
Description
When INCLUDE_TYPOSCRIPT is used inside of TypoScript and the file is not found or there is no read access, then the file is not included.
A warning message should be displaid in the content in the TypoScript template analyzer.
function includeStaticTypoScriptSources in t3lib/class.t3lib_tstemplate.php
If t3lib_div::getUrl gives an empty result and the file exists, then a error message should be displayed to inform the user. This would save a lot of time to discover the reason.
$subrow=array(
'constants'=> @is_file($ISF_filePath.'constants.txt') ?t3lib_div::getUrl($ISF_filePath.'constants.txt'):'',
'config'=> @is_file($ISF_filePath.'setup.txt') ?t3lib_div::getUrl($ISF_filePath.'setup.txt'):'',
'editorcfg'=> @is_file($ISF_filePath.'editorcfg.txt') ?t3lib_div::getUrl($ISF_filePath.'editorcfg.txt'):'',
'include_static'=> @is_file($ISF_filePath.'include_static.txt')?implode(',',array_unique(t3lib_div::intExplode(',',t3lib_div::getUrl($ISF_filePath.'include_static.txt')))):'',
'include_static_file'=> @is_file($ISF_filePath.'include_static_file.txt')?implode(',',array_unique(explode(',',t3lib_div::getUrl($ISF_filePath.'include_static_file.txt')))):'',
'title' => $ISF_file,
'uid' => $mExtKey
);
(issue imported from #M5156)
Updated by Oliver Hader over 17 years ago
Hm, what if the file to be included exists and is readable but is empty?
But showing a PHP-like waring e.g. "Warning: include(something.ts): failed to open stream: No such file or directory in [whatever] on line 13" would be great.
Updated by Andreas Wolf over 13 years ago
- Category set to TypoScript
- Status changed from New to Accepted
- Target version deleted (
0)
Updated by Riccardo De Contardi over 11 years ago
still not present in TYPO3 CMS 4.5.20
Updated by Riccardo De Contardi over 10 years ago
Tried with TYPO6 CMS 6.2.3:
In TS Setup I include a non-existent file:
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/blah-blah/thereisnosuchfile.txt">
Result in Template Analyzer:
4979: ### <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/blah-blah/thereisnosuchfile.txt"> BEGIN: 4980: 4981: ### 4982: ### ERROR: File "fileadmin/blah-blah/thereisnosuchfile.txt" was not was not found. 4983: ### 4984: 4985: ### <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/blah-blah/thereisnosuchfile.txt"> END:
Not much visible: I had to search for it.
Updated by Simon Schaufelberger over 10 years ago
Hmm, in the Object Browser I get a red box when I do an error I (apart form the include typoscript file!) but in the Template Analyzer i just get the notification in the parsed template.
I tried to add that red error box in the Template Analyzer as well but i failed so far.
Updated by Gerrit Code Review over 10 years ago
- Status changed from Accepted 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/30887
Updated by Simon Schaufelberger over 10 years ago
Here is already a good starting point :D haha
Updated by Gerrit Code Review over 10 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/30887
Updated by Gerrit Code Review almost 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30887
Updated by Gerrit Code Review almost 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30887
Updated by Gerrit Code Review almost 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30887
Updated by Gerrit Code Review almost 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35516
Updated by Simon Schaufelberger almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 68fc3b03238fe175cd83139de770f29175590c16.