Problem

When creating a new moderated content (node) with scheduler enabled for that content content type, when I try to add multiple medias it breaks the ajax request and when I checked the logs I got the following error:
InvalidArgumentException: The state '' does not exist in workflow

Proposed resolution

The issue seems to be in function _scheduler_content_moderation_integration_states_values when trying to grab the current state. In some situations the moderation state is null, and therefore we should use the default one.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bprogrammer created an issue. See original summary.

bernardopaulino’s picture

Here is the first patch.

bernardopaulino’s picture

Status: Active » Needs review
ras-ben’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

I'm experiencing the same issue.

The Patch works great - thank you.

I would say this is a pretty critical issue, so I'll also bump the priority.

smustgrave made their first commit to this issue’s fork.

  • smustgrave committed edaa7f9 on 8.x-1.x
    Issue #3285808: Scheduler breaks ajax requests when content moderation...

  • smustgrave committed 13c7395 on 2.x
    Issue #3285808: Scheduler breaks ajax requests when content moderation...
smustgrave’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for this!

Merged and backported to 2.x

Status: Fixed » Closed (fixed)

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