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

Ben Coleman created an issue. See original summary.

Mohammed J. Razem’s picture

I was able to reproduce this issue.

Thanks for reporting. We'll look into it.

Rajab Natshah’s picture

Assigned: Unassigned » Rajab Natshah
Status: Active » Needs work
Pegasus360’s picture

Same problem as above.
to bring the site back I ran

drush pmu comment

todda’s picture

I have the same Problem on Varbase 8.x-4.10.

Are there any Patches or Fixes?

Sry for my bad englisch.

Rajab Natshah’s picture

Version: 8.x-4.06 » 8.x-4.10
Ahmad Abbad’s picture

This issue is related to total_control module as i think.

todda’s picture

I 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).

Ahmad Abbad’s picture

Try to disable total control module and then enable comment module then error will be gone, so the main issue is with total control module.

todda’s picture

Now it works.
I´ve disabled total control and varbase dashboard. After that, i could enable comment module without errors.

Thank you!!

Ahmad Abbad’s picture

Status: Needs work » Closed (works as designed)
Mohammed J. Razem’s picture

Status: Closed (works as designed) » Needs work

Reopening 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.

Rajab Natshah’s picture

Assigned: Rajab Natshah » Unassigned
ahmed-ayman’s picture

I 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.

sealionking’s picture

still have this problem

enable comment after installation the distribution

Rajab Natshah’s picture

Project: Varbase - The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) » Varbase Total Control Dashboard
Version: 8.x-4.10 » 8.x-6.x-dev
jjwfcd’s picture

still 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)

jjwfcd’s picture

the problem is that the default profile has no comments_type

Rajab Natshah’s picture

Title: Error after enabling Comment » Fix Error after enabling Comment
Project: Varbase Total Control Dashboard » Total Control Admin Dashboard
Version: 8.x-6.x-dev » 8.x-2.x-dev
Rajab Natshah’s picture

Issue summary: View changes

Rajab Natshah’s picture

Assigned: Unassigned » Mohammed J. Razem
Status: Needs work » Needs review
Rajab Natshah’s picture

Assigned: Mohammed J. Razem » Unassigned
Rajab Natshah’s picture

Status: Needs review » Fixed
jjwfcd’s picture

composer 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)!

jjwfcd’s picture

ok, the patch applied successfully. thanks

Status: Fixed » Closed (fixed)

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