Problem/Motivation
I have installed and activated WebProfiler and COOKiES Consent Management, and it looks like constructor for CookiesServiceEntityForm requires an EntityTypeManager instance as an argument, where WebProfiler injects a EntityManagerWrapper one.
I receive this error
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\cookies\Form\CookiesServiceEntityForm::__construct() must be an instance of Drupal\Core\Entity\EntityTypeManager, instance of Drupal\webprofiler\Entity\EntityManagerWrapper given, called in /app/web/modules/contrib/cookies/src/Form/CookiesServiceEntityForm.php on line 47 in Drupal\cookies\Form\CookiesServiceEntityForm->__construct() (line 34 of modules/contrib/cookies/src/Form/CookiesServiceEntityForm.php). Steps to reproduce
Activate both WebProfiler and COOKiES Consent Management, and go to COOKiES Service entities page and try to edit an existing service, or add a new one (/admin/structure/cookies_service/add)
Proposed resolution
Since it implements EntityTypeManagerInterface, it looks like it would be better to accept EntityTypeManagerInterface instead in the CookiesServiceEntityForm constructor.
It looks like another module for Cookies management has the same problem (issue #3131290)
Comments
Comment #2
fadeslayer commentedComment #4
jfeltkampChanged dependency from EntityTypeManager to EntityTypeManagerInterface.
Fixed in 1.0.x and released in >= 1.0.10
Comment #5
anybody@fadeslayer can you tell if this fixes the issue for you?