Is there a way to turn off the warning for drupal 7?
Asked Answered
I

2

14

How can I turn off warnings in drupal 7?

Inca answered 9/6, 2011 at 17:48 Comment(3)
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
B
23

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:
Logging and Errors

Bilestone answered 15/6, 2011 at 19:42 Comment(0)
O
1

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
    Use drush 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.
Outgrow answered 7/11, 2018 at 10:41 Comment(1)
+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 allMarchetti

© 2022 - 2024 — McMap. All rights reserved.