nrueckmann / smarty-php

Automatically exported from code.google.com/p/smarty-php
0 stars 0 forks source link

{include} using relative path fail when not compiled in {block} #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. file structure
templates\global.html
templates\Test\test.html
templates\Test\hkuclion.html
2.
global.html
---------------
{block name=global}{/block}

test.html
---------------
{extends file="../global.html"}

{block name=global}
test
{include file='./hkuclion.html'}
{/block}

hkuclion.html
---------------
hkuclion

3. show Test/test.html

What is the expected output? What do you see instead?
The first time I visit the page it runs into an exception
---------------------------------
Unable to load template file './hkuclion.html' in 
'E:\xampp\htdocs\newbase\templates\Test\test.html'

The second time I visit it normally outputs "test hkuclion" and then on.
And when I delete the compiled files it will run into exception again

What version of the product are you using? On what operating system?
using Smarty 3.1.16, on Windows 7, php 5.5.6

Please provide any additional information below.

Original issue reported on code.google.com by hkucl...@gmail.com on 7 Mar 2014 at 8:24

GoogleCodeExporter commented 8 years ago
Thanks for your input. The fix is now in the SVN trunk and will later be 
included in 3.1.17

Original comment by Uwe.Tews@googlemail.com on 8 Mar 2014 at 11:04