Problem/Motivation

Page admin/modules doesn't open with this module activated and the core module "comment" disable.

Steps to reproduce

Install this module, disable "comment" module, and enable this module. Go to admin/modules page.

Error:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "comment.manager".

Did you mean one of these: "theme.manager", "config.manager"? in Drupal\Component\DependencyInjection\Container->get() (line 151 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Drupal\rate\RatePermissions::create(Object) (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition('Drupal\rate\RatePermissions') (Line: 117)
Drupal\Core\Controller\ControllerResolver->createController('Drupal\rate\RatePermissions::permissions') (Line: 69)
Drupal\Core\Controller\ControllerResolver->getControllerFromDefinition('Drupal\rate\RatePermissions::permissions') (Line: 148)
Drupal\user\PermissionHandler->buildPermissionsYaml() (Line: 108)
Drupal\user\PermissionHandler->getPermissions() (Line: 119)
Drupal\user\PermissionHandler->moduleProvidesPermissions('address') (Line: 266)
Drupal\system\Form\ModulesListForm->buildRow(Array, Object, 'Drupal') (Line: 185)
Drupal\system\Form\ModulesListForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 532)
Drupal\Core\Form\FormBuilder->retrieveForm('system_modules', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 97)
Drupal\autosave_form\Form\AutosaveFormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
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: 158)
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: 117)
Drupal\cryptolog\CryptologMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->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: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

adaragao created an issue. See original summary.

krzysztof domański’s picture

krzysztof domański’s picture

StatusFileSize
new414 bytes
krzysztof domański’s picture

StatusFileSize
new425 bytes
jordik’s picture

Title: admin/modules error without core comment module activated » Error if comment core module disabled
jordik’s picture

Please review.
The comment.manager is now called only if the comment module is enabled.

jordik’s picture

jordik’s picture

Status: Active » Needs review

  • JordiK committed c212075 on 8.x-2.x
    Issue #3202863 by Krzysztof Domański, JordiK, adaragao: Error if comment...
jordik’s picture

Status: Needs review » Fixed
krzysztof domański’s picture

Works fine, thanks!

Status: Fixed » Closed (fixed)

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