I'm trying to setup an endpoint for a 3rd party app to allow users to be created on my site through a REST endpoint, which is mostly working so far, although, I've just navigated to my site through the front end, and I've realised it's showing me all the notifications for all the test users I'm creating.

I'm not logged in as an administrator, just a normal user account, and the setting for Show errors and notifications is off, so why is it showing me all these notifications, there's no way I can leave that in

enter image description here

  • 1
    Presumably you're logged in as the user you authenticated against the REST endpoint(s) with? – Clive Aug 7 '19 at 14:56
  • No, I'm not logged in for anyone specific – Andrew Morris Aug 7 '19 at 14:58
  • If status messages are generated during non-html responses you can get them building up like this. It's a quirk of Drupal. Best to have something in your code that consumes them even if they are not displayed. – Alfred Armstrong Aug 7 '19 at 15:38

Base on you're working with RESTful API and does not need these messages anymore you can disable them ( all of them or parts of them based on what you don't want) by Disable message module :

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.


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.

or another solution is on the theme prevent it got rendered by this solution : https://www.drupal.org/forum/support/installing-drupal/2011-01-23/how-to-turn-off-error-messages

  • Hi, I think this is probably overkill for my needs, I basically had to force the user to login to an account during the process so that the messages were added to a dummy account, rather than the anonymous user – Andrew Morris Aug 19 '19 at 9:22

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.