1

I am developing a site and am getting a few warning messages that cover the page. I want to deal with them later and turn them off for now so I can concentrate on theming.

I've tried going to Config>>Development>>Logging and turning them off from there, but although it says the save was successful refreshing the pages shows the 'All Messages' option is still selected and the messages still appear on the front end.

I searched how to do this in Drush and tried drush vset -y error_level 0 and drush vset error_level 0 and got the response "error_level was set to 0." but this too had no affect.

I've tried clearning my cache after each attempt as well.

Would anyone know how to achieve this?

1
  • Some error messages cannot be turned off thru config, especially if serious. Plus you kinda want to see errors to know if you're doing something wrong. I'd recommend developing with one browser logged in as admin, and testing in another browser logged in as general user (this user won't see the errors). But you can try to hide the messages like mentioned here if really bothered by it. Jan 11, 2017 at 4:40

4 Answers 4

2

If you don't want to add CSS you can comment out the $messages variable in your page.tpl.php file while you are developing.

1
  • Nice alternative, assuming you are not developing as a team and using the same dev server as others may want to see the messages.
    – No Sssweat
    Jan 12, 2017 at 0:34
1

To followup on @longboardnode's comment, If you really want to remove them, you can always download an app for your browser where you can style with css.

Such as Stylish for Chrome or Stylish for Firefox, which remembers your styling even after page refresh.

Then you simply hide it with css.

.messages.status {

   display: none; 

}

Note: This will only turn it off for you / your browser.

Side Note: For theming I like to use a Live Editor such as Live CSS Editor for Chrome unlike Stylish, this one is not global, it will only remember your code on a per page basis.

1

Turn them off here: admin/config/development/logging

Or to show up all errors you could also set these in your local.setting.php

//Spew out all the errors!
$conf['error_level'] = 2;
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
0

Learn how to set your error reporting level either within your php.ini file or by using the

error_reporting()

function.

The approporiate docs are here :-

http://php.net/manual/en/function.error-reporting.php

You can also set :-

display_errors = stderr

In your php.ini file to force errors to only go to the log file. http://php.net/manual/en/errorfunc.configuration.php#ini.display-errors

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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