After upgrading to 6.6, the date field disappears from the content type. It (and the data) are still in the database. I have disabled and enabled date, cck, calendar, etc., multiple times as well as run update.php. No contributing modules have been changed since 6.5.
I appreciate your help, since the events calendar is an integral part of my site!!
Using PHP 5.2.5
Export of Calendar view using date field:
$view = new view;
$view->name = 'events_calendar';
$view->description = 'A multi-dimensional calendar view with back/next navigation.';
$view->tag = 'Calendar';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'body' => array(
'label' => 'Body',
'exclude' => 1,
'id' => 'body',
'table' => 'node_revisions',
'field' => 'body',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'field_when_value' => array(
'order' => 'ASC',
'id' => 'field_when_value',
'table' => 'node_data_field_when',
'field' => 'field_when_value',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('arguments', array(
'date_argument' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'default_argument_type' => 'date',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'date_fields' => array(
'node_data_field_when.field_when_value' => 'node_data_field_when.field_when_value',
),
'date_method' => 'OR',
'granularity' => 'month',
'id' => 'date_argument',
'table' => 'node',
'field' => 'date_argument',
'relationship' => 'none',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'webform' => 0,
'blog' => 0,
'poll' => 0,
'audio' => 0,
'image' => 0,
'simplenews' => 0,
'wishlist' => 0,
'forum' => 0,
'basic' => 0,
'basic_restbar' => 0,
'book' => 0,
'day_trip' => 0,
'enh_bus' => 0,
'enh_restbar' => 0,
'event_listing' => 0,
'group' => 0,
'group_blog' => 0,
'lt_blog' => 0,
'neighborhood' => 0,
'page' => 0,
'profile' => 0,
'sales' => 0,
'specials' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'1' => 0,
'2' => 0,
'4' => 0,
'11' => 0,
'5' => 0,
'15' => 0,
'6' => 0,
'9' => 0,
'7' => 0,
'10' => 0,
'16' => 0,
'17' => 0,
'18' => 0,
'13' => 0,
'14' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
'default_options_div_prefix' => '',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'event_listing' => 'event_listing',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'tid' => array(
'operator' => 'or',
'value' => array(
'58' => '58',
'41' => '41',
'68' => '68',
'42' => '42',
'43' => '43',
'44' => '44',
'45' => '45',
'451' => '451',
'71' => '71',
'48' => '48',
'66' => '66',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => '',
'identifier' => 'tid',
'label' => 'Neighborhood',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 1,
),
'type' => 'select',
'vid' => '2',
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 1,
'relationship' => 'none',
'reduce_duplicates' => 0,
'override' => array(
'button' => 'Override',
),
),
'tid_1' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'tid_1_op',
'identifier' => 'tid_1',
'label' => 'Type of Event',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
),
'type' => 'select',
'vid' => '11',
'id' => 'tid_1',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 1,
'relationship' => 'none',
'reduce_duplicates' => 0,
),
));
$handler->override_option('access', array(
'type' => 'none',
'role' => array(),
'perm' => '',
));
$handler->override_option('title', 'Chicago Events');
$handler->override_option('header_format', '8');
$handler->override_option('header_empty', 0);
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'calendar_nav');
$handler = $view->new_display('calendar', 'Calendar page', 'calendar_1');
$handler->override_option('header', 'Find events in downtown Chicago. Browse through all the listings, or select by neighborhood, or type of event, or both.
Have an event you\'d like to promote? Register and apply for your free Event Listing account.');
$handler->override_option('header_empty', 1);
$handler->override_option('path', 'events-calendar');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'Events',
'weight' => '0',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));
$handler = $view->new_display('calendar_period', 'Year view', 'calendar_period_2');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'display_type' => 'year',
'name_size' => '1',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', FALSE);
$handler->override_option('displays', array(
'calendar_1' => 'calendar_1',
'default' => 0,
'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'year');
$handler = $view->new_display('calendar_period', 'Month view', 'calendar_period_1');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'display_type' => 'month',
'name_size' => '99',
'with_weekno' => '0',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', 1);
$handler->override_option('displays', array(
'calendar_1' => 'calendar_1',
'default' => 0,
'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'month');
$handler = $view->new_display('calendar_period', 'Day view', 'calendar_period_3');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'display_type' => 'day',
'name_size' => '99',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', 1);
$handler->override_option('displays', array(
'calendar_1' => 'calendar_1',
'default' => 0,
'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'day');
$handler = $view->new_display('calendar_period', 'Week view', 'calendar_period_4');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'display_type' => 'week',
'name_size' => '99',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', 1);
$handler->override_option('displays', array(
'calendar_1' => 'calendar_1',
'default' => 0,
'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'week');
$handler = $view->new_display('calendar_block', 'Calendar block', 'calendar_block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('calendar_period', 'Block view', 'calendar_period_5');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'display_type' => 'month',
'name_size' => '1',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', FALSE);
$handler->override_option('displays', array(
'calendar_1' => 0,
'default' => 0,
'calendar_block_1' => 'calendar_block_1',
));
$handler->override_option('calendar_type', 'month');
$handler = $view->new_display('ical', 'iCal feed', 'ical_1');
$handler = $view->new_display('block', 'Today', 'block_1');
$handler->override_option('arguments', array(
'date_argument' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'default_argument_type' => 'date',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'date_fields' => array(
'node_data_field_when.field_when_value' => 'node_data_field_when.field_when_value',
),
'date_method' => 'OR',
'granularity' => 'day',
'id' => 'date_argument',
'table' => 'node',
'field' => 'date_argument',
'relationship' => 'none',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'blog' => 0,
'poll' => 0,
'audio' => 0,
'image' => 0,
'forum' => 0,
'basic' => 0,
'basic_restbar' => 0,
'book' => 0,
'day_trip' => 0,
'enh_bus' => 0,
'enh_restbar' => 0,
'event_listing' => 0,
'page' => 0,
'profile' => 0,
'sales' => 0,
'specials' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'1' => 0,
'2' => 0,
'4' => 0,
'11' => 0,
'5' => 0,
'15' => 0,
'6' => 0,
'9' => 0,
'7' => 0,
'10' => 0,
'13' => 0,
'14' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
'default_options_div_prefix' => '',
'override' => array(
'button' => 'Use default',
),
),
));
$handler->override_option('title', 'Today\'s Events');
$handler->override_option('items_per_page', 5);
$handler->override_option('use_more', 1);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
'grouping' => '',
'type' => 'ul',
));
$handler->override_option('block_description', 'Today');
$handler->override_option('block_caching', -1);
Comments
Comment #1
karens commented'The date field disappears' could mean nearly anything. Can you see the date when you view the nodes? Can you see the date when you edit the nodes? Can you see the date field on the manage fields screen? Can you see it in the calendar? You included an export of the calendar but nothing else, so it looks like the calendar is the only place you don't see it?
Go to the date settings screen and edit the date. Look over the settings and make sure everything still looks right and save it (even if you don't make any changes).
Then go to any views where it isn't showing up. Edit the view and see if all the settings still look right. Save it (even if you don't make any changes).
Then try again.
If you still have trouble after that, report back.
Comment #2
thelocaltourist commentedI meant exactly what I said: "the date field disappears from the content type."
Disappeared as in not there. No date field when viewing the nodes. No date field when editing the nodes. No date field when managing the fields. No date field when displaying the fields. No date field in the list of fields. No date field in views.
The date field disappeared from the content type.
I read the instructions and included what I could: the calendar export and the version of PHP. Other than that, since it disappeared, there was nothing to show.
Comment #3
cgjohnson commentedI've got a similar issue, but have not upgraded yet. I have a CCK date field that disappeared from the content entry form, though it still exists in the database (I can see the table and info) -- and weirder still, I can see it in my CCK content type under "Display Fields" and can change display options but it is not under "manage fields" tab, and thus not working for new nodes, or Views filters.
What happened and how can I get that data field back, with the data? thanks.
Comment #4
karens commented#2 - if you had reported all that information the first time I wouldn't have had to ask. It is not at all obvious to me what the original report meant. And there is no reason to chew me out for not being able to read your mind and asking for more clarification.
I can't replicate the problem, but there have been a few odd reports of various CCK fields disappearing from the Manage fields screen from time to time, so start by making sure you have the very latest code for both Date and Calendar. Both of them have a number of updates since the last releases, and I'm just getting ready to issue a new release for Date and Calendar.
In addition to that, try manually going to the field edit page to edit the field and save it (even if you make no changes). That has sometimes fixed some of these odd bugs. The path for the field would be something like:
If that doesn't work, report back and we'll try something else.
Comment #5
karens commentedI meant to say 'Date and CCK' rather than 'Date and Calendar'.
Comment #6
cgjohnson commentedkaren, thanks. For me, it appears to actually have been a conflict with the deprecated jscalendar, which I've now disabled and removed - I updated the Date module, as well.
Never seen a field disappear from Manage but not Display. Just glad it's fixed!!
Comment #7
thelocaltourist commentedWhen I visit the specific field page I get the following two messages:
1.This content type has inactive fields. Inactive fields are not included in lists of available fields until their modules are enabled.
2. When (field_when) is an inactive Date field that uses a Text Field with Date Pop-up and Repeat options widget.
I've uploaded both the new Date (6.x-2.x-dev) & CCK (6.x-2.x-dev), disabled and enabled the modules and run update.php.
I was not trying to chew you out. I was clarifying and my tone was probably a bit defensive in response to yours. I do appreciate your quick response and your help, and I'm sorry if I was harsh.
Comment #8
karens commentedSo #6 is fixed, good :)
For #7, it looks like the field got marked as inactive somehow. There are lots of quirky upgrade paths that sometimes do that. You should be able to to fix that by first disabling, and then re-enabling the Date module. It's the act of re-enabling it that should force it back to 'active'.
Comment #9
thelocaltourist commentedSuccess!
I had disabled & enabled Date/Calendar/CCK many many times, but I enabled them "in order" - if an aspect of the module was dependent on another, then I enabled the required one first, then the dependent. When I just enabled everything at the same time it worked. I guess this was an instance where I was trying to be too careful.
Thanks again. And sorry again for being snarky. I'd been having problems with my web host ALL day yesterday and took it out on you (know any good ones?).
Comment #10
karens commentedOK, good! One less problem for you then :)
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #12
DanilaD commentedDisabling-enabling Date helped me in similar situation. Thanks a lot!
Comment #13
dhigby commentedI appreciate the suggestions here but nothing is working to solve it for me:
Drupal 6.13 , latest dev versions of date and calendar
I can add the datetime field or date field to any content type and configure it. I then go to create any content and the date field is totally missing from the form. I tried changing to various input methods with no success. I tried adding two or three date fields to a form and none of them show.
I disabled, uninstalled, and deleted the directories completely for date and for calendar. Then I downloaded and reinstalled the new packages.
And, just as I was racking my brains some more...
I went into permissions and saw that view date field was turned off for admin. So thanks for the advice, it is FIXED. I'm sure that disabling and reenabling the module fixed it, but then I forgot to go correct the permissions.