I'm trying to upgrade a working calendar view from 7.x-1 to 7.x-2 and the calendar view seem broken. I get the following error messages when displaying the view:

'Exception: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'))\' at line 2'
dans views_plugin_query_default->execute() (ligne 1341 dans /var/www/ccqm/sites/all/modules/views/plugins/views_plugin_query_default.inc).

Notice : Undefined index: field_data_field_date_evenement.field_date_evenement_value dans calendar_build_nodes() (ligne 603 dans /var/www/ccqm/sites/all/modules/calendar/calendar.module).

If I try to modify the view, my date field is not available for selection in the contextual filter and I get this error :

Notice : Undefined index: field_data_field_date_evenement.field_date_evenement_value dans date_views_argument_handler->admin_summary() (ligne 114 dans /var/www/ccqm/sites/all/modules/date/date_views/includes/date_views_argument_handler.inc).

I'm using php 5.3.3 and the latest devs of views, calendar, date an chaos tools as of march 22. Site's cache has been cleared and the errors are still there.

Comments

karens’s picture

Status: Active » Postponed (maintainer needs more info)

You will have to edit your view and re-select your date field and then re-save the view. The date fields all show up fine for me so if you aren't seeing them I need more information on what field you are looking for and what fields you see available.

clauded’s picture

By default, the upgraded view display "Date : Date (node)" as the contextual filter (i don't know why it's not the original working value wich was my custom date field). If I try to modify this filter, my date field is not displayed (only the standard date fields like node creation, etc).

If I remove "Date : Date (node)", I can add my custom date field but when I try to save the view I get the following error :

Notice : Undefined property: date_views_argument_handler_simple::$granularity dans calendar_plugin_style->query() (ligne 128 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined property: date_views_argument_handler_simple::$argument dans calendar_plugin_style->query() (ligne 129 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined property: date_views_argument_handler_simple::$min_date dans calendar_plugin_style->query() (ligne 131 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Warning : date_format() expects parameter 1 to be DateTime, null given dans calendar_plugin_style->query() (ligne 131 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined property: date_views_argument_handler_simple::$min_date dans calendar_plugin_style->query() (ligne 132 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Warning : date_format() expects parameter 1 to be DateTime, null given dans calendar_plugin_style->query() (ligne 132 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined property: date_views_argument_handler_simple::$min_date dans calendar_plugin_style->query() (ligne 133 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Warning : date_format() expects parameter 1 to be DateTime, null given dans calendar_plugin_style->query() (ligne 133 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined property: date_views_argument_handler_simple::$min_date dans calendar_plugin_style->query() (ligne 134 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Warning : date_format() expects parameter 1 to be DateTime, null given dans calendar_plugin_style->query() (ligne 134 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined property: date_views_argument_handler_simple::$date_range dans calendar_plugin_style->query() (ligne 135 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined property: date_views_argument_handler_simple::$min_date dans calendar_plugin_style->query() (ligne 136 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined property: date_views_argument_handler_simple::$max_date dans calendar_plugin_style->query() (ligne 137 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined property: date_views_argument_handler_simple::$limit dans calendar_plugin_style->query() (ligne 138 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Warning : date_format() expects parameter 1 to be DateTime, null given dans calendar_plugin_style->query() (ligne 140 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Warning : date_format() expects parameter 1 to be DateTime, null given dans calendar_plugin_style->query() (ligne 141 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined index: dans calendar_plugin_style->query() (ligne 148 dans /var/www/ccqm/sites/all/modules/calendar/includes/calendar_plugin_style.inc).
Notice : Undefined index: date_argument dans template_preprocess_calendar_main() (ligne 52 dans /var/www/ccqm/sites/all/modules/calendar/theme/theme.inc).
Notice : Trying to get property of non-object dans template_preprocess_calendar_main() (ligne 52 dans /var/www/ccqm/sites/all/modules/calendar/theme/theme.inc).

The custom date field is defined as a date field (not datetime).

karens’s picture

Status: Postponed (maintainer needs more info) » Fixed

The original issue is that you could not see your date field as an option. You are now seeing it. That issue is fixed. Now you're reporting problems using the calendar. That's a different issue. The calendar module has not caught up to all the latest date changes, so there are still some bugs there. You may also need to clear your caches.

This issue, the original issue, is fixed.

clauded’s picture

Status: Fixed » Postponed (maintainer needs more info)

Just to add to the comment above. I forgot to add a default value to the argument. When I do that, I now have this :

Notice : Undefined index: group dans date_views_argument_handler_simple->date_forbid() (ligne 232 dans /var/www/ccqm/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice : Undefined index: group dans date_views_argument_handler_simple->query() (ligne 199 dans /var/www/ccqm/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice : Undefined index: date_argument dans template_preprocess_calendar_main() (ligne 46 dans /var/www/ccqm/sites/all/modules/calendar/theme/theme.inc).
Notice : Trying to get property of non-object dans template_preprocess_calendar_main() (ligne 46 dans /var/www/ccqm/sites/all/modules/calendar/theme/theme.inc).
Notice : Undefined index: date_argument dans template_preprocess_calendar_main() (ligne 49 dans /var/www/ccqm/sites/all/modules/calendar/theme/theme.inc).
Notice : Trying to get property of non-object dans template_preprocess_calendar_main() (ligne 49 dans /var/www/ccqm/sites/all/modules/calendar/theme/theme.inc).
Notice : Undefined index: date_argument dans template_preprocess_calendar_main() (ligne 52 dans /var/www/ccqm/sites/all/modules/calendar/theme/theme.inc).
Notice : Trying to get property of non-object dans template_preprocess_calendar_main() (ligne 52 dans /var/www/ccqm/sites/all/modules/calendar/theme/theme.inc).
The calendar_nav style requires a Date argument.

Since the field is of date type (not datetime), could this be the cause of the problem?

karens’s picture

Status: Postponed (maintainer needs more info) » Fixed

You are taking this issue farther and farther away from the original issue. This issue is fixed. Please don't keep trying to dump other questions in here. You are seeing the date fields in the argument. That was the original issue.

clauded’s picture

Well this issue is not fixed for me as I cannot specify my custom date field in "Date : Date (node)" (sorry for the confusion).

I just discovered that it's related to the use of another language (see this thread : http://drupal.org/node/1094408#comment-4249346) and using only english solves the issue.

Now I don't know if it's a date, calendar or views issue. I'm sure you can shed some light on this.

clauded’s picture

Status: Fixed » Active

I'm reopening the issue as I still have the problem.

@KarenS : can you please provide info about wich module is responsible for selecting a date field so i can open an issue for the right module. Thanks.

clauded’s picture

Status: Active » Patch (to be ported)
arlinsandbulte’s picture

Status: Patch (to be ported) » Closed (duplicate)
arlinsandbulte’s picture

#1094408: Date field not showing up in views arguments in localized site might have affected or fixed this issue.
Please verify this issue exists with the March 28 -dev