Problem/Motivation
The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\node\Entity\Node::urlInfo() in disqus_node_links_alter() (line 84 of modules/contrib/disqus/disqus.module).
disqus_node_links_alter(Array, Object, Array) (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('node_links', Array, Object, Array) (Line: 108)
Drupal\node\NodeViewBuilder::renderLinks('370', 'teaser', 'en', , NULL)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #lazy_builder callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#lazy_builder', Array, Array) (Line: 355)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 450)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 150)
After placing Disqus field on a teaser view mode for a node in manage form display, we encounter this error. The similar error we get by placing a disqus_comment_count field in a view.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3190115-2.patch | 1.2 KB | ankithashetty |
Comments
Comment #2
ankithashettyEntity::urlInfo is deprecated in Drupal 8.0.0, intended to be removed in Drupal 9.0.0 Use \Drupal\Core\Entity\EntityInterface::toUrl() instead.
Here is the patch. Kindly review.
Comment #3
gaurav.kapoor commentedThanks for spotting the issue and providing patch, but this issue has been fixed with https://www.drupal.org/project/disqus/issues/3143716