[TYPO3-core] RFC: Bug 6138: Recursive include of external Typoscript Files

Michael Stucki michael at typo3.org
Mon Oct 15 17:04:02 CEST 2007


Thanks, I committed this change now including your enhancement!

- michael

Oliver Hader wrote:

> Hi Michael,
> 
> Michael Stucki schrieb:
>> Problem:
>> Currently it is not possible to use more than one level of external
>> ts-files because the parser is not checking the included scripts for
>> includes. So teh use of external ts is not possible in larger projects
>> with a lot of ts code.
>> 
>> Solution:
>> Only one line of code has to be changed in class.t3lib_tsparser,php to
>> enable recursive inclusion. See included patch.
>> 
>> Comments:
>> - patch was written by Martin Ficzel
>> 
>> Branches: Trunk only
>> 
>> Bugtracker reference:
>> http://bugs.typo3.org/view.php?id=6138
> 
> I've added a small change to the patch for the ping-pong recursions. I
> removed the $cycle_counter and inserted a class variable $includedFiles
> as an array. This variable holds all files that were included. So, if a
> file that was already included should be included once more, it isn't
> processed at all and the log is written.
> 
> One more possibility to $includedFiles would be store the name of the
> file or the page-id with the TypoScript that caused the error of the
> double inclusion. So, developers and admins don't have to search in all
> includable TypoScript files or in the whole database, but have the
> information were the bug appeared.
> 
> But besides these possible extensions to the patch, I've tested yours
> and can confirm that more than one "INCLUDE_TYPOSCRIPT" is recognized
> and that endless-loops are detected.
> 
> So, +1 from my side. Maybe you'd also like to approve my suggestions...
> 
> 
> olly

-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/


More information about the TYPO3-team-core mailing list