Use case: I am entering in press releases for a client that have been published in the past. I wanted this to be possible and to be able to use the scheduler module as well. And I didn't want to leave the scheduled content empty so there is an accurate record of past events.

It was simple to add this "feature" by just commenting out the past check in the validate function, but it's up to the mod author to make this a feature. I would think it would be a pretty common occurance for people developing websites to have client historical data in their database, but I could be wrong.

Line 595 of scheduler.module

  if (!empty($node->publish_on) && !is_numeric($node->publish_on)) {
    $publishtime = _scheduler_strtotime($node->publish_on);
    if ($publishtime === FALSE) {
      form_set_error('publish_on', t("The 'publish on' value does not match the expected format of %time", array('%time' => format_date(REQUEST_TIME, 'custom', $date_format))));
    }
/*    elseif ($publishtime && $publishtime < REQUEST_TIME) {
      form_set_error('publish_on', t("The 'publish on' date must be in the future"));
    }
 */
  }

Thanks for listening.

Comments

jonathan1055’s picture

Yes I understand the case for wanting dates in the past, but I do not quite see why they have to be scheduled? If you are filling in historical content could it not be published immediately? Or maybe I am missing something.

I would say that if we do allow past dates, then also (1) it should be an option that the admin can allow/disallow, and (2) if allowed then maybe we should warn the user and get them to confirm, because in most cases they would want a future date but have accidentally entered the wrong value.

There are two existing issues which are similar to this #1819074: Allow publish_on dates in the past and #1567136: Change $node->created date with scheduler module to value in the past so any discussion could be in relation to all three points of view.

Jonathan

pfrenssen’s picture

Status: Active » Closed (duplicate)
jonathan1055’s picture