Closed winus closed 12 years ago
Hello @winus. Thanks for using SmartyBundle and reporting this issue.
As Uwe wrote in the Smarty bugtracker the ':' is used for resources. That's why SmartyBundles uses the following syntax that will use a specific lookup function to load the "real" filename:
{extends 'file:AcmeHelloBundle:Default:layout.html.tpl'}
or a syntax using a native Smarty method:
{extends 'file:[AcmeHelloBundle]/Default/layout.html.tpl'}
I have not tried this in Windows. Can you confirm syntax 1 does not work as expected? Thanks.
I can confirm the first syntax errored on windows. On my mac i wasnt running into problems untill a developer on windows machine joint the team. His machine had the problem.
Regards
Winus
Wrong button pushed;) accedently closed the issue..
I'll look at it to check if there is something UNIX specific in the code. In the meantime please use the 2nd syntax.
Note: Right now I'm working on Symfony2 Forms support. If you see any other important features lacking on SmartyBundle you may create an issue for it with the label Feature Request
and will check it. Thanks.
@winus still having problems in Windows, when using the Bundle:Controller:action
syntax? In want to close all open bugs before 0.2, hoping to fix this one too if possible.
Sorry for the delay, it is still a problem on windows, but smarty doesn't validate/normalize the resource name for it's compiled versions... still think it is a smarty problem, and my patch in smarty still works fine here :)
@winus What patch are you referring to?
I have made a small patch in my smarty library which seem to work fine. Smarty_resource.php, line 146
$compiled->filepath = $_compile_dir . $_filepath . '.' . $compiled->source->type . $_basename . $_cache . '.php';
if (Smarty::$_IS_WINDOWS) {
$compiled->filepath = preg_replace('/:/', '.', $compiled->filepath);
}
I opened a issue at smarty, but i also apply's to the SmartyBundle project. Please take a look at: http://code.google.com/p/smarty-php/issues/detail?id=79
Greetings
Winus