I have set the Error messages to display to None enter image description here

but still the website shows warning messages on top. enter image description here

Also cleared the cache after this but the anonymous user can still see warning messages.

Is there anything else to be changed?

  • Are you have custom coded modules? – Nikit Nov 13 '14 at 0:29
  • Custom coded modules? – pal4life Nov 13 '14 at 17:17

That's a pretty specific error message, and google says it is coming from this module:


at these lines: 808-812

  catch (Exception $e) {
    if (isset($cache_max)) { //this implies that we went even further back in the cache and could not connect, so call it quits
      if (variable_get('netforum_hide_error_messages', 0) == 0 || user_access('administer site configuration')) {
        drupal_set_message(t('Could not retreive data from server or cache.'), 'error');

More specifically to your question, because the above module is using drupal_set_message it is not going to be effected by the 'error_reporting' level since that only impacts errors that would go to the logs. This makes sense as you would want to be able to suppress syntax or PHP errors while still letting system messages like "node was saved" or "subscription processed" still appear to the screen.

Your options to suppress this are to deal with the underlying cause of the error from the module (best case), or remove the 'messages' functionality from your theme, i.e. remove where ever it is that it says:

print $messages;

but again, that is probably not the best course of action here.

  • 1
    I totally agree that not printing the messages is a bad idea. – kiamlaluno Nov 13 '14 at 3:36
  • Yes thanks for pointing towards drupal_set_message. Since this more like an error, I will have it move to the watchdog then print it on the site. – pal4life Nov 13 '14 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.