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.

Comments

BryanDeNijs created an issue. See original summary.

bryandenijs’s picture

Status: Active » Needs review
StatusFileSize
new916 bytes

Here is a working patch.

  • BryanDeNijs authored 2cff750 on 2.0.x
    Issue #3212165 by BryanDeNijs: Drupal\Core\Security\...
bryandenijs’s picture

Wow, it is already merged?
Thanks!
So this ticket can be closed I guess?

erik seifert’s picture

Version: 2.0.x-dev » 2.0.0-beta12
Status: Needs review » Fixed
erik seifert’s picture

I was actually on the same issue ;- )

Status: Fixed » Closed (fixed)

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