Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Updated site from 8.9.5 to 9.0.5. When I tried to make new content, IMCE threw an error
Steps to reproduce
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\imce\ImceFileField::preRenderWidget. See https://www.drupal.org/node/2966725 in Drupal\Core\Render\Renderer->doTrustedCallback() (line 96 of /srv/www/htdocs/orcma9/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php).
Comments
Comment #2
thallesHi @tjtj, thanks for use IMCE and for report this.
This bug was fixed in dev branch, in the issue #3149697: php security error when I create content on Drupal 9.0
Comment #3
thallesComment #4
thalles