2

In D7, under Configuration > Development > Logging and errors you can set "Error messages to display" to "none".

However, I would think users should still be able to see form error messages, for example when they don't fill out a required field.

Are there different 'types' of 'error messages'?

1

This setting is for server errors, the drupal form errors will still be shown.

Here is some more information on this topic: https://www.drupal.org/node/1036982

| improve this answer | |
  • 2
    Welcome aboard. Please try at least to summarize the content from your link, since links might change. – leymannx Aug 6 '15 at 22:41
0

About 'see form error messages'

There are basically at least 2 approaches to address your question, as further detailed below.

Use the Disable messages module

You could use the Disable Messages module for this. Here is a quote from its project page:

Gives a site owner options to disable specific messages shown to end users. The core drupal message system as offered by drupal_set_message is an excellent way for modules to send out messages to the end users. However not all drupal site owners are keen to show all the messages sent out by drupal core and all modules to their users. This module gives site administrators a reasonably powerful way to filter out messages shown to the end users.

Some of its features are:

  • Filter out messages that match a full text string exactly.
  • Filter out messages that match a regular expression.
  • Permissions to specifically hide all messages of a given type from any role.
  • Disable all filtering for specific users.
  • Disable all filtering for specific paths.
  • Apply filtering only for specific paths.
  • Debug system to get messages in the HTML without showing it to the end users.

Available for either Drupal 6 or Drupal 7 (and a DEV version for Drupal 8).

Write some custom code

Add appropriate logic in the template of the theme you're using, similar to what is done in the code sample shown in the answers to these questions

About 'Types of error messages'

The "types or error messages" (as in your question), is what is referred to via the $type variable in the code samples in the above answers. Its value is a string, and can be any of those:

  • 'NULL': all messages (= default value).
  • 'status': only status messages (informational messages or confirmations).
  • 'warning': only warnings.
  • 'error': only errors.

Obviously, if you ever change themes, then you have to remember to reapply this logic to your new theme also.

| improve this answer | |
  • The OP question is Are there different 'types' of 'error messages'? The correct answer is given from the other answer. – kiamlaluno Oct 6 '15 at 5:16

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.