Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
its very difficult for users to understand that the publish_on must be in the future (so todays date doesn't work).
Is there a little workaround to publish the content immediately if the given date is today?
thanks,
kilian
Comments
Comment #1
Eric-Alexander Schaefer CreditAttribution: Eric-Alexander Schaefer commentedWhy schedule at all if it is to be published immediately?
Comment #2
ksiebel CreditAttribution: ksiebel commentedI tested that with users... If they see the field for publish on they insert todays date and get the error.
Its just for user experience ;)
Comment #3
jonathan1055 CreditAttribution: jonathan1055 commentedHi ksiebel,
I do see what you mean. Users can make decisions that developers think are odd, but to the user it seems perfectly ordinary. We should not dismiss this idea, if it makes the user experience better.
Alternatively we could add a message right by the date entry field saying something like 'If you want this content published immediately then do not enter any date here'. The message content may also depend on whether the default status is 'publish' for the content type being created, and/or whether the user has the ability to open the 'publishing' fieldset to change it. There may be situations where the only way a user is allowed to publish content is via scheduler and not immediately.
Jonathan
Comment #4
Eric-Alexander Schaefer CreditAttribution: Eric-Alexander Schaefer commentedLong, long time ago, scheduler would publish nodes right away if the publish_on date/time was in the past. Why did we change that? I can't remember. There must have been a reason. Jonathan, do you recall the reason?
Comment #5
jonathan1055 CreditAttribution: jonathan1055 commentedIt was changed in May 2009 in #429004: Disallow publish_on and unpublish_on dates in the past. Read from #8 to #15.
Comment #6
Eric-Alexander Schaefer CreditAttribution: Eric-Alexander Schaefer commentedLooks like your option b) from #9 would be better then disallowing past dates.
Comment #7
jonathan1055 CreditAttribution: jonathan1055 commentedHello Kilian,
There is an enhancement #1819074: Allow publish_on dates in the past which should solve your problem. That issue has a patch which is ready for review, so if you have the means to test it on a 7.x site that would be good.
Thanks
Jonathan
Comment #8
pfrenssenIndeed we had this same problem on 7.x and #1819074: Allow publish_on dates in the past solves this. I will add a tag to backport that issue to 6.x, and mark this as a duplicate.
Comment #9
jonathan1055 CreditAttribution: jonathan1055 commentedOK thanks.
I was hoping that the original poster Kilian Siebel was going to reply and hopefully test that patch. I contacted them directly but heard nothing (it was over two years, so I suppose they are not using Drupal anymore)
Jonathan
Comment #10
jonathan1055 CreditAttribution: jonathan1055 commentedComment #11
jonathan1055 CreditAttribution: jonathan1055 commented