0

PHP erros (they are all actually deprecation warnings) are appearing on many pages of the site, and I've done all the recommended things to turn them off:

  • display_errors is "Off" (checked with phpinfo())
  • drush site:mode is set to prod
  • On the "Logging and Errors" page, "None" is ticked.

What else is there to do?

The errors/warnings - with full stack trace - appear even for anonymous users. I don't want them to appear for anyone, and I would have expected the settings detailed above to achieve this.

10
  • Does this answer your question? Hide errors from users but show to admin?
    – leymannx
    Jul 19, 2022 at 13:57
  • Never seen an option in Drupal to enable deprecation warnings. How did you do that?
    – 4uk4
    Jul 19, 2022 at 15:05
  • @4uk4 I should have said PHP error messages/notices/warnings... It's just that they mostly happen to be deprecation warnings because it's on PHP8.1. But all PHP error messages really
    – naomi
    Jul 19, 2022 at 15:12
  • @leymannx thanks for the suggestion but no. I don't want them to display for anyone. Also that question is for Drupal 7
    – naomi
    Jul 19, 2022 at 15:13
  • 2
    @naomi, nevermind, I was thinking about Drupal deprecations. Now that you've changed the title it's clear they are PHP warnings. - If On the "Logging and Errors" page, "None" is ticked doesn't help, I guess you have overridden the config option somewhere: $config['system.logging']['error_level'] = 'verbose';
    – 4uk4
    Jul 19, 2022 at 15:37

1 Answer 1

2

If

  • On the "Logging and Errors" page, "None" is ticked.

doesn't help, look for this line

$config['system.logging']['error_level'] = 'verbose';

This is discussed since 2015 whether you should be able to see in UI that your choice is overridden. See https://www.drupal.org/project/drupal/issues/2621920.

Your Answer

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

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