Welcome Guest, Not a member yet? Register   Sign In
better error messages
#1

[eluser]Tom Vogt[/eluser]
The error messages need to not rely on CI functions that may not be available, I get that.

And yet, I can't fathom why CSRF errors must be thrown the way they are, leaving me with absolutely no way to catch them nicely and display them within my site template. Anyone figured out a way?


The issue is that with CSRF protection enabled, all the processing happens during init, and show_error() is called before the main CI controller class is ready, so I have no access to any of it, including any template system.

Basically, the error_general.php page that is called has to be a simple HTML page. Even using a helper to build the CSS and JS includes is out of the question.


I've dug through the code, including core files, to find a way to do this, but I can't. All I want is CSRF errors trapped and the user shown an error page within the application, using my template, nav menu, etc. etc.




Theme © iAndrew 2016 - Forum software by © MyBB