The attached patch adds add option that allow the site admin to set the "Authored on" timestamp to the time a node is published (instead of the default, which is when the node was first saved).

This patch does not change the default behaviour of Publish content, but ads a checkbox to Publish content settings that allows the site admin change this behaviour.

My use case is a news-website. The journalists publish their own content when it is done. We use Publish content to administer the permission to publish own content, as it provides the exact permissions needed. Using core for Publish/Unpublish requires the permission "Administer content", which is way too broad.

A journalist may start working on a story a long time before it is published, and without setting "Authored on" to the time it is published, the story may look several days old when it appears online. This patch fixes this.

The Scheduler module (which allow authors to schedule publication) already provides this option.

PS: The patch also adds an hook_uninstall to publishcontent.install.

Comments

gisle created an issue. See original summary.

gisle’s picture

Status: Active » Needs review
StatusFileSize
new4.79 KB

Here is the patch. Please review.

astonvictor’s picture

Status: Needs review » Closed (outdated)

D7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.