2

I've got my site developed and I'm preparing it for production. There are some errant warnings that appear every once in awhile (I've checked them, they aren't actually a problem, just something dumb in one of the php libraries I'm using). I'd like to hide all warnings and errors on the production site.

I, as an administrator, go to /admin/config/development/logging and I change Errors to Display to None, then I click Save. It says my changes have been saved, but the option is still set to "All Messages" and the errors and warnings are still showing on my site.

What's wrong? Why can't I change this setting?

I'm logged in as user 1, with administrator permissions, but I can't change this setting. Can you help me?

  • A stupid questions: they appears if you are logged as admin or always? – arrubiu Jul 16 '12 at 6:08
  • Always. Even if I'm logged out as an anonymous user, I'm still seeing the errors and warnings. – Kenny Wyland Jul 16 '12 at 16:25
3

Found it!

This is my first Drupal site I'm pushing to production. I still had the following lines of code in my settings.php as suggested on this site: http://drupal.org/node/1056468

error_reporting(-1);
$conf['error_level'] = 2;
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

Those lines were forcing it to ignore the value in the database and always set it to Show All Errors. I commented those lines out and it's respecting the form value I choose now.

|improve this answer|||||
1

Apparently the form isn't being submitted properly, so the question is what's causing that. I would suspect that page shows javascript errors - you can check using Firebug, and if there are, the errors should point you to the problem (could be a bug with a contributed module, for example).

Are you using any modules that are likely to influence configuration forms? (I'm thinking of things like Domain Access, when not configured properly forms might not be saved correctly).

As a workaround, you can also try disabling javascript in your browser and saving the form.

|improve this answer|||||
  • Those are good ideas. I checked for javascript errors, but didn't find any. I'm going to try to add some debugging to the module that is accepting the POST and see if I can figure out what is going on. I don't think I have any modules that would alter this form. Chaos Tools, CDN, Date, Devel, Lightbox2, Libraries, Views, etc. – Kenny Wyland Jul 17 '12 at 3:35
  • Found it! I still had the code in settings.php that I added my first day playing with Drupal. The beginner tutorials all started with the suggestion to force all errors to be displayed. – Kenny Wyland Jul 17 '12 at 4:35
  • Ha! That would do it... – arjan Jul 17 '12 at 10:29

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.