Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty 3: simpler error logging, please!
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Nov 24, 2010 4:34 pm    Post subject: Reply with quote

Could you show the stack trace? In this case, the trace should indicate where the problem started.

FYI, here is how Smarty 2 shows that same error:

Code:
Warning: Smarty error: unable to read resource: ".tpl" in /home/mohrt/www/smarty-php/Smarty.class.php on line 1093


Smarty 2 can't tell you it started at the display() call, however with exceptions in Smarty 3 the stack trace can give you clues where it starts. We'd like to see your trace though, to see if the error can be caught further up the chain.
Back to top
View user's profile Send private message Visit poster's website
bolero
Smarty Rookie


Joined: 22 Nov 2010
Posts: 30

PostPosted: Wed Nov 24, 2010 6:26 pm    Post subject: Reply with quote

Code:

#0 /var/www/webnn/smarty3/sysplugins/smarty_internal_templatecompilerbase.php(67): Smarty_Internal_Template->getTemplateSource()
#1 /var/www/webnn/smarty3/sysplugins/smarty_internal_template.php(260): Smarty_Internal_TemplateCompilerBase->compileTemplate(Object(Smarty_Internal_Template))
#2 /var/www/webnn/smarty3/sysplugins/smarty_internal_template.php(413): Smarty_Internal_Template->compileTemplateSource()
#3 /var/www/webnn/smarty3/sysplugins/smarty_internal_template.php(555): Smarty_Internal_Template->renderTemplate()
#4 /var/www/webnn/www/beta3.webnn.info/templates_c/c0360d049dff10f364dfc53ba2cc3958abf6ee6d.file.index.tpl.php(30): Smarty_Internal_Template->getRenderedTemplate()
#5 /var/www/webnn/smarty3/sysplugins/smarty_internal_template.php(423): include('/var/www/webnn...')
#6 /var/www/webnn/smarty3/sysplugi in /var/www/webnn/smarty3/sysplugins/smarty_internal_template.php on line 144

Now, that I found the corresponding include I know that the (30) in #4 tells the line. But that wasn't so clear when I first saw the error. The line is actually 29 and I have several other includes with variables just a few lines up and down. So, if I understand right, next time I can look at the line given in brackets and also at the line before it, not after it.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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
Protected by Anti-Spam ACP