- Issue created by @smethawee
- 🇮🇳India Nishant
Tried to reproduce your issue on local as per your requirement, Content moderation is working fine as I have tested with change moderation state with Draft,Review,Published,Unpublished,Archive,Edit
Also able to edit any node without any error.
with the below configuration, but unable to see the error.Seems like "Content Moderation" and "Workflows" module not installed properly on your system.
Drupal version: 9.5.x-dev
PHP version: 8.0.28 - 🇺🇸United States smethawee
@Nishant,
Thank you for you to took a look on it. Here Even I tried to delete the Content Moderation" and "Workflow module please check what I got below: FYI: This Drupal 9.5.8 php 8.1.12
The website encountered an unexpected error. Please try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.content_moderation_state' doesn't exist: SELECT COUNT(*) AS "expression" FROM (SELECT 1 AS "expression" FROM "content_moderation_state" "base_table" INNER JOIN "content_moderation_state_field_data" "content_moderation_state_field_data" ON "content_moderation_state_field_data"."id" = "base_table"."id" WHERE "content_moderation_state_field_data"."workflow" = :db_condition_placeholder_0 GROUP BY "base_table"."revision_id", "base_table"."id" LIMIT 1 OFFSET 0) "subquery"; Array ( [:db_condition_placeholder_0] => editorial ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 267 of core/lib/Drupal/Core/Entity/Query/Sql/Query.php).
Drupal\Core\Database\StatementWrapper->execute() (Line: 946)
Drupal\Core\Database\Connection->query() (Line: 525)
Drupal\Core\Database\Query\Select->execute() (Line: 267)
Drupal\Core\Entity\Query\Sql\Query->result() (Line: 84)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 121)
Drupal\content_moderation\Plugin\WorkflowType\ContentModeration->workflowHasData() (Line: 20)
Drupal\workflows\Form\WorkflowDeleteForm->buildForm()
call_user_func_array() (Line: 534)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 281)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 44)
Drupal\services\StackMiddleware\FormatSetter->handle() (Line: 270)
Drupal\shield\ShieldMiddleware->bypass() (Line: 137)
Drupal\shield\ShieldMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 718)
Drupal\Core\DrupalKernel->handle() (Line: 19)--------------------------------------
And olso here the status deatial of /admin/reports/status pageEntity/field definitions
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Content moderation state
The Content moderation state entity type needs to be installed.
Workflow
The Workflow entity type needs to be installed.
Paragraph
The Moderation state field needs to be uninstalled. - 🇮🇳India Nishant
@smethawee,
I am unable to reproduce this issue, Can you please try to install properly on another environment.
- 🇺🇸United States smethawee
@Nishant,
Yes, I did on my Stage now. Here what I got....when I clicked on /admin/modules/uninstall
--------------------------------
The website encountered an unexpected error. Please try again later.Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.content_moderation_state' doesn't exist: SELECT "base_table"."revision_id" AS "revision_id", "base_table"."id" AS "id" FROM "content_moderation_state" "base_table" GROUP BY "base_table"."revision_id", "base_table"."id" LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 272 of core/lib/Drupal/Core/Entity/Query/Sql/Query.php).
Drupal\Core\Database\StatementWrapper->execute() (Line: 946)
Drupal\Core\Database\Connection->query() (Line: 525)
Drupal\Core\Database\Query\Select->execute() (Line: 272)
Drupal\Core\Entity\Query\Sql\Query->result() (Line: 84)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 651)
Drupal\Core\Entity\EntityStorageBase->hasData() (Line: 43)
Drupal\Core\Entity\ContentUninstallValidator->validate() (Line: 624)
Drupal\Core\Extension\ModuleInstaller->validateUninstall() (Line: 99)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->validateUninstall() (Line: 165)
Drupal\system\Form\ModulesUninstallForm->buildForm()
call_user_func_array() (Line: 534)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 281)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 44)
Drupal\services\StackMiddleware\FormatSetter->handle() (Line: 270)
Drupal\shield\ShieldMiddleware->bypass() (Line: 137)
Drupal\shield\ShieldMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 718)
Drupal\Core\DrupalKernel->handle() (Line: 19)
-------------------------------------------------------------------
And When I click on /node/add/article > Applied to Article node please see below:The website encountered an unexpected error. Please try again later.
InvalidArgumentException: The state '' does not exist in workflow. in Drupal\workflows\Plugin\WorkflowTypeBase->getState() (line 155 of core/modules/workflows/src/Plugin/WorkflowTypeBase.php).
Drupal\content_moderation\Plugin\WorkflowType\ContentModeration->getState() (Line: 366)
Drupal\content_moderation\EntityTypeInfo->formAlter() (Line: 167)
content_moderation_form_alter() (Line: 562)
Drupal\Core\Extension\ModuleHandler->alter() (Line: 838)
Drupal\Core\Form\FormBuilder->prepareForm() (Line: 282)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 44)
Drupal\services\StackMiddleware\FormatSetter->handle() (Line: 270)
Drupal\shield\ShieldMiddleware->bypass() (Line: 137)
Drupal\shield\ShieldMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 718)
Drupal\Core\DrupalKernel->handle() (Line: 19)I really don't know what going on with this config or?
Hello,
I checked but issue is not reproduce.
I followed the steps as asked by you.
Thanks
- Status changed to Postponed: needs info
over 1 year ago 12:21pm 1 May 2023 - 🇳🇱Netherlands daffie
According to @neelam_wadhwani is the problem not reproduceable.
Hi @smethawee,
did you solve this error? I'm facing the same issue when I clicked on /admin/modules/uninstallDrupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dg8_10.content_moderation_state' doesn't exist: SELECT "base_table"."revision_id" AS "revision_id", "base_table"."id" AS "id" FROM "content_moderation_state" "base_table" GROUP BY "base_table"."revision_id", "base_table"."id" LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Query\Sql\Query->result() (line 271 of core\lib\Drupal\Core\Entity\Query\Sql\Query.php).
Hi @smethawee, did you solve this error? I'm getting the same error when I clicked on /admin/modules/uninstall
- Status changed to Closed: works as designed
5 days ago 10:33am 17 November 2024 - 🇳🇿New Zealand quietone
Over 2 years ago more information was asked for there, which I think meant steps to reproduce. Since that has not been provided I am closing this issue.
If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue → starting from "Install Drupal core".
The Drupal Core issue queue is not the ideal place for support requests. The 'support request' option is there for filing support issues for contributed modules and themes. There are several support options listed on our support page → (Community > Support at the top of Drupal.org) and there is Drupal Slack → . You may get better replies in one of those places.
Thanks