Project

General

Profile

Actions

Bug #17090

closed

wrong INCLUDE_TYPOSCRIPT does not output error message

Added by Franz Holzinger over 17 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2007-03-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #52833: TS parse: saving a non-accessible results in JS errorClosed2013-10-15

Actions
Related to TYPO3 Core - Bug #63937: Remove calls to StringUtility::beginsWith() in TypoScriptParserClosedMarkus Klein2014-12-16

Actions
Actions #1

Updated by Michael Stucki over 17 years ago

OK, so go ahead!

Actions #2

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.

Actions #3

Updated by Andreas Wolf over 13 years ago

  • Category set to TypoScript
  • Status changed from New to Accepted
  • Target version deleted (0)
Actions #4

Updated by Riccardo De Contardi over 11 years ago

still not present in TYPO3 CMS 4.5.20

Actions #5

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.

Actions #6

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.

Actions #7

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

Actions #8

Updated by Simon Schaufelberger over 10 years ago

Here is already a good starting point :D haha

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

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

Actions #13

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

Actions #14

Updated by Simon Schaufelberger almost 10 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF