I have a Date datetime field in various content types, and every few weeks the datetime field deactivates. When I create a new content item I set the date using the date pop-up and the date appears to be entered correctly. But when I save the node there is no date associated with it. When I edit the node the date field is blank. I reset it, save, and again no date.

I have to go to the date field in one of the content types and do a save (don't need to change any settings). Then when I reset the date in the original node it suddenly sticks and everything works fine for awhile. Then 2-3 weeks later we notice the problem again and have to re-save the date field in one of our content types.

This has happened 4-5 times in the past 3 months. Any ideas what's going on?

Comments

ldekay’s picture

Issue tags: +date, +datetime, +Date pop-up

I haven't been able to identify causes or circumstances for this problem. Things go along fine for awhile then suddenly either the Date field disappears or the UI accepts dates but they don't stick when the node is saved.

ldekay’s picture

The date function is disabling itself every day now. Does anyone have responsibility or an interest? I'm getting desperate having to reset the Date field so users can indicate a date for an event.

ldekay’s picture

StatusFileSize
new7.65 KB
new4.97 KB
new12.36 KB
new10.06 KB
new3.2 KB

More details:
I am using the same datetime field in three separate content types (Event, Story, Document) and datetime is set up the same in all except that Event is using a repeat function (could this be the cause of the problem?).

I am first aware that the function is not working properly when either:

- I create a new node and find the Date field doesn't have an entry field... it just says "Date: Order" (image 1 attached),
If I go to the Date field in the respective content type and simply "Save Field Settings" the input fields are now present when I refresh the Create page (image 2 attached). Sometimes, but not always, this leads to the next situation.

-or-

- I create a new node and when saved there isn't a date shown on the node display (image 4 attached). Again I have to "Save Field Settings" on the Date field in the content type. Then when I edit the node the date field is present on the Edit page and the date finally shows up as it should on the node display (image 5 attached).

This is a critical problem that I have no idea how to fix. Do I need to create a new date field type for each content type? If so, that will mean going back to all existing content of each type to reenter the date in the new field... not a pleasant task on an active site.

Any other advice???

ldekay’s picture

OK, no answers so I created new datetime fields for each separate content type and everything seems to be fine. I assume one datetime field can't have different settings if used in more than one content type. Can someone confirm that?

karens’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Fixed

This is a support request, not a bug report. Some field settings are shared between content types. That is true for all CCK fields. When you change some values on one content type, they will change on all content types. You will see that the settings at the bottom of the page say that they will be used on all content types, and some of those settings have warning messages in red text that say that changing those settings can result in a loss of data.

Status: Fixed » Closed (fixed)

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

dmenefee’s picture

Version: 6.x-2.4 » 6.x-2.7
Category: support » bug
Status: Closed (fixed) » Active

We're having this problem too. It's not caused by changes in the global settings for the field; we don't change those in any way when we re-save the content field for the content type. We want to share the field between content types to simplify our calendar views. The symptoms we experience are the same: periodically, and for no apparent reason, the field stops saving the date. No errors are reported anywhere (including the server log); it just disappears.

I'll export the field type in the next comment.

dmenefee’s picture

$content['fields'] = array (
0 =>
array (
'label' => 'Date',
'field_name' => 'field_date',
'type' => 'date',
'widget_type' => 'date_text_repeat',
'change' => 'Change basic information',
'weight' => '23',
'default_value' => 'blank',
'default_value2' => 'same',
'default_value_code' => '',
'default_value_code2' => '',
'input_format' => 'Y/m/d - g:i:sa',
'input_format_custom' => '',
'advanced' =>
array (
'label_position' => 'above',
'text_parts' =>
array (
'year' => 0,
'month' => 0,
'day' => 0,
'hour' => 0,
'minute' => 0,
'second' => 0,
),
),
'increment' => '1',
'year_range' => '-3:+3',
'label_position' => 'above',
'text_parts' =>
array (
),
'description' => '',
'group' => 'group_event_details',
'required' => 0,
'multiple' => 1,
'repeat' => 1,
'todate' => 'optional',
'granularity' =>
array (
'year' => 'year',
'month' => 'month',
'day' => 'day',
'hour' => 'hour',
'minute' => 'minute',
),
'default_format' => 'long',
'tz_handling' => 'site',
'timezone_db' => 'UTC',
'repeat_collapsed' => '0',
'op' => 'Save field settings',
'module' => 'date',
'widget_module' => 'date',
'columns' =>
array (
'value' =>
array (
'type' => 'varchar',
'length' => 20,
'not null' => false,
'sortable' => true,
'views' => true,
),
'value2' =>
array (
'type' => 'varchar',
'length' => 20,
'not null' => false,
'sortable' => true,
'views' => false,
),
'rrule' =>
array (
'type' => 'text',
'not null' => false,
'sortable' => false,
'views' => false,
),
),
'display_settings' =>
array (
'weight' => '16',
'parent' => 'group_event_details',
'label' =>
array (
'format' => 'inline',
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
5 =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
);

nally’s picture

Hi Karen,

I'm working on the same site and issue as dmenefee above.

We tried changing the Widget for this field (from Popup to a custom input format) and that appears to not have solved this for us.

This is going to be a challenging one to solve because it happens every week or so (on average, at random). We don't do anything to the field settings, and it'll work for a time, but then "disappear" as described above.

Do you have any clues for us regarding what kind of hooks we could inject some code in to capture this thing in the wild? If we can find a condition that is symptomatic of the bug, we could try to have the system alert us to its presence as soon as it occurs, all in the name of finding the bug trigger.

:-/

In Allegiance

Christian

jday’s picture

Date 6.x-2.7
Content Construction Kit (CCK) 6.x-2.9

Just recently updated the date module. Our site has been live for over a year with the same 'Event' content type.
Today when people try to add event dates, the date reverts to today's date on save.

No errors given.

Edit: turns out my problem was actually the php on the server http://drupal.org/node/1014818

updated the date module to the latest dev version which has fixed the date display problem.

dmenefee’s picture

We're seeing another problem which may be related to this one now. Every few weeks, the date input field disappears. We've set it to be a text field with custom format in order to bypass the popup problem reported in #8 above, but this new problem is making our client VERY uncomfortable.

Date 6.x-2.7
CCK 6.x-2.8

Export of date field definition in the next comment.

dmenefee’s picture

$content['type'] = array (
'name' => 'News',
'type' => 'news',
'description' => 'Create a story which provides a dated news item.',
'title_label' => 'Title',
'body_label' => 'Body',
'min_word_count' => '0',
'help' => '',
'node_options' =>
array (
'status' => true,
'promote' => true,
'sticky' => false,
'revision' => false,
),
'language_content_type' => '2',
'upload' => '1',
'show_preview_changes' => 1,
'show_diff_inline' => 0,
'enable_revisions_page' => 1,
'old_type' => 'news',
'orig_type' => '',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '0',
'content_profile_use' => 0,
'comment' => '2',
'comment_default_mode' => '4',
'comment_default_order' => '1',
'comment_default_per_page' => '50',
'comment_controls' => '3',
'comment_anonymous' => 0,
'comment_subject_field' => '1',
'comment_preview' => '1',
'comment_form_location' => '0',
'custom_breadcrumbs_show_form_table' => 1,
'print_display' => 1,
'print_display_comment' => 0,
'print_display_urllist' => 1,
'skinr_settings' =>
array (
'comment_group' =>
array (
'fusion_core' =>
array (
'widgets' =>
array (
'grid-width' =>
array (
),
'fusion-content-alignment' => '',
),
'advanced' =>
array (
'_additional' => '',
'_template' => '',
),
),
'garland' =>
array (
'advanced' =>
array (
'_additional' => '',
'_template' => '',
),
),
'ictqatar' =>
array (
'widgets' =>
array (
'grid-width' =>
array (
),
'fusion-content-alignment' => '',
),
'advanced' =>
array (
'_additional' => '',
'_template' => '',
),
),
'mobile_garland' =>
array (
'advanced' =>
array (
'_additional' => '',
'_template' => '',
),
),
),
'node_group' =>
array (
'fusion_core' =>
array (
'widgets' =>
array (
'grid-width' =>
array (
),
'fusion-content-alignment' => '',
'fusion-float-imagefield' => '',
),
'advanced' =>
array (
'_additional' => '',
'_template' => '',
),
),
'garland' =>
array (
'advanced' =>
array (
'_additional' => '',
'_template' => '',
),
),
'ictqatar' =>
array (
'widgets' =>
array (
'grid-width' =>
array (
),
'fusion-content-alignment' => '',
'fusion-float-imagefield' => '',
),
'advanced' =>
array (
'_additional' => '',
'_template' => '',
),
),
'mobile_garland' =>
array (
'advanced' =>
array (
'_additional' => '',
'_template' => '',
),
),
),
),
'i18n_newnode_current' => 0,
'i18n_required_node' => 1,
'i18n_lock_node' => 0,
'i18n_node' => '1',
'i18nsync_nodeapi' =>
array (
'name' => false,
'status' => false,
'promote' => false,
'moderate' => false,
'sticky' => false,
'revision' => false,
'parent' => false,
'taxonomy' => true,
'comment' => false,
'files' => false,
'locations' => false,
'path' => true,
'field_subtitle' => false,
'field_issue' => false,
'field_bio_reference' => true,
'field_date' => true,
'field_picture' => true,
'field_short_description' => false,
'field_pullquote' => false,
'field_pullquote_author' => false,
'field_location' => false,
'field_contact_email' => false,
),
'icl_content_node_type_fields' =>
array (
'title' => true,
'body' => true,
'name' => true,
'date' => true,
'link_title' => true,
'taxonomy[3]' => true,
'field_subtitle' => true,
'field_bio_reference' => true,
'description' => true,
'field_short_description' => true,
'street' => true,
'additional' => true,
'city' => true,
'province' => true,
'postal_code' => true,
'phone' => true,
'field_pullquote' => true,
'field_pullquote_author' => true,
'log' => false,
'id' => false,
'rel' => false,
'class' => false,
'style' => false,
'accesskey' => false,
'taxonomy[10]' => false,
'field_issue' => false,
'alt' => false,
'email' => false,
),
);
$content['fields'] = array (
0 =>
array (
'label' => 'Date',
'field_name' => 'field_date',
'type' => 'date',
'widget_type' => 'date_text',
'change' => 'Change basic information',
'weight' => '-1',
'default_value' => 'blank',
'default_value2' => 'same',
'default_value_code' => '',
'default_value_code2' => '',
'input_format' => 'Y/m/d - g:i:sa',
'input_format_custom' => '',
'advanced' =>
array (
'label_position' => 'above',
'text_parts' =>
array (
'year' => 0,
'month' => 0,
'day' => 0,
'hour' => 0,
'minute' => 0,
'second' => 0,
),
),
'increment' => '1',
'year_range' => '-3:+3',
'label_position' => 'above',
'text_parts' =>
array (
),
'description' => 'Enter the date for this news item.',
'group' => false,
'required' => 0,
'multiple' => '0',
'repeat' => 0,
'todate' => 'optional',
'granularity' =>
array (
'year' => 'year',
'month' => 'month',
'day' => 'day',
'hour' => 'hour',
'minute' => 'minute',
),
'default_format' => 'long',
'tz_handling' => 'site',
'timezone_db' => 'UTC',
'op' => 'Save field settings',
'module' => 'date',
'widget_module' => 'date',
'columns' =>
array (
'value' =>
array (
'type' => 'varchar',
'length' => 20,
'not null' => false,
'sortable' => true,
'views' => true,
),
'value2' =>
array (
'type' => 'varchar',
'length' => 20,
'not null' => false,
'sortable' => true,
'views' => false,
),
),
'display_settings' =>
array (
'weight' => '16',
'parent' => 'group_event_details',
'label' =>
array (
'format' => 'inline',
),
'teaser' =>
array (
'format' => 'default',
'exclude' => 0,
),
'full' =>
array (
'format' => 'default',
'exclude' => 0,
),
5 =>
array (
'format' => 'default',
'exclude' => 0,
),
4 =>
array (
'format' => 'default',
'exclude' => 0,
),
2 =>
array (
'format' => 'default',
'exclude' => 0,
),
3 =>
array (
'format' => 'default',
'exclude' => 0,
),
'token' =>
array (
'format' => 'default',
'exclude' => 0,
),
),
),
);
$content['extra'] = array (
'title' => '-5',
'body_field' => '2',
'revision_information' => '13',
'author' => '12',
'options' => '14',
'comment_settings' => '17',
'language' => '10',
'translation' => '18',
'menu' => '9',
'taxonomy' => '6',
'book' => '11',
'path' => '16',
'attachments' => '15',
'print' => '19',
);

dmenefee’s picture

This appears to be related to the issue at http://drupal.org/node/827388.

I share this date field between two content types. On one type ("event"), I use a text field with repeat options, and on the other ("news"), a text field without repeat. Periodically, the date field disappears in the news node form; when view the field configuration, it shows 'unlimited' values. If I set that to 1, the field shows up again, but then I can't save event content. If I save the event content date field configuration, it starts working, but then news stops displaying the field.

Clearly, I cannot share a date field between two content types when one defines the field with event options and the other does not.

karens’s picture

Status: Active » Fixed

This issue looks like several different problems. When you share CCK fields between content types there are some options which are shared. When you change one, the other will change. This is nothing special to date, this is the way CCK works. You should only share a field when you want it to be configured the same on both content types.

dmenefee’s picture

Hi Karen. I understand that the global options are shared, and I had expected them to be the same. The oddity is that when one of the fields is configured to use repeating dates, the global setting for the number of values is also updated. This seems wrong. We should be able to configure the 'local' settings for a field in CCK for different content types without seeing a side-effect in the global settings. Thanks!

dmenefee’s picture

Status: Fixed » Active

Hmmm. Re-opening, as my problem has not been addressed.

ambereyes’s picture

Never mind ... errant action script being triggered on insert/save.

ambereyes’s picture

Title: Datetime field deactivates every few weeks » Datetime field stops accepting input
Version: 6.x-2.7 » 6.x-2.x-dev

Never mind ... errant action script being triggered on insert/save.

ambereyes’s picture

Title: Datetime field stops accepting input » Datetime field deactivates every few weeks
Version: 6.x-2.x-dev » 6.x-2.7

Setting everything back to what it was ...

dmenefee’s picture

One of the fields had been defined as using the repeating date option, while the other wasn't. While this should ordinarily cause no problems, in this case it did, because the repeating field set the global value count to 'unlimited', which for some reason interfered with the other field so that it could no longer paint its widget in the node form.

Removing the repeating option seems to have resolved that problem, but clearly this is a workaround, and the underlying bug needs to be solved. If I find some time I will try to create a patch.

brisath’s picture

Subscribing. Same problems described in #14 and #1 with 6x-2.x dev

jspayne’s picture

Subscribing - I'm also seeing the same problem: I had a shared date/time field, but one type had the repeat options and the other didn't, and editing one type would result in the field not being saved. Interesting that the type which had the repeating option set was the one that wouldn't save correctly, and when I changed the other type, it started working again.

Alun’s picture

Component: Date CCK Field » Code
Issue summary: View changes

Same problem here, looks like it's related to one date field being shared across multiple data types.
Going to create independent date fields to save myself the headache. Will let you know if it still occurs!

Alun’s picture

StatusFileSize
new102.49 KB

Sorry didn't intentionally change the component thing then!
I've just had a check, and my global option is missing the 'number of values' field in the global settings screen. Could this be a symptom?
ScreenShot

damienmckenna’s picture

Status: Active » Closed (won't fix)

Unfortunately the Drupal 6 version of the Date module is no longer supported. That said, we appreciate that you took time to work on this issue. Should this request still be relevant for Drupal 7 please feel free to reopen it. Thank you.