Scheduler CRON gets failed when node status is already in unpublished or draft state

Created on 15 January 2024, 12 months ago
Updated 11 September 2024, 4 months ago

Problem/Motivation

Getting message of successfully cron run but getting logs of failure of node changed. This issue we are getting for nodes which are manually changed to draft or unpublished state and even unpublished scheduler date is also set.

Steps to reproduce

  1. For any of node set scheduler unpublish date to some random date and time
  2. Then manually set that node to unpublished or draft moderation state before that date.
  3. When scheduler cron run it checks for published state instead of published state it get unpublished or draft state it returns failure code.

Proposed resolution

In this function "scheduler_content_moderation_integration_scheduler_unpublish_process", we have to check for if entity not published state it will return.

Remaining tasks

// Check for moderation value not equal to publish it will return.
if ($entity->moderation_state->value !== 'published') {
return;
}

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

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

Comments & Activities

Production build 0.71.5 2024