Set published date to 0 when node is unpublished

Created on 22 November 2023, 12 months ago
Updated 7 February 2024, 10 months ago

When a node is unpublished, the publication date could be reset to 0 to follow the life cycle of the content.

I made a patch to add that possibility.

Feature request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇫🇷France Quentin Harelle

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

Merge Requests

Comments & Activities

  • Issue created by @Quentin Harelle
  • Status changed to Closed: works as designed 12 months ago
  • 🇨🇦Canada spotzero

    The goal of this module is to track three things:

    1. The date and time that a node was first published
    2. The date and time that the node was last published
    3. The number of times that node was published

    This patch removes support for the first item.

    If someone needs to check whether a node is published or not, the published flag is already there. Setting the initial published time to zero doesn't add tracking for any new information about the node.

    This patch also will produce broken results when used with content moderation and workflow. If you create a new draft, the intial published date will be zeroed out, so that when you publish your next draft, the revision will set the original publish date to the date it was corrected, and not published.

  • 🇫🇷France Quentin Harelle

    Ok I understand, I had a use case for this: I reuse a specific node and need to have it's publication date updated, so the reset to 0 is necessary.

    What would you advise for this use case ?

  • 🇨🇦Canada spotzero

    Being able to toggle the published flag and reset date kind of makes the automation arbitrary. One of the "features" this module brings is that content authors can't mess with the published/corrected dates. They are enforced automatically.

    However, if your going to give them some control of date, it's better just give them full control of the date. It sounds like you're probably better off just adding a date field and letting your authors set it to the date they want. That's trivial to setup and gives the authors the controls they need.

Production build 0.71.5 2024