Dispatcher error with Block

Created on 20 October 2020, about 4 years ago
Updated 9 May 2023, over 1 year ago

The website encountered an unexpected error. Please try again later.
TypeError: Argument 2 passed to Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::dispatch() must be an instance of Symfony\Component\EventDispatcher\Event or null, instance of Drupal\social_media\Event\SocialMediaEvent given, called in /mnt/www/drupal9/modules/contrib/social_media/src/Plugin/Block/SocialSharingBlock.php on line 89 in Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (line 89 of core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php).
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 89)
Drupal\social_media\Plugin\Block\SocialSharingBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender()
call_user_func_array() (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 781)
Drupal\Core\Render\Renderer->doCallback() (Line: 372)
Drupal\Core\Render\Renderer->doRender() (Line: 444)
Drupal\Core\Render\Renderer->doRender() (Line: 200)
Drupal\Core\Render\Renderer->render() (Line: 450)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 146)
__TwigTemplate_ad6720b21dec7e5e1328c4a555065addae827bc261fd5dfd946bac4d71f960c4->doDisplay() (Line: 407)
Twig\Template->displayWithErrorHandling() (Line: 380)
Twig\Template->display() (Line: 167)
__TwigTemplate_5d0a2467e46650b07397f20e4a8b32b27d64f128f59f7f295754a71402ef2390->doDisplay() (Line: 407)
Twig\Template->displayWithErrorHandling() (Line: 380)
Twig\Template->display() (Line: 392)
Twig\Template->render() (Line: 65)
twig_render_template() (Line: 384)
Drupal\Core\Theme\ThemeManager->render() (Line: 431)
Drupal\Core\Render\Renderer->doRender() (Line: 200)
Drupal\Core\Render\Renderer->render() (Line: 450)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 144)
__TwigTemplate_a5a149c56a21bf2cb23feab5b1631761e0d4983f3f9b24d25a38a48a42737abf->doDisplay() (Line: 407)
Twig\Template->displayWithErrorHandling() (Line: 380)
Twig\Template->display() (Line: 392)
Twig\Template->render() (Line: 65)
twig_render_template() (Line: 384)
Drupal\Core\Theme\ThemeManager->render() (Line: 431)
Drupal\Core\Render\Renderer->doRender() (Line: 200)
Drupal\Core\Render\Renderer->render() (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 148)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() (Line: 78)
Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy->dispatch() (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 57)
Drupal\Core\StackMiddleware\Session->handle() (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 705)
Drupal\Core\DrupalKernel->handle() (Line: 19)

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States charlie59

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

    Hello all! I've added issue credits for everyone involved in this task to #3289788, which provides overlapping Drupal 9 and Drupal 10 support on the 2.0.x branch.

    This issue should only be a problem with Drupal Core versions that are out of security support, so I'm going to close this one out as outdated. I hope you all have had success with this module, and invite you to upgrade to the 2.0.0 stable version, which I hope to release this week.

    Have a great day!

Production build 0.71.5 2024