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

I want more info in case of smarty error

 
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 -> General
View previous topic :: View next topic  
Author Message
mstdmstd
Smarty Rookie


Joined: 04 Jan 2013
Posts: 20

PostPosted: Mon Aug 11, 2014 3:00 pm    Post subject: I want more info in case of smarty error Reply with quote

Hallo,
If in my smarty template there is error like undefined var, I get error like :
Code:
A PHP Error was encountered
Severity: Notice
 
Message: Undefined index: PriUUcing
 
Filename: sysplugins/smarty_internal_templatebase.php(157) : eval()'d code
 
Line Number: 87
  A PHP Error was encountered
Severity: Notice
 
Message: Trying to get property of non-object
 
Filename: sysplugins/smarty_internal_templatebase.php(157) : eval()'d code
 
Line Number: 87

The problem is that in this error name of tpl file and line of error are not shown.If there is a way to show it ?
Also if in this error can I show output of debug_backtrace function ?

Thanks!
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Mon Aug 11, 2014 5:16 pm    Post subject: Reply with quote

Sorry, currently there is no solution for tracing the PHP E_NOTICE error back to the template source file and line number.

This is already on the TODO list for the next major release of Smarty but at this time I have no date for it.
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Mon Aug 11, 2014 9:45 pm    Post subject: Reply with quote

Start using PHP debuggers already... There's several out in the webs.
Back to top
View user's profile Send private message
mstdmstd
Smarty Rookie


Joined: 04 Jan 2013
Posts: 20

PostPosted: Tue Aug 12, 2014 3:28 am    Post subject: Reply with quote

AnrDaemon wrote:
Start using PHP debuggers already... There's several out in the webs.
Please, mention which ones are good for this ?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Aug 12, 2014 2:16 pm    Post subject: Reply with quote

Anything you can get used to. They all have similar capabilities.
Back to top
View user's profile Send private message
mstdmstd
Smarty Rookie


Joined: 04 Jan 2013
Posts: 20

PostPosted: Wed Aug 13, 2014 2:14 pm    Post subject: Reply with quote

AnrDaemon wrote:
Anything you can get used to. They all have similar capabilities.

I use xdebug, it helps in many cases, but not with smarty errors.
If there are some tools with show more info with smarty, please, write.
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 -> General All times are GMT
Page 1 of 1

 
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