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 CreditAttribution: adinac as a volunteer 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 CreditAttribution: Chris Matthews as a volunteer 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 CreditAttribution: a.dmitriiev as a volunteer and at 1xINTERNET 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 CreditAttribution: immoreel at Finalist 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 CreditAttribution: 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 CreditAttribution: jlicht commentedRerolled the patch for the 1.x branch