[TYPO3-dev] getHtmlTemplate should use resolveBackPath

Steffen Gebert steffen at steffen-gebert.de
Sun Oct 5 16:10:34 CEST 2008


Hi devs,

I found the following comment in tt_news trunk:

        /**
         * FIXME:
         * on some servers $this->doc->moduleTemplate is empty (occured only on netcreators servers until now)
         * by opening the template directly it worked.
         * possible reasons: 
         * - paths with '../typo3/../' could make problems
         * - php settings which influence the functionality of t3lib_div::getURL(). allow_url_fopen and the like
         * - ...
         */

This is caused by generating the following path to the template file:
../../../../typo3/../typo3conf/ext/tt_news/mod1/mod_ttneypo3conf/ext/tt_news/mod1/mod_ttnews_admin.html
I can't open this path in a bash and so php's file_get_contents(), which is called by t3lib_div::getURL() can't, too.

My system is Debian etch.

I propose to change typo3/template.php:getHtmlTemplate () from
t3lib_div::getURL($this->backPath . $filename)
to 
t3lib_div::getURL(t3lib_div::resolveBackPath($this->backPath . $filename)).

I'd like to ask for your comments here before sending patch request to core list.

Version: 4.2 trunk

Bugtracker reference:
http://bugs.typo3.org/view.php?id=9487

Steffen




More information about the TYPO3-dev mailing list