AssertionError: assert(strpos($data_type, 'entity:') !== 0 || $this instanceof EntityContextDefinition) in assert()

Created on 7 June 2021, over 3 years ago
Updated 30 July 2022, over 2 years ago

Hi everyone,

I faced this error when I add new contact from Redhen contact in a Drupal 9 site

The website encountered an unexpected error. Please try again later.
AssertionError: assert(strpos($data_type, 'entity:') !== 0 || $this instanceof EntityContextDefinition) in assert() (line 112 of core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php).

assert(, 'assert(strpos($data_type, 'entity:') !== 0 || $this instanceof EntityContextDefinition)') (Line: 112)
Drupal\Core\Plugin\Context\ContextDefinition->__construct('entity:redhen_contact', Object) (Line: 66)
Drupal\redhen_contact\ContextProvider\RedhenContactRouteContext->getAvailableContexts() (Line: 97)
Drupal\Core\Plugin\Context\LazyContextRepository->getAvailableContexts() (Line: 114)
Drupal\Core\ParamConverter\EntityConverter->convert('1', Array, 'redhen_contact', Array) (Line: 100)
Drupal\Core\ParamConverter\ParamConverterManager->convert(Array) (Line: 45)
Drupal\Core\Routing\Enhancer\ParamConversionEnhancer->enhance(Array, Object) (Line: 244)
Drupal\Core\Routing\Router->applyRouteEnhancers(Array, Object) (Line: 118)
Drupal\Core\Routing\Router->matchRequest(Object) (Line: 92)
Drupal\Core\Routing\AccessAwareRouter->matchRequest(Object) (Line: 112)
Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(Object, 'kernel.request', Object)
call_user_func(Array, Object, 'kernel.request', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.request') (Line: 134)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 91)
Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Anyone faced this error? Is Redhen module working well with Drupal 9?

🐛 Bug report
Status

Fixed

Version

1.0

Component

redhen_contact

Created by

🇻🇳Vietnam tamnv

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.

No activities found.

Production build 0.71.5 2024