Posted by spessex on November 24, 2013 at 10:14pm
Is it possible just to turn-off error messages but show all other messages, particularly showing only the green system messages? The 'Error messages to display' does not appear to allow for this.
Most of you will probably thinking 'why do you need this', but unfortunately due to circumstances I have no other choice at this time but to do this.
Any advice would be greatly appreciated.
Stephen
Comments
If you're comfortable writing
If you're comfortable writing a small custom module you can do this to clear all error and warning messages:
/**
* Implements hook_init().
*/
function example_init() {
drupal_get_messages('warning', TRUE);
drupal_get_messages('error', TRUE);
}
It's worth reading the documentation on drupal_get_messages().
Disclaimer: It's probably more worthwhile to fix the root of this issue rather than hiding it, the above code will remove all form validation error messages as well.
http://www.linkedin.com/in/linuxwizard
Brilliant. Thank you Alan
Brilliant. Thank you Alan
Hi spessex You can disable
Hi spessex
You can disable warning and error messages by admin configurations page http:///config/development/logging.
Thank you but the problem was
Thank you but the problem was that you can only turn off 'all' messages, hence you cannot then see the green messages using this method.