|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
yarco Smarty Regular
Joined: 20 Mar 2009 Posts: 39
|
Posted: Fri Mar 20, 2009 10:32 am Post subject: bug report: when using configure file |
|
|
Code: | Code: 0
Error: Unable to load config file "index.conf"
File: /home/yarco/Public/workspace/code/coto/coto/entry/smarty3/sysplugins/internal.config.php
Line: 86 |
Code: | public function buildConfigFilepath ()
{
foreach((array)$this->smarty->config_dir as $_config_dir) {
$_filepath = $_config_dir . $this->config_resource_name; // line A
if (file_exists($_filepath))
return $_filepath;
}
// no tpl file found
throw new Exception("Unable to load config file \"{$this->config_resource_name}\"");
return false;
} |
it seems line A need a directory separator |
|
Back to top |
|
yarco Smarty Regular
Joined: 20 Mar 2009 Posts: 39
|
Posted: Fri Mar 20, 2009 3:17 pm Post subject: |
|
|
same error, need a directory separator
Code: |
Code: 0
Error: Unable to load template "index/error_index.html"
File: /home/yarco/Public/workspace/code/coto/coto/entry/smarty3/sysplugins/internal.template.php
Line: 487
|
Code: |
public function buildTemplateFilepath ()
{
foreach((array)$this->smarty->template_dir as $_template_dir) {
$_filepath = $_template_dir . $this->resource_name; // line A
if (file_exists($_filepath))
return $_filepath;
}
if (file_exists($this->resource_name)) return $this->resource_name;
// no tpl file found
throw new Exception("Unable to load template \"{$this->resource_name}\"");
return false;
}
|
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Mar 20, 2009 3:37 pm Post subject: |
|
|
The default config_dir and template_dir do include all required directory separators.
$this->config_dir = '.' . DIRECTORY_SEPARATOR . 'configs' . DIRECTORY_SEPARATOR;
$this->template_dir = '.' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR;
The defaults of template_dir, compile_dir, cache_dir and config_dir assume that these folders are below the web space root directory.
If you have these folders somewhere else you must redefine template_dir, compile_dir, cache_dir and config_dir to point to reight location. Best is to specify an absolute filepath. |
|
Back to top |
|
yarco Smarty Regular
Joined: 20 Mar 2009 Posts: 39
|
Posted: Fri Mar 20, 2009 3:54 pm Post subject: |
|
|
well, ok. but the previous version dont do that... |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Mar 20, 2009 5:03 pm Post subject: |
|
|
The internals need to check for a trailing directory separator, and add one if not present. That will get updated in SVN. |
|
Back to top |
|
yarco Smarty Regular
Joined: 20 Mar 2009 Posts: 39
|
Posted: Fri Mar 20, 2009 5:17 pm Post subject: |
|
|
great work! good job! (And the words like that i don't know in english)
i'm waiting it (smarty3) comming!
Dedicate some flowers first:
flowers => @}- @}- @}- @}- @}- ... |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|