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

BUG: SmartyValidate 3.02 Trigger error fails on Smarty 3.1+

 
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 -> Add-ons
View previous topic :: View next topic  
Author Message
CircleDev
Smarty Rookie


Joined: 27 Jul 2011
Posts: 7

PostPosted: Mon Dec 12, 2011 3:57 am    Post subject: BUG: SmartyValidate 3.02 Trigger error fails on Smarty 3.1+ Reply with quote

Hi all

I am hoping someone can help me with this.

I have found that although SmartyValidate works extremely well for validating and setup of validators on Smarty 3.1, it fails with a
"Uncaught exception 'SmartyException' with message 'Call of unknown method 'trigger_error' " if there is an error in registering or setup of the validation vars.
This is using the Smarty.class.php as per the SmartyValidate instructions.

That said this error message goes away but the page fails silently and stops loading where the error should be shown by smarty if I use the SmartyBC.class.php instead

In my smarty subclass I have debugging, force compile, show errors and Error unassigned all on for debugging purposes.

I don't yet understand enough of PHP to fix this but hopefully someone will point me in the right direction to get these errors being shown.

Using Smarty 3.1.5 and SmartyValidate 3.0.2

Thanks
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Mon Dec 12, 2011 3:32 pm    Post subject: Reply with quote

What file/line is this error happening? Did you clear compiled files for Smarty if you updated?
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


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

PostPosted: Mon Dec 12, 2011 4:55 pm    Post subject: Reply with quote

The plugin function.validate.php was not updated completely for Smarty 3. It still still contains $smarty->trigger_error() calls which should just be trigger_error().
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Mon Dec 12, 2011 4:59 pm    Post subject: Reply with quote

U.Tews wrote:
The plugin function.validate.php was not updated completely for Smarty 3. It still still contains $smarty->trigger_error() calls which should just be trigger_error().


ack. yep, I'll get the source updated.

[edit] updated, download 3.0.3.

http://phpinsider.com/php/code/SmartyValidate/
Back to top
View user's profile Send private message Visit poster's website
CircleDev
Smarty Rookie


Joined: 27 Jul 2011
Posts: 7

PostPosted: Mon Dec 12, 2011 10:28 pm    Post subject: Reply with quote

excellent! Thanks mohrt and U.Tews
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 -> Add-ons 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