Problem/Motivation
When adding the "Show rss news" block to the dashboard, an error occurs:
Drupal\Core\Security\UntrustedCallbackException: Render #lazy_builder callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was Drupal\dashboards\Plugin\Dashboard\RssNews::lazyBuildPreRender. See https://www.drupal.org/node/2966725 in Drupal\Core\Render\Renderer->doTrustedCallback() (line 96 of core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php).
Proposed resolution
Implement the TrustedCallbackInterface, as explained in https://www.drupal.org/node/2966725.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3212165-implement-trustedcallbackinterface-2.diff | 916 bytes | bryandenijs |
Comments
Comment #2
bryandenijsHere is a working patch.
Comment #4
bryandenijsWow, it is already merged?
Thanks!
So this ticket can be closed I guess?
Comment #5
erik seifert commentedComment #6
erik seifert commentedI was actually on the same issue ;- )