Summary:

Using content_moderation block on node view page throws error when node has never been published.
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Core\Entity\EntityStorageException</em>: The state &#039;&#039; does not exist in workflow.&#039; in <em class="placeholder">Drupal\Core\Entity\Sql\SqlContentEntityStorage-&gt;save()</em> (line <em class="placeholder">805</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php</em>).

Replicate:

Using Lightning 3.0.1 (no error on Clean D8.4 install w/o Lightning)

  1. Install Lightning
  2. Create Basic page, save as DRAFT
  3. In 'view' mode, select 'In Review': Throws error and does not change state.
    The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Core\Entity\EntityStorageException</em>: The state &#039;&#039; does not exist in workflow.&#039; in <em class="placeholder">Drupal\Core\Entity\Sql\SqlContentEntityStorage-&gt;save()</em> (line <em class="placeholder">805</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php</em>)
  4. In 'view' mode, select 'Published': Throws error,
    Notice: Undefined property: Drupal\node\Entity\Node::$moderation_state in Drupal\content_moderation\ModerationInformation->isDefaultRevisionPublished() (line 183 of core/modules/content_moderation/src/ModerationInformation.php).
  5. Once page has been published, content works just fine.

Fix?

Comments

mariagwyn created an issue. See original summary.

Sam152’s picture

phenaproxima’s picture

Project: Lightning » Lightning Workflow
Version: 8.x-3.001 » 8.x-2.x-dev
Component: Workflow » Code
Sam152’s picture

This should be fixed now. Anyone able to test?

phenaproxima’s picture

Status: Active » Closed (cannot reproduce)

"Should be fixed" now, followed by 3+ years of inactivity in this issue, suggests that it's either fixed or superseded by this point. :) I think it's time to close this one out.