[TYPO3-english] Template folder on automaketemplate

Jigal van Hemert jigal at xs4all.nl
Fri Nov 27 12:27:29 CET 2009

Hi Sergio,

Sergio Catalá Gil wrote:
> folder as "fileadmin" everything is OK. So I think it has something to
> do with the name of the folder and automaketemplate doesn't allow to use
> a folder outside "fileadmin". 

I'm very sure that it's not automaketemplate which causes the problem 
here (I currently maintain the extension :-) )

Your code
   content = FILE
   content.file = media/home/templates/page.html
is handled inside automaktemplate by
$content = 

So I digged into this function and the way the FILE object is handled.
In the end I stumbled upon something odd in 
t3lib_TStemplate::getFileName() :

01201   if (strstr($file,'/')) {        // here it is manual media
01202     if(!strcmp(substr($file,0,6),'media/')) $file = 

1161 checks if there is a '/' in the path (which is the case in your 
1162 checks if the path starts with 'media/', which used to be a 
symbolic link to typo3/sysext/cms/tslib/media/ in older installations, 
and prepends this path to the path it was given to support the use of 
media/... in newer installations.

Your media/... folder triggered this workaround.

I filed a bug report for this:

The only solution now is to not use a directory called "media" in the 
root :-(

Regards, Jigal.

More information about the TYPO3-english mailing list