User is not able to Edit scheduled publish record when a node is already published.

Created on 15 April 2025, 6 months ago

When editing an already published content node, if I change its moderation state to "Draft" and then schedule it to be published later using the Scheduled Publish feature, the node correctly appears in the "Scheduled Publish" view. However, when I attempt to further modify this scheduled record, an error message is displayed on the page:
"This status update does not exist."

Steps to Reproduce
1. Open an existing published node for editing.
2. Change the moderation state to Draft.
3. In the Scheduled moderation state change section, choose the target moderation state as Published.
4. Set a future date and time for this scheduled change.
5. Save the changes.
6. Confirm that the node appears under the "Scheduled Publish" tab/view.
7. Attempt to edit/modify the scheduled record again.
8. Observe that the error "This status update does not exist." appears.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇮🇳India sakshi@17

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

Comments & Activities

  • Issue created by @sakshi@17
  • 🇮🇳India sakshi@17

    Added the revised patch to cover the updation and deletion of the scheduled entity.

  • 🇺🇦Ukraine vitaliyb98

    Thanks for reporting this issue!

    I tried to reproduce the problem and investigated why it might occur. It looks like there may be some additional configuration or extra steps involved that are not mentioned in the instructions.

    The main point is that when you change the node status to Draft, from that moment all subsequent changes are applied to the old revision of the node including those in the Scheduled moderation state change section. If you then schedule this draft revision to transition to Published, it will not appear in the Scheduled Publish tab/view, because the scheduled moderation is linked to the draft revision rather than the currently active revision.

    Could you please provide a more detailed, step-by-step instruction on how to reproduce this issue? That would help to better understand the exact conditions under which the error occurs.

  • 🇺🇦Ukraine vitaliyb98

    I also reviewed the patch and noticed a couple of issues:

    1. There is a duplicated line of code.

         $states = $entity->get($field)->getValue();
    +    $states = $entity->get($field)->getValue();
    

    2. There may be a problem with mixing data between the current revision and the latest revision that you are trying to load.

Production build 0.71.5 2024