I created a simple content with a image field. If I turn on IMCS for the field, when I try to create new content, I get this error:

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 /home/ftpuser/RetamaD83/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php).

If I use the IMCE icon in CKEditor, it works okay.

Comments

brussam created an issue. See original summary.

thalles’s picture

Category: Bug report » Support request

Thanks for report this issue!
this issue was fixed in #3149697: php security error when I create content on Drupal 9.0, but your description about this subject was very useful

thalles’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.