ContextManager::__construct() incorrectly type-hints its first parameter to EntityTypeManager instead of EntityTypeManagerInterface, causing conflicts with alternate implementation of the EntityTypeManager like the one in devel/webprofiler.

TypeError: Argument 1 passed to Drupal\context\ContextManager::__construct() must be an instance of Drupal\Core\Entity\EntityTypeManager, instance of Drupal\webprofiler\Entity\EntityManagerWrapper given, called in /var/www/bmwmotorclub.docker.test/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 278 in Drupal\context\ContextManager->__construct() (line 80 of modules/contrib/context/src/ContextManager.php)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ReBa created an issue. See original summary.

ReBa’s picture

Status: Active » Needs review
FileSize
1.28 KB

Locally tested with version 4.x-dev, can somebody confirm?

ReBa’s picture

Priority: Major » Normal

Wrong priority, needs to be normal.

robertom’s picture

same problem also with ViewIclusion condition.

attached the modified patch

malcolm_p’s picture

Yep, this is a pretty simple fix that works for me as well. Hopefully we can get this RTBC and merged.

boshtian’s picture

Status: Needs review » Reviewed & tested by the community

Yes, this solves the issue.

  • boshtian committed 31440f3 on 8.x-4.x authored by robertom
    Issue #3034419 by ReBa, robertom, malcolm_p: Conflict with WebProfiler...
boshtian’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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