I'm using Drupal 4.7 beta1 and the CVS version of event from 2005-12-14, and when I create or edit content with an event the start and end times do not save. The database fields event_start and event_end both contain "0" and the date displayed on the site is "1970-01-01 00:00".

I did a little digging and found that $node->event_start and $node->event_end are not populated in the 'insert' case of event_nodeapi() near line 1814 of event.module. If I revalidate the fields by changing the 'insert' case to this:


      case 'insert':
        event_validate_form_date($node, 'start');
        event_validate_form_date($node, 'end');
        db_query('INSERT INTO {event} (nid, event_start, event_end, timezone) VALUES (%d, %d, %d, %d)', $node->nid, $node->event_start, $node->event_end, $node->timezone);
        event_set_range();
        break;

It works. However, I'm not sure that's the best solution.

Please let me know if more info is needed. Thanks.

Comments

Waldemar’s picture

See #15 in http://drupal.org/node/40107. If you update to the latest CVS you should not experience the bug anymore.

maartenvg’s picture

Status: Active » Closed (fixed)