Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi,
If you want to edit a node, and use publish_on date, fields are empty even if you choosed a date previously.
So I made a patch to fix it
KroKroDile
Comment | File | Size | Author |
---|---|---|---|
scheduler_field_not_empty_on_node_edit_form.patch | 1.04 KB | KroKroDile | |
Comments
Comment #1
KroKroDile CreditAttribution: KroKroDile commentedFYI, an issue is open for Drupal 6 : http://drupal.org/node/1159880
Comment #2
AaronELBorg CreditAttribution: AaronELBorg commentedKroKoDile,
As far as I can tell, the values aren't even getting into the db. Am I crazy?
Comment #3
AaronELBorg CreditAttribution: AaronELBorg commentedActually, it looks to me like the 'time' field is required in order for the publishing info to get inserted. I undid your patch and everything worked.
Comment #4
jonathan1055 CreditAttribution: jonathan1055 commentedHi,
In #1 you referred to #1159880: Scheduler fields are empty on node edit form. I do not understand your original problem but are you saying that 1159880 is the same thing?
Jonathan
Comment #5
KroKroDile CreditAttribution: KroKroDile commentedHi,
The value is range in the table scheduler. The module works like that, but if you edit an existing node, the "publish_on date" is empty even if you define one.
With this patch, the field is filled if a value exists in the database for the node selected.
KroKroDile
Comment #6
jonathan1055 CreditAttribution: jonathan1055 commentedHi,
Is this still a problem? I still do not understand the scenario which you tried to describe above, sorry.
However, I can see in your patch that for nid you want to use
$form['nid']['#value']
instead of$form['#node']->nid
(ie. $node->nid). So are you saying that in your case $form['#node'] is not set but $form['nid']['#value'] is ok?Does this happen when creating a new node or editing an existing one? Are you generating the nodes via some other import method?
Until we understand the problem and can replicate it, we cannot proceed to review the patch, hence changing the status.
Jonathan
Comment #7
jonathan1055 CreditAttribution: jonathan1055 commentedClosing this issue. No response from the original poster for 5 months.
The fields in the scheduler db are displayed in the node edit form. If you still have a problem, please re-open and acurately describe the steps needed to reproduce this error, using a clean drupal7 install with a minimal number of others modules.
Thanks
Jonathan