When you try to set the date manually from the "Scheduling options" tab/fieldset in the node edit form, the date value does not save and remains empty if you go to edit the date again.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mamanerd’s picture

Status: Active » Needs review
FileSize
834 bytes

Okay, I think I fixed it.

jonathan1055’s picture

Hi mamanerd,

Thanks for you post. But this seems such a fundamental problem that I can't quite understand it. Could you explain the fault in more detail please, and list the reproduction steps.

Jonathan

mamanerd’s picture

Steps to reproduce:
1) Enable the Scheduler module
2) Configure Scheduler (admin/config/content/scheduler). For Field Type, select "Standard text field". For Date Only, select "Allow users to enter only a date and provide a default time" and keep the default time at 00:00:00
3) Edit content type settings (admin/structure/types/manage/CONTENTTYPE)
4) Go to "Scheduler" tab. Under "Unpublishing", select "Enable scheduled unpublishing for this content type." Leave display as "Vertical tab".
5) Add new node of above content type (node/add/CONTENTTYPE)
6) Go to "Scheduling Options" tab. Enter a date manually (ex: 2014-03-22)
7) Save node

The date was not saving for me when I did it this way. But if I added the date to the node programmatically, it worked fine, so I figured there was something weird happening with the form.

FYI I'm currently using Drupal 7.26 and Date 7.x-2.7 if it matters.

jonathan1055’s picture

Thanks for the repro steps. I've followed them and nothing goes wrong for me - the date is saved when you go back to edit the node. That's what I expected, because something as major as this could not have gone unnoticed up to now. So there must be something in your environment which is causing the problem, some interaction with another module, or some different or alternative method of processing the form. Or some default we are relying on in Scheduler which is not the same in your set-up.

I noticed that you only enabled unpublishing. That's fine, but I just wanted to check. Also, you have the default time as 00:00:00 but your example time would have created a datestamp in the past and should have prompted a validation error. Did you see the error? or maybe your example was simply an example and you actually entered a future day. Just thought that would be worth checking too, as you mention doing things programatically.

Do you know exactly where in the Core form code that $form['some_fieldset']['myvar'] data gets transferred into the $node->myvar property? It would seem that this is not happening correctly for you.

Jonathan

jonathan1055’s picture

Status: Needs review » Postponed (maintainer needs more info)

Changing the status, as the patch provided is not going to be implemented until we can reproduce the error and understand what (if anything) is wrong with the Scheduler code. Awaiting answers to #4.

jonathan1055’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Closing this as no response for six weeks. Assuming it was caused by another module, not scheduler. Please re-open if you can reproduce this on a clean drupal install with no other modules enabled.

Jonathan