When I detach a node (edit) then as value the today's date is used (the default setting of the field). Not the date of the instance, although this is submitted correctly in the node object value.

During the form processing, the date value from the node value will be overridden with the default value from the field.

I use Drupal 7.10 with Date 7.x-2.2.

The problem is probably that the date_field_widget_form function from the date module by default regards the cloned node (nid = NULL) as new. So that the field value will be ignored.

Comments

cbeier’s picture

Ad hoc bugfix

lesioc’s picture

Having the same issue, I tried to apply the patch.

It make it all worse for me :(

I tried to edit an instance of a repeating node, and the date was OK in the form, but when submitting the new node, it just displayed an error (no such node found).

After that, the original repeating node is no longer viewable : it appears (incorrectly) in some views, some other views are just totally messed up :

    Notice : Undefined index: 162 in views_plugin_row_node_view->render() (line 101 in drupal-7.12/sites/all/modules/views/modules/node/views_plugin_row_node_view.inc).
    Notice : Undefined property: stdClass::$type in _node_extract_type() (line 370 in drupal-7.12/modules/node/node.module).
    Notice : Undefined property: stdClass::$nid in node_build_content() (line 1359 in drupal-7.12/modules/node/node.module).
    EntityMalformedException : Missing bundle property on entity of type node. in entity_extract_ids() (line 7501 in drupal-7.12/includes/common.inc).

And the new node is not created...

Fortunately, I made a backup just before all this, so nothing is lost... I will simply restore my site...

Did I missed something, or have I applied the patch in a wrong manner ?

Any help appreciated !
Thanks !

guillaumev’s picture

Status: Active » Needs review
StatusFileSize
new698 bytes

For me, the date value is lost only when editing the first instance of the repeating dates. Here is a patch that fixes it.

cwworks’s picture

Issue summary: View changes

Thanks so much! The patch in #3 worked for me.

carsonw’s picture

Status: Needs review » Reviewed & tested by the community

  • joelstein committed 42cc973 on 7.x-1.x
    Issue #1504172 by guillaumev: Fixed bug which caused empty date when...
joelstein’s picture

Status: Reviewed & tested by the community » Fixed

Fixed! Thanks for the patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.