InvalidArgumentException: The state '' does not exist in workflow

Created on 19 August 2022, almost 2 years ago
Updated 22 November 2023, 6 months ago

In a content-moderated node, there is a multi-valued file field. Whatever state the node is in, whenever editing it, I can upload a file for the first time, but always fail afterwards. And there is a log message:
InvalidArgumentException: The state '' does not exist in workflow. in Drupal\workflows\Plugin\WorkflowTypeBase->getState() (line 155 of /var/www/myproject/web/core/modules/workflows/src/Plugin/WorkflowTypeBase.php).

Edit: not only multi-valued file field, but also the single-valued image field.

πŸ› Bug report
Status

Closed: outdated

Version

9.5

Component
WorkflowsΒ  β†’

Last updated about 2 months ago

  • Maintained by
  • πŸ‡¦πŸ‡ΊAustralia @Sam152
Created by

πŸ‡¨πŸ‡³China fishfree

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.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Since this has been in PNMI for 11 months going to close out for now.

    If still a valid bug though please reopen updating the issue summary with steps to trigger this error.

    Tried enabling the workflow module but I don't see any issue for what it's worth.

    Thanks all!

  • πŸ‡΅πŸ‡°Pakistan isalmanhaider

    Getting the same error

    InvalidArgumentException: The state '' does not exist in workflow. in Drupal\workflows\Plugin\WorkflowTypeBase->getState() (line 155 of core/modules/workflows/src/Plugin/WorkflowTypeBase.php).

    Steps to reproduce:

    under "this workflow applies to" select article, basic page or any content type at /admin/config/workflow/workflows/manage/editorial
    then visit node/add/article or node/add/pager you will get WSOD with the following error

    Drupal 10.1.4
    PHP 8.2.6
    content_moderation: 10.1.4
    workbench_moderation: 8.x-1.7

  • πŸ‡¨πŸ‡³China fishfree

    It seemd the error occured when an AJAX operation occured.

  • πŸ‡ΊπŸ‡ΈUnited States mmenavas

    I got the same error message when I was trying to preview a new node that had content moderation enabled. The source of the issue was a bug πŸ› Had an issue with preview button Needs work in the workflow_buttons β†’ module.

  • πŸ‡ΊπŸ‡ΈUnited States mmenavas
Production build 0.69.0 2024