I have two nodes: one being published now and the other that need to be published later, replacing the first node. And then, later than later, the second node should be unpublished and the first one published, restoring initial statuses (the second node will replace the first during a period of time, then the first node comes live again replacing the second one).

No problem for scheduling the second node as it is unpublished until when required then published then unpublished.
But the first node is published right now and should be unpublished then published again. That triggers an error when saving content: unpublishing date must be later than publishing date.

Please remove that condition, if possible.

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

PhilY’s picture

Issue summary: View changes
pfrenssen’s picture

Version: 7.x-1.2 » 7.x-1.x-dev

That's a very interesting and valid use case. We should investigate why this validation has been put in place. It is possible that it is just intended to help content editors input valid dates for the common use case of publishing and then unpublishing a node. If there are no technical reasons for it then we can certainly make this optional.

jonathan1055’s picture

I think this validation was put in a long time ago, as you say, just to avoid accidental setting of dates the wrong way round, which is helpful in the majority of cases. I see no reason technically why this has to be the case, so we could either (a) add a config option to remove the validation, or (b) add a confimation page requiring the user to click 'yes' to confirm the unpublish date is earlier or 'no' which would return back to the node edit form.

There may be some complications in the 'required' checking, because we have to assume certain chronological paths of publishing and unpublishing, which is affected by the nodes current scheduled status. But we can work that out, I'm sure.

Jonathan

ElRubio’s picture

Ditto - same case scenario at my end. Already published content needs to be offline for a few hours example "some promotion" which exclude previous conditions, but required to come back online "published" a few hours later.

Line in question for scheduler.module is #530.

jonathan1055’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

I think it may be worth looking at this - would the options I suggested in #3 work for you? The change will have to be done at 8.x first, then ported back to 7.x

PhilY’s picture

I've made a patch based on previous comment from ElRubio by removind the date test but as I don't have any live project using Scheduler module for now, can someone test it?
It's based on Sheduler 7.x-1.5 or current 7.x-1.4+14-dev releases.