On drupal 9.0.1, I added a new entity browser display to a view. When I try to configure something, the following ajax error occurs:
The website encountered an unexpected error. Please try again later.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\entity_browser\Plugin\views\display\EntityBrowser::preRenderAddFieldsetMarkup. See https://www.drupal.org/node/2966725 in Drupal\Core\Render\Renderer->doTrustedCallback() (line 96 of core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php).
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | entity_browser-trusted-callback-3154079-18.patch | 1013 bytes | jlicht |
| #12 | 3154079-rework.patch | 641 bytes | web-beest |
| #11 | 3154079-rework.patch | 3.16 KB | web-beest |
| #2 | entity_browser_views_display_error_3154079_2_D9.patch | 540 bytes | adinac |
Comments
Comment #2
adinac commentedComment #3
danny englanderI ran into this same issue. The patch fixed the issue.
Comment #4
danny englanderComment #6
oknateCommitted, thanks.
Comment #8
chris matthews commented@oknate, would it possible to tag Entity Browser 8.x-2.6 for the 6592dd2 commit on 8.x-2.x?
Comment #9
a.dmitriiev commented+1 for the new version
Comment #10
grimreaperHello,
I have just encountered this issue too when testing an issue with Entity Browser for another contrib module.
Big +1 for a new release.
Comment #11
web-beestI know this is a closed issue, but wouldn't it be better to call the parent function and add the trusted functions?
'preRenderAddFieldsetMarkup' is one of the trusted callbacks from PluginBase, so no need to add it to the list again.
Comment #12
web-beestPatched wrong version, sorry.
Comment #13
immoreel commentedPatch from #2 works, patch from #12 couldn't be applied
Comment #14
jnettikCan confirm that the dev version of the module fixes this. Any chance of a tagged release anytime soon?
Comment #15
phjouI encountered the same issue, it took me a while to find out that it was this issue because it is closed/fixed.
Comment #16
pcate commentedSame here, ran into this issue today. Patch #2 fixed the issue. Can we get a new tagged release?
Comment #17
oknateI have tagged a new release with this fix in it. https://www.drupal.org/project/entity_browser/releases/8.x-2.6
Comment #18
jlicht commentedRerolled the patch for the 1.x branch