Allow manual publish before future publish date

Created on 22 February 2024, 9 months ago

Problem/Motivation

When a future publish date is set, manual publishing is impossible. The entity will stay unpublished as long as a future publish_on date is set. To me this is counterintuitive.
Perhaps, if this current behaviour keeps being preferred, the instant publishing could become a configurable option?

Steps to reproduce

Create unpublished content and set a future publish date
Edit the page again, set the content published and save content
The content is still unpublished.

(Note that in my case I use moderation states, which makes it more messy because the state is successfully set to Published, but the node keeps the status "0")

Proposed resolution

When manually set to published, allow scheduled content to be published instantly regardless of the publish_on date. Also remove the publish date while manually publishing.

✨ Feature request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium fernly

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

Merge Requests

Comments & Activities

  • Issue created by @fernly
  • πŸ‡§πŸ‡ͺBelgium fernly
  • πŸ‡§πŸ‡ͺBelgium fernly
  • πŸ‡§πŸ‡ͺBelgium fernly
  • πŸ‡ΊπŸ‡ΈUnited States sassafrass

    I am encountering a related issue. Given the following scenario: A user creates a piece of content that gets reviewed and placed in an Approved State immediately prior to being Published. Content must be an Approved State in order to be Scheduled for Publishing. On the Node Edit page, if the user tries to directly publish while there is still a Scheduled Date/Time, an error is displayed as expected: "The scheduled publishing state of published is not a valid transition from the current moderation state of published for this content." However, if I go to the Latest Revision page, I am allowed to set the node to a Published state without an error, the node remains unpublished, and previous versions become inaccessible.

    Suggested behaviors: Either allow instant Publishing in both use cases (preferred), or prevent saving and display an error in both cases indicating that the Schedule Date needs to be removed to Publish instantly.

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

    I created a patch off of the 2.x branch that allows direct publishing that I am successfully using on my local. I've added an option to the entity form to "Allow direct publishing". If it is checked and the user Publishes content that has been scheduled for a date in the future, the content is directly published. If this is something that the module owners want to include, I'm happy to continue working on this as they see fit.

  • First commit to issue fork.
  • πŸ‡¨πŸ‡¦Canada klimp MontrΓ©al, QC

    klimp β†’ changed the visibility of the branch 3423200-allow-manual-publish to hidden.

  • πŸ‡¨πŸ‡¦Canada klimp MontrΓ©al, QC

    klimp β†’ changed the visibility of the branch 3423200-allow-manual-publish to active.

  • πŸ‡¨πŸ‡¦Canada klimp MontrΓ©al, QC

    Created the issue fork.

    However, I ended up not using this patch. Updating scheduler_content_moderation_integration to the latest 2.x fixed the issue for me. See https://www.drupal.org/project/scheduler_content_moderation_integration/... β†’

    There is a difference in the behaviour though:
    - patch #6 ✨ Allow manual publish before future publish date Active removes the scheduled Publishing
    - the solution from scheduler_content_moderation_integration leaves the Scheduled Publishing settings intact while preventing a node from being unpublished

  • Pipeline finished with Failed
    22 days ago
    Total: 616s
    #326874
  • First commit to issue fork.
  • πŸ‡¬πŸ‡§United Kingdom jonathan1055

    Hi @sassafrass, This does sound like a reasonable Use Case, so thank you for the patch.

    @klimp - I know you said you do not use this behavior, but can you confirm that the MR you created was directlt from the patch in #6? If so then @sassafrass can continue and use that MR, because patch testing is no longer done. I have just updated the fork branch because it was 21 commits behind 2.x

  • πŸ‡¨πŸ‡¦Canada klimp MontrΓ©al, QC

    @klimp - I know you said you do not use this behavior, but can you confirm that the MR you created was directlt from the patch in #6?

    @jonathan1055 confirming. Yes that was the case. My original commit is identical to the patch in #6 β†’

Production build 0.71.5 2024