The state 'archived' does not exist in workflow. whenever we try to unpublish current revision

Created on 13 August 2020, over 4 years ago
Updated 21 September 2023, about 1 year ago

We are facing issue while unpublishing content, because we not having archived stage in content moderation.

whenever we try to unpublish current revision ,we got an error "The state 'archived' does not exist in workflow".

💬 Support request
Status

Fixed

Version

3.0

Component

Code

Created by

🇮🇳India manishvaity

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇵🇰Pakistan Ahmed.Raza

    Module version: 2.0.26

    Getting the exact same error while trying to unpublish a node. Here is the error detail;

    ResponseText: The website encountered an unexpected error. Please try again later.Drupal\Core\Entity\EntityStorageException: The state 'archived' does not exist in workflow. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 815 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). Drupal\content_moderation\Plugin\WorkflowType\ContentModeration->getState('archived') (Line: 114)
    Drupal\content_moderation\EntityOperations->entityPresave(Object) (Line: 104)
    content_moderation_entity_presave(Object)
    call_user_func_array(Object, Array) (Line: 426)
    Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'content_moderation') (Line: 405)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_presave', Object) (Line: 433)
    Drupal\Core\Extension\ModuleHandler->invokeAll('entity_presave', Array) (Line: 251)
    Drupal\Core\Entity\EntityStorageBase->invokeHook('presave', Object) (Line: 903)
    Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 563)
    Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 756)
    Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 517)
    Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804)
    Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 339)
    Drupal\Core\Entity\EntityBase->save() (Line: 61)
    Drupal\moderated_content_bulk_publish\AdminModeration->unpublish() (Line: 59)
    Drupal\moderated_content_bulk_publish\Plugin\Action\UnpublishCurrentRevisionAction->execute(Object) (Line: 22)
    Drupal\Core\Action\ActionBase->executeMultiple(Array) (Line: 473)
    Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessor->process() (Line: 106)
    Drupal\views_bulk_operations\ViewsBulkOperationsBatch::operation(Array, Array) (Line: 295)
    _batch_process() (Line: 137)
    _batch_do() (Line: 93)
    _batch_page(Object) (Line: 55)
    Drupal\system\Controller\BatchController->batchPage(Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
    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: 169)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    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: 53)
    Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Production build 0.71.5 2024