Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function.

Created on 13 June 2020, over 4 years ago
Updated 9 February 2023, almost 2 years ago

I got an interesting error today.

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 disable_language_alter_preferred_languages. See https://www.drupal.org/node/2966725 in Drupal\Core\Render\Renderer->doTrustedCallback() (line 96 of /data/sites/web/achelsekluisorg/website/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php).

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇧🇪Belgium BramDriesen Belgium 🇧🇪

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024