1

Like any Drupal site, my site also shows red notifications from time to time...

The problem is that when these notifications are error messages, they appear at the bottom of the site in a new "Pseudo-reigion"... I use the term "Pseudo-region" because they establish a new "Region" under the site.

It's not really a region but rather a white area with an H1 and some text under it. It is displayed with the word "Error" (as a title, using a <h1> HTML tag), and the text below it is "The website encountered an unexpected error. Please try again later.". This is how it looks like in my site:

enter image description here

So my single aim is to not display these error messages (and this whole "Pseudo region" actually), at least for anonymous users, since it's uglyfies my site.

I've tried to use the following CSS syntax but with no success:

body.not-logged-in div.messages.error {display: none !important;}

This "error" pseudo-region is extremely problematic since it appears even in cases when I hide the notifications themselves via the "Disable messages" module.

I'm sure this error is native to Drupal but I've already tried everything I know to remove it, so any help is appreciated.

An important note

It's a long story why, but disabling the errors through /admin/config/development/logging doesn't help in this case. I'm looking for a solution which is either CSS, a Javascript (not jQuery) tweaking of the css by the text itself, or, some change in the Drupal PHP code that will prevent to program of printing this error.

closed as off-topic by Clive Aug 4 '15 at 7:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on programming, PHP, SQL, etc. that do not relate directly to Drupal are off-topic here, but can be asked on Stack Overflow." – Clive
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Go to /admin/config/development/logging What is "Error Messages to Display" set to? – Screenack Aug 4 '15 at 2:14
  • As you're asking for a "pure CSS solution" this is off topic here. Questions about CSS can be asked on Stack Overflow, though. If you change your mind and decide a Drupal-related solution will work, just edit the question and flag for re-opening – Clive Aug 4 '15 at 7:43
  • This message is not generated by Drupal. This is generated by your webserver/php and should be logged as a 500 error in your PHP or Web Server logs which you need to look at and fix. Hiding the error is like covering the white elephant in the room with a cloth and pretending like it's not there. – Beebee Aug 4 '15 at 15:56
  • It caused when a certain module works. But anyway, how can you prove it relates to the PHP? – JohnDoea Aug 4 '15 at 17:15
  • You've proven it relates to PHP yourself @benos - that error message can only be seen as the result of a PHP exception. We can't see what that exception is, only someone with access to the backend of the site and/or server logs can – Clive Aug 5 '15 at 14:44
0

Like @Screenack suggested.

  1. Navigate to /admin/config/development/logging

  2. Set the radio to None

  3. Select Save Configuration

Please note that I recommend keeping the errors on locally and trying to fix them.

  • Hello Albertski, Thanks deeply for you answer, but I really need a pure CSS solution this time. I've updated the question. Sorry for not mentioning that. – JohnDoea Aug 4 '15 at 4:23
  • If I remember correctly what could fix it is a JS manipulation on the css, but it seems the problem itself was coming from the server and fixing it there was best. – JohnDoea Mar 3 '16 at 3:12

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