How can I turn off warnings in drupal 7?
Is there a way to turn off the warning for drupal 7?
Please be more specific. What warnings are you trying to turn off? Are you sure they are Drupal warnings, or are they PHP warnings? –
Melgar
Wouldn't it be easier to fix it? Usually warnings are a sign of bugs. –
Pantia
Sometimes a warning causes the page to flush out, triggering other issues which prevent you diagnosing the original warning. –
Foolery
I am assuming you mean the messages at the top of the page, but you did not provide any detailed information.
In Drupal 7, navigate to admin/config/development/logging
and choose the radio button "None" as seen below:
Other than using the GUI at admin/config/development/logging
, there are two other methods to change the Logging and errors option. These lend themselves to scripting and automation.
- Using Drush CLI, we can do:
drush vset error_level 0
Usedrush vset error_level 1
to select Errors and Warnings, or,
drush vset error_level 2
to select All. - If you do not have Drush installed, this option can be toggled in
settings.php
by adding$conf['error_level'] = 0;
to the file. For options other than turning the logging and error display off, the codes are the same as those I list above for the Drush method.
+1 useful answer thank you for D7. To add some more info, from myself trying this:
drush vset error_level 0
turns of all errors. The answer doesn't say which number 0
, 1
, 2
does what. So presumably, as I found, if 0
turns off everything then 1
enables just Errors and Warnings and 2
enables everything. Also I had to clear cache drush cc all
–
Marchetti © 2022 - 2024 — McMap. All rights reserved.