Problem/Motivation

When using a workflow where a draft needs to be created to update old content, that draft could inherit a date from the past.

Proposed resolution

Allow dates in the past.

Remaining tasks

(reviews needed, tests to be written or run, documentation to be written, etc.)

User interface changes

(New or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text.)

API changes

(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)

Data model changes

(Database or configuration data changes that would make stored data on an existing site incompatible with the site's updated codebase, including changes to hook_schema(), configuration schema or keys, or the expected format of stored data, etc.)

CommentFileSizeAuthor
#2 3122973-2-no-validation.patch1.14 KBYesCT
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT created an issue. See original summary.

YesCT’s picture

This is a workaround, and not a solution.

There are a bunch of other similar issues that have been closed works as designed. So marking this the same...
but I wonder if it could be configurable to have this validation or not.

YesCT’s picture

jonathan1055’s picture

Title: Allow dates in the past » Allow unpublish_on dates in the past
Status: Closed (works as designed) » Active
Related issues: +#1819074: Allow publish_on dates in the past

Hi YesCT,
The comment I wrote in SchedulerUnpublishOnConstraintValidator explains what we thought at the time:

// Check that the unpublish-on date is in the future. Unlike the publish-on
// field, there is no option to use a past date, as this is not relevant for
// unpublshing. The date must ALWAYS be in the future if it is entered.

However, if you can expand and explain your reasoning, and give a good use-case, then this could become a configurable option.