I got this error when I tried to go to settings...

 PHP message: Uncaught PHP Exception Drupal\Core\Security\UntrustedCallbackException: "Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was Drupal\background_image\Form\BackgroundImageSettingsForm::preRenderStates. See https://www.drupal.org/node/2966725" at /var/www/html/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php line 96"
2021/10/21 10:42:26 [error] 2026#2026: *205 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Drupal\Core\Security\UntrustedCallbackException: "Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was Drupal\background_image\Form\BackgroundImageSettingsForm::preRenderStates. See https://www.drupal.org/node/2966725" at /var/www/html/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php line 96" while reading response header from upstream, client: 172.18.0.6, server: , request: "GET /admin/config/media/background_image/settings HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "drupaltesting.ddev.site", referrer: "https://drupaltesting.ddev.site/admin/config/media/background_image"

Comments

rossidrup created an issue. See original summary.

hongpong’s picture

Title: Is this module stable? I got WSOD » Uncaught PHP Exception Core\Security\UntrustedCallbackException
hongpong’s picture

Status: Active » Closed (duplicate)