Problem/Motivation

can't access flag admin page after i enabled flag_lists,see below the error message
Flag admin page works great withou flag_lists enabled.

The website encountered an unexpected error. Please try again later.
TypeError: Argument 2 passed to Drupal\flag_lists\FlagListsFlagListBuilder::__construct() must be an instance of Drupal\Core\Config\Entity\ConfigEntityStorage, instance of Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator given, called in /var/www/html/d8.materio.com/public_html/web/modules/contrib/flag_lists/src/FlagListsFlagListBuilder.php on line 47 in Drupal\flag_lists\FlagListsFlagListBuilder->__construct() (line 65 of modules/contrib/flag_lists/src/FlagListsFlagListBuilder.php).
Drupal\flag_lists\FlagListsFlagListBuilder->__construct(Object, Object, Object, Object) (Line: 47)
Drupal\flag_lists\FlagListsFlagListBuilder::createInstance(Object, Object) (Line: 285)
Drupal\Core\Entity\EntityTypeManager->createHandlerInstance('Drupal\flag_lists\FlagListsFlagListBuilder', Object) (Line: 274)
Drupal\Core\Entity\EntityTypeManager->getHandler('flag', 'list_builder') (Line: 215)
Drupal\Core\Entity\EntityTypeManager->getListBuilder('flag') (Line: 170)
Drupal\webprofiler\Entity\EntityManagerWrapper->getListBuilder('flag') (Line: 23)
Drupal\Core\Entity\Controller\EntityListController->listing('flag')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
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: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 38)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

just enable the two modules (and a bunch of others before of course)
flag & flag_lists @ dev version
Drupal core 8.9.13

CommentFileSizeAuthor
#2 entitystorageinterface.patch1.32 KBbachbach

Comments

bachbach created an issue. See original summary.

bachbach’s picture

StatusFileSize
new1.32 KB

here is a patch to fixe this (i only repoduced fixe from other modules with the same bug)

digdanlow’s picture

Status: Active » Needs review
sl27257’s picture

Thanks for the report! Will implement the fix here and see what is happening.

/Thomas

sl27257’s picture

Status: Needs review » Reviewed & tested by the community

A perfectly correct patch. If the __construct is followed to its parent the fix is obvious!

I will push it to the dev.

  • sl27257 committed fa6f764 on 4.0.x authored by bachbach
    Issue #3198936 by bachbach: ConfigEntityStorageDecorator given
    
sl27257’s picture

Status: Reviewed & tested by the community » Fixed
sl27257’s picture

Status: Fixed » Closed (fixed)