Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After installing Total Control in a custom profile which Comment module is not enabled, then enabling the Comment module produces a page containing the following:
The website encountered an unexpected error. Please try again later.
Exception: No entity type for field uid on view control_comments in Drupal\views\Plugin\views\HandlerBase->getEntityType() (line 697 of core/modules/views/src/Plugin/views/HandlerBase.php).
Drupal\views\Plugin\views\field\EntityField->getEntityFieldRenderer() (Line: 1015)
Drupal\views\Plugin\views\field\EntityField->getCacheContexts() (Line: 171)
Drupal\Core\Cache\CacheableMetadata::createFromObject(Object) (Line: 2277)
Drupal\views\Plugin\views\display\DisplayPluginBase->calculateCacheMetadata() (Line: 326)
Drupal\views\Entity\View->addCacheMetadata() (Line: 300)
Drupal\views\Entity\View->preSave(Object) (Line: 434)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 389)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 259)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 364)
Drupal\Core\Entity\Entity->save() (Line: 637)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 341)
Drupal\Core\Config\ConfigInstaller->createConfiguration('', Array) (Line: 106)
Drupal\features\FeaturesConfigInstaller->createConfiguration('', Array, 1) (Line: 240)
Drupal\Core\Config\ConfigInstaller->installOptionalConfig(Object, Array) (Line: 164)
Drupal\Core\Config\ConfigInstaller->installDefaultConfig('module', 'comment') (Line: 248)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 448)
Drupal\system\Form\ModulesListForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('system_modules', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('system_modules', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
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}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
The next page loaded shows the following messages:
Notice: Undefined index: node in Drupal\views\Plugin\views\HandlerBase->getEntityType() (line 687 of core/modules/views/src/Plugin/views/HandlerBase.php).
Drupal\views\Plugin\views\HandlerBase->getEntityType() (Line: 791)
Drupal\views\Plugin\views\field\EntityField->getEntityFieldRenderer() (Line: 1015)
Drupal\views\Plugin\views\field\EntityField->getCacheContexts() (Line: 171)
Drupal\Core\Cache\CacheableMetadata::createFromObject(Object) (Line: 2277)
Drupal\views\Plugin\views\display\DisplayPluginBase->calculateCacheMetadata() (Line: 326)
Drupal\views\Entity\View->addCacheMetadata() (Line: 300)
Drupal\views\Entity\View->preSave(Object) (Line: 434)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 389)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 259)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 364)
Drupal\Core\Entity\Entity->save() (Line: 637)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 341)
Drupal\Core\Config\ConfigInstaller->createConfiguration('', Array) (Line: 106)
Drupal\features\FeaturesConfigInstaller->createConfiguration('', Array, 1) (Line: 240)
Drupal\Core\Config\ConfigInstaller->installOptionalConfig(Object, Array) (Line: 164)
Drupal\Core\Config\ConfigInstaller->installDefaultConfig('module', 'comment') (Line: 248)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 448)
Drupal\system\Form\ModulesListForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 585)
Drupal\Core\Form\FormBuilder->processForm('system_modules', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm('system_modules', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
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}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Warning: Invalid argument supplied for foreach() in Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives() (line 102 of core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php).
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 283)
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 174)
Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 181)
Drupal\Core\Menu\LocalTaskManager->getDefinitions() (Line: 206)
Drupal\Core\Menu\LocalTaskManager->getLocalTasksForRoute('page_manager.page_view_homepage_homepage-panels_variant-0') (Line: 290)
Drupal\Core\Menu\LocalTaskManager->getTasksBuild('page_manager.page_view_homepage_homepage-panels_variant-0', Object) (Line: 358)
Drupal\Core\Menu\LocalTaskManager->getLocalTasks('page_manager.page_view_homepage_homepage-panels_variant-0', 0) (Line: 94)
Drupal\Core\Menu\Plugin\Block\LocalTasksBlock->build() (Line: 203)
Drupal\block\BlockViewBuilder::preRender(Array)
call_user_func('Drupal\block\BlockViewBuilder::preRender', Array) (Line: 376)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 448)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 324)
__TwigTemplate_13d3c2eae859a78aa88f3ea0db24a6e10781ceeeff8fbbd3596c40bc202e7eec->block_header(Array, Array) (Line: 186)
Twig_Template->displayBlock('header', Array, Array) (Line: 214)
__TwigTemplate_13d3c2eae859a78aa88f3ea0db24a6e10781ceeeff8fbbd3596c40bc202e7eec->block_main(Array, Array) (Line: 186)
Twig_Template->displayBlock('main', Array, Array) (Line: 101)
__TwigTemplate_13d3c2eae859a78aa88f3ea0db24a6e10781ceeeff8fbbd3596c40bc202e7eec->doDisplay(Array, Array) (Line: 379)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 347)
Twig_Template->display(Array) (Line: 358)
Twig_Template->render(Array) (Line: 64)
twig_render_template('profiles/varbase/themes/vartheme/templates/system/page.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 106)
__TwigTemplate_831ccbb662f0d174146cd4ab0efef6eb4adbcc42eb4ea12b9f1326298d05e847->doDisplay(Array, Array) (Line: 379)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 347)
Twig_Template->display(Array) (Line: 358)
Twig_Template->render(Array) (Line: 64)
twig_render_template('profiles/varbase/themes/vartheme/templates/system/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 149)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
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: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Obviously, I've got the display of all messages, with stacktrace turned on. Web server logs show the first page returned HTML code 500.
The Comment module shows up as enabled after this, and so far I haven't found Comment acting strangely.
Comments
Comment #2
Mohammed J. RazemI was able to reproduce this issue.
Thanks for reporting. We'll look into it.
Comment #3
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #4
Pegasus360 CreditAttribution: Pegasus360 commentedSame problem as above.
to bring the site back I ran
drush pmu comment
Comment #5
todda CreditAttribution: todda commentedI have the same Problem on Varbase 8.x-4.10.
Are there any Patches or Fixes?
Sry for my bad englisch.
Comment #6
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #7
Ahmad Abbad CreditAttribution: Ahmad Abbad commentedThis issue is related to total_control module as i think.
Comment #8
todda CreditAttribution: todda commentedI don´t know, if this helps:
I´m getting this error, after enabling:
Exception: No entity type for field uid on view control_comments in Drupal\views\Plugin\views\HandlerBase->getEntityType() (Zeile 711 in ../core/modules/views/src/Plugin/views/HandlerBase.php).
and when i run update.php:
Drupal\Core\Entity\EntityStorageException: 'action' entity with ID 'comment_delete_action' already exists. in Drupal\Core\Entity\EntityStorageBase->doPreSave() (Zeile 425 in ../core/lib/Drupal/Core/Entity/EntityStorageBase.php).
Comment #9
Ahmad Abbad CreditAttribution: Ahmad Abbad commentedTry to disable total control module and then enable comment module then error will be gone, so the main issue is with total control module.
Comment #10
todda CreditAttribution: todda commentedNow it works.
I´ve disabled total control and varbase dashboard. After that, i could enable comment module without errors.
Thank you!!
Comment #11
Ahmad Abbad CreditAttribution: Ahmad Abbad commentedComment #12
Mohammed J. RazemReopening as this should be fixed to allow enabling the Comment module without the need to disable any module.
We should bring @Abu Zakham on this as he's the maintainer of Total Control and Varbase Total Control module to advise.
Comment #13
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commented#2918153: Drupal 8 minimal profile: When the comment module was not enabled, then enabled after total Control. or profiles which do not enable the comment module on install
#2918087: Drupal 8 minimal profile: Unable to install Total Control due to unmet dependencies: views.view.control_terms (taxonomy)
#2918098: Drupal 8 minimal profile: [menu ui] is not enabled : PHP Fatal error: Call to undefined function Drupal\\total_control\\Plugin\\Block\\menu_ui_get_menus()
#2918115: Drupal 8 minimal profile: [field ui] is not enabled : Uncaught PHP Exception Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: "Route "field_ui.field_storage_config_add_node" does not exist.
Comment #14
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #15
ahmed-ayman CreditAttribution: ahmed-ayman at Google Summer of Code commentedI was able to bypass this error by typing
drush entup
&
drush updb
but I'm facing a brand new problem now that is I can't choose a comment type, the list isn't showing the available comment types.
Comment #16
sealionking CreditAttribution: sealionking commentedstill have this problem
enable comment after installation the distribution
Comment #17
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #18
jjwfcd CreditAttribution: jjwfcd commentedstill this problem.
varbase distribution 8.6.11
steps:
after enable forum then drush updatedb
[notice] Update started: comment_post_update_enable_comment_admin_view
> [error] 'action' entity with ID 'comment_delete_action' already exists.
> [error] Update failed: comment_post_update_enable_comment_admin_view
[error] Update aborted by: comment_post_update_enable_comment_admin_view
[error] Finished performing updates.
when updatedb vai webgui the error is
Warning: strpos(): Empty needle in Drupal\Core\Utility\UnroutedUrlAssembler->addOptionDefaults() (line 181 of core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php).
Drupal\Core\Utility\UnroutedUrlAssembler->addOptionDefaults(Array) (Line: 109)
Drupal\Core\Utility\UnroutedUrlAssembler->buildLocalUrl('base://start', Array, 1) (Line: 59)
Drupal\Core\Utility\UnroutedUrlAssembler->assemble('base://start', Array, 1) (Line: 750)
Drupal\Core\Url->toString(1) (Line: 861)
batch_process(Object, Object) (Line: 630)
Drupal\system\Controller\DbUpdateController->triggerBatch(Object) (Line: 169)
Drupal\system\Controller\DbUpdateController->handle('run', Object)
call_user_func_array(Array, Array) (Line: 115)
Drupal\Core\Update\UpdateKernel->handleRaw(Object) (Line: 76)
Drupal\Core\Update\UpdateKernel->handle(Object) (Line: 28)
Warning: strpos(): Empty needle in Drupal\Core\Utility\UnroutedUrlAssembler->addOptionDefaults() (line 181 of core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php).
Drupal\Core\Utility\UnroutedUrlAssembler->addOptionDefaults(Array) (Line: 109)
Drupal\Core\Utility\UnroutedUrlAssembler->buildLocalUrl('base://start', Array, 1) (Line: 59)
Drupal\Core\Utility\UnroutedUrlAssembler->assemble('base://start', Array, 1) (Line: 750)
Drupal\Core\Url->toString(1) (Line: 886)
batch_process(Object, Object) (Line: 630)
Drupal\system\Controller\DbUpdateController->triggerBatch(Object) (Line: 169)
Drupal\system\Controller\DbUpdateController->handle('run', Object)
call_user_func_array(Array, Array) (Line: 115)
Drupal\Core\Update\UpdateKernel->handleRaw(Object) (Line: 76)
Drupal\Core\Update\UpdateKernel->handle(Object) (Line: 28)
Comment #19
jjwfcd CreditAttribution: jjwfcd commentedthe problem is that the default profile has no comments_type
Comment #20
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #21
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #23
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #24
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #25
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commentedComment #26
jjwfcd CreditAttribution: jjwfcd commentedcomposer update error
[Exception]
Cannot apply patch Issue #2935351: Fixed the issue when Enabled with multilingual of Translatable Markup for Invalid Argument Exception: $string (Array) must be
a string. (https://www.drupal.org/files/issues/2935351-2.patch)!
Comment #27
jjwfcd CreditAttribution: jjwfcd commentedok, the patch applied successfully. thanks
Comment #29
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot commented