By jdln on
I have a module thats occasionally giving me an SQL error message. As the module is working fine and the fix is committed to the next release im leaving it for now.
The only problem is my client has seen the message. Can I hide error messages based on roles? I dont know how to recreate the error so its hard to test.
Thanks
Comments
I would not recommend hiding
I would not recommend hiding all errors from users, since some errors are designed for them.
In the "error reporting" section of the admin (admin/settings/error-reporting) you can set PHP/MySQL errors to only write to log and not to display on screen. You can then check the log to see the errors that are occurring since it is hard to reproduce them...
Ok. I wish there way a way so
Ok. I wish there way a way so just show errors to user 1 or by role.
Thanks
There's a module somewhere
There's a module somewhere that does exactly that. I regret I can't remember where... It won't be too difficult to code, though.
EDIT: here you have - http://drupal.org/project/msg2log < Merged into Drupal Tweaks
Meetai - Drupal solutions
Thanks!
Thanks!
You could also try
You could also try http://drupal.org/project/disable_messages if hiding messages is all what you need.
--
www.zyxware.com
d7 db query
I've found a few threads, but https://drupal.org/node/905774#comment-3426866 got me rolling with a D6 solution; and I combined it with the is_admin code from the Seven theme.
Error messages are now shown only to admins.
If you don't know what to do, edit or create your template.php and paste this in.
Don't forget to rename phptemplate_ to your templatesname_.
-
Be the occasion.
Feature request here #2743119
Feature request here #2743119: Option to display php error messages in a block so we can limit visibility per role
My Drupal sites:
Set error reporting per role via permission
This module achieves the original request in this thread: https://www.drupal.org/project/errorlevelpermission
thank you
thank you mark!