I am using D7+views+date+calendar modules (all latest 7.x-2.x-dev versions as of March 24).

I am getting the following error messages when enabling the upcoming block or calendar.

Notice: Undefined index: group in _date_views_fields() (line 61 of /opt/lampp/htdocs/d7/modules/date/date_views/includes/date_views_fields.inc).
Strict warning: Declaration of views_handler_filter_user_name::value_submit() should be compatible with that of views_handler_filter_in_operator::value_submit() in _registry_check_code() (line 2789 of /opt/lampp/htdocs/d7/includes/bootstrap.inc).
Strict warning: Declaration of views_handler_filter_term_node_tid_depth::operator_options() should be compatible with that of views_handler_filter_in_operator::operator_options() in _registry_check_code() (line 2789 of /opt/lampp/htdocs/d7/includes/bootstrap.inc).

Comments

geevee’s picture

Forgot to mention: I added a content type with a Datetime fields. Added this field to the calendar , upcoming block, and also set the argument to it.

bjlewis2’s picture

I am also getting this error. I just did a fresh install this morning with:
Views 7.x-3.x-dev
CTools 7.x-1.x-dev
Date 7.x-2.x-dev
Calendar 7.x-2.x-dev

Enabled these modules:
Chaos tools
Calendar
Date
Date API
Date Popup
Date Views
Views
Views UI

Created a content type and changed the following settings:
Event
Add Field: Date/date/Datetime/Popup
(Save)
To Date: Optional
(Save field settings)
Event Settings: Required/Help Text: Enter the date and time of your event./Default: blank/Input format
(Save settings)

Created an event:
Title: My birthday party!
Body: Come eat cake, sing, dance and do other crazy stuff!
Date: 07/11/2011 5:00PM-11:00PM
(Save)

Went to the calendar view, and got this message:

Notice: Undefined index: group in _date_views_fields() (line 61 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_fields.inc).

Any ideas as to what is causing this?

Anonymous’s picture

I am also getting this error with this combination:

Views 7.x-3.x-dev
CTools 7.x-1.x-dev
Date 7.x-2.x-dev
Calendar 7.x-2.x-dev

Looking forward to a solution. Thanks, Charles

bjlewis2’s picture

Also, when I go to a month view that has events on it, I get this:

Notice: Undefined index: group in _date_views_fields() (line 61 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_fields.inc).
Notice: Undefined property: stdClass::$nid in calendar_get_node_link() (line 424 of /Users/Brian/Sites/screencast/sites/all/modules/calendar/calendar.module).
Notice: Undefined property: stdClass::$nid in calendar_get_node_link() (line 424 of /Users/Brian/Sites/screencast/sites/all/modules/calendar/calendar.module).

It looks like I get the "line 424" error once for each event (there are two events.)

I decided to look at the other views.
(Day and year views both give the same error as month.)

This is what I got in the week view, whether or not there were events showing.

Notice: Undefined index: group in _date_views_fields() (line 61 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_fields.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 212 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 212 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 213 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 213 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 216 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 212 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 212 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 213 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 213 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 216 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 212 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 212 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 213 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 213 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 216 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 212 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 212 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 213 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 213 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).
Notice: Undefined variable: field in date_views_argument_handler_simple->query() (line 216 of /Users/Brian/Sites/screencast/sites/all/modules/date/date_views/includes/date_views_argument_handler_simple.inc).

Debug:
'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 \' SEC_TO_TIME(-18000)) <= \'2011-07-18 00:00:00\' AND ADDTIME(, SEC_TO_TIME(-18000)\' at line 3'
in views_plugin_query_default->execute() (line 1341 of /Users/Brian/Sites/screencast/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Debug:
'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 \' SEC_TO_TIME(-18000)) <= \'2011-07-18 00:00:00\' AND ADDTIME(, SEC_TO_TIME(-18000)\' at line 3'
in views_plugin_query_default->execute() (line 1341 of /Users/Brian/Sites/screencast/sites/all/modules/views/plugins/views_plugin_query_default.inc).

carsonw’s picture

I'm getting the same error message. It has to do with this block of code in date_views_fields.inc :

    if ($handler->definition['group'] == 'Fields') {
      $field = field_info_field($handler->definition['field_name']);
      switch ($field['type']) {
       case 'date':
          $type = 'cck_string';
          $sql_type = DATE_ISO;
          break;
        case 'datestamp':
          $type = 'cck_timestamp';
          break;
        case 'datetime':
          $type = 'cck_datetime';
          $sql_type = DATE_DATETIME;
          break;          
      }      
stoltoguzzi’s picture

same error here

agill’s picture

same here, using datetime fields too.

GrahamB’s picture

+1
tearing my hair out!

GrahamB’s picture

Not present on my system for

calendar-7.x-1.0-alpha3
date-7.x-1.x-dev

ctools-7.x-1.0-alpha4
views-7.x-3.0-beta2

admuzic’s picture

same problem.

pedrowabam’s picture

same issue

Notice: Undefined index: group in _date_views_fields() (line 61of /home/../public_html/../sites/all/modules/date/date_views/includes/date_views_fields.inc).

dibya’s picture

I m also facing the same problem viz.
Notice: Undefined index: group in _date_views_fields() (line 61 of C:\wamp\www\iaylocal\sites\all\modules\date\date_views\includes\date_views_fields.inc).

Initially there was no error code after installing date, calender, view, ctools etc, but it came after enabling a few other modules.

syntax-2’s picture

Status: Active » Needs review

For:

"handler" => "views_handler_filter_broken"
"table" => "node"
"field" => "uid_revision"
"title" => "Nieprawidłowa procedura node.uid_revision"

there is no "group". Try:

before:
if ($handler->definition['group'] == 'Fields') {

after:
if (isset($handler->definition['group']) && ($handler->definition['group'] == t('Fields'))) {

Notice that there are TWO changes:
- isset($handler->definition['group']) and
- t('Fields') - t('Fields') solves another problem: #1094408: Date field not showing up in views arguments in localized site

arlinsandbulte’s picture

Is the isset($handler->definition['group']) check needed?
This appears redundant to me as if it is not set, the second condition will fail anyway.

thekevinday’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new743 bytes

I put #13 in patch form.
It seems to solve the problem for me.

zabelc’s picture

The patch in #16 worked for me...at least for the line 61 error

kneep’s picture

The patch in #15 worked for me too, for the line 61 error. So only the line 110 error is still there:
Notice: Undefined index: field_data_field_date.field_date_value in date_views_argument_handler->admin_summary() (regel 110 van /var/www/vhosts/gav.nl/httpdocs/modules/date/date_views/includes/date_views_argument_handler.inc).
(Views 7.x-3.x-dev, CTools 7.x-1.x-dev, Date 7.x-2.x-dev, Calendar 7.x-2.x-dev)

Elegar’s picture

subscribe

hplunkett’s picture

I am also receiving this error after a fresh installation.

Running Drupal 7 and these module versions:
Calendar 7.x-2.x-dev
Date 7.x-2.0-alpha1
CTools 7.x-1.0-alpha4
Views 7.x-3.0-beta3

Elegar’s picture

Does anybody knows stable combination of Calendar + Date + CTools + Views ?

Ole Martin’s picture

What file to patch?

mattbk’s picture

Elegar:

Does anybody knows stable combination of Calendar + Date + CTools + Views ?

I wish I did.

cwyant’s picture

I upgraded Views and Ctools and experienced major errors. I went back to my previous stable installation:

CTools 7.x-1.0-alpha3
Calendar 7.x-1.0-alpha3
Date 7.x-1.0-alpha2
Views 7.x-3.0-alpha1

paranormals’s picture

Subscribe.

shinz83’s picture

subscribe

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in date_field_views_data_alter() (line 252 of /sites/all/modules/date/date_views/date_views.module).

bensnyder’s picture

Date 7.x-2.0-alpha1
Views 7.x-3.0-beta3
Ctools 7.x-1.0-alpha4

Notice: Undefined property: views_plugin_query_default::$fields in views_plugin_query_default->query() (line 1140 of /var/www/[site]/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Warning: Invalid argument supplied for foreach() in views_plugin_query_default->compile_fields() (line 1058 of /var/www/[site]/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Notice: Undefined property: views_plugin_query_default::$fields in views_plugin_query_default->query() (line 1140 of /var/www/[site]/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Warning: Invalid argument supplied for foreach() in views_plugin_query_default->query() (line 1142 of /var/www/[site]/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Warning: Invalid argument supplied for foreach() in views_plugin_query_default->compile_fields() (line 1058 of /var/www/[site]/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Notice: Undefined index: group in _date_views_fields() (line 61 of /var/www/[site]/sites/all/modules/date/date_views/includes/date_views_fields.inc).
Status messageDebug:
'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 \'FROM 
node node
WHERE (( (DATE_FORMAT(ADDTIME(FROM_UNIXTIME(node.changed), SEC_T\' at line 1'
in views_plugin_query_default->execute() (line 1354 of /var/www/[site]/sites/all/modules/views/plugins/views_plugin_query_default.inc).

NOTE that I am not using the Calendar module.

karilu_ec’s picture

#13 fixed my problem with the notice error showing up in all my calendar displays

Date 7.x-2.x-dev
Calendar 7.x-2.x-dev
Views 7.x-3.0-beta3
Chaos tools 7.x-1.0-alpha4

thekevinday’s picture

A number of the other bugs are separate calendar issues already addressed here:
- http://drupal.org/node/1090718
- http://drupal.org/node/1108542
- http://drupal.org/node/1087528

Steven.Pescador’s picture

Subscribing

marcusx’s picture

subscribing

cezaryrk’s picture

After checking the group in date_views_fields.inc line 61, the field info is retrieved, but in my instance (7.x-dev) the $handler->definition['group'] value for date fields is "Content" and some of the as "Content" marked elements, doesn't have a field_name, so i changed line 61 to

// Before: if ($handler->definition['group'] == t('Fields')) {
   if (isset($handler->definition['field_name'])) {
     $field = field_info_field($handler->definition['field_name']);

     // ....
  }
  // only an output example of handler definition
  $handler->definition => Array
        (
            [group] => Content // group is "Content" not "Fields" 
            [field] => uni_course_period_of_validaty_value2
            [table] => field_data_uni_course_period_of_validaty
            [handler] => date_views_filter_handler_simple
            [field_name] => uni_course_period_of_validaty
        )
shinz83’s picture

The first coding portion of #31 worked for me. However, I don't fully understand what the second part is for or where it would go.

cezaryrk’s picture

The second is only an output example of $handler->definition, it describes a date field, but the $handler->definition['group'] is "Content" and not "Fields", like in if($handler->definition['group'] == t("Fields")).

ytsurk’s picture

#15 helps, probably #31 too

g089h515r806’s picture

Subscribing

cezaryrk’s picture

some problem, my workaround for #26 is

http://drupal.org/node/1112206#comment-4312004

zabelc’s picture

#31 successfully removed the error: "Undefined index: group in _date_views_fields() line 61"

oregonwebsiteservices’s picture

Same error:
Notice: Undefined index: group in _date_views_fields() (line 61 of /var/www/vhosts/mysacrifice.org/httpdocs/sites/all/modules/date/date_views/includes/date_views_fields.inc)..

#31 worked for me many thanks!!

bjlewis2’s picture

#31 still works!

wcarpent’s picture

How does one implement the fix from #31? I've never used a patch before.

~Many Thanks!

thekevinday’s picture

Status: Reviewed & tested by the community » Needs work

The problem with week view is the following:
date_views/includes/date_views_argument_handler_simple.inc:210
The variable $field is called, but it is not defined anywhere.

We need to get $field from somewhere.
I found a way to get the $field, example:

<?php
foreach ($this->query_fields as $count => $query_field) {
  $field = $query_field['field'];
  . . .
?>

When I do this, however, there seems to be a new problem of:
# Notice: Undefined variable: format in date_views_argument_handler_simple->query() (line 219 of date/date_views/includes/date_views_argument_handler_simple.inc).
# Notice: Undefined variable: format in date_views_argument_handler_simple->query() (line 220 of date/date_views/includes/date_views_argument_handler_simple.inc).

danielphenry’s picture

subscribing

druper’s picture

subscribing

spovlot’s picture

subscribing

TimelessDomain’s picture

brightbold’s picture

Subscribing. Fix in #15 worked for me, but undoubtedly I'll upgrade Date and overwrite all my patches, so now I can find this thread again.

enxox’s picture

#13 works fine for me, but #31 solves also this issue
http://drupal.org/node/1115442

kreynen’s picture

#31 isn't necessary with a recent dev release of Date when using Views-7.x-3.0-beta3. In every version of Views, #31 causes problems with Calendar. Started an issue in that queue.

#1126650: Date fix for #1115442 causes problems with Calendar.

thekevinday’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new700 bytes

I did not see the problem that #31 fixes until I switched from views-7.x-3.x-beta3 to views-7.x-3.x-dev.
Once that happens, I was able to confirm that specific bug as well as confirm that specific solution.
For convenience purposes, I put cezaryrk's fix from #31 in patch form.

Reviewing both cases I am starting to believe the fix from #31 may be more correct than the fix from #13 (whose patch is in #15). However, it could be that #13 fixes the problem when using views-7.x-3.x-beta3 and #31 fixes the problem when using views-7.x-3.x-dev.

Please keep in mind that there seem to be multiple similar bugs in this thread which may require separate solutions. (I may have to open up a separate issue for #41)

scthomps312’s picture

Subscribing

asyn’s picture

Patch from #49 fixes this issue for me. Please add this to the repo.

Wappie08’s picture

I applied the patch from #49 by hand to date-7.x-1.0-alpha2 and the errors where gone, thanks guys for the work!

(btw I'm using views-7.x-3.0-beta3)

EDIT: Actually the errors appear again, sometimes, I think due to problems with cache..

* Notice: Undefined index: additional fields in date_field_views_data_alter() (line 252 of /sites/all/modules/date/date_views/date_views.module).
* Warning: array_merge() [function.array-merge]: Argument #1 is not an array in date_field_views_data_alter() (line 252 of /sites/all/modules/date/date_views/date_views.module).
* Notice: Undefined index: additional fields in date_field_views_data_alter() (line 252 of /sites/all/modules/date/date_views/date_views.module).
* Warning: array_merge() [function.array-merge]: Argument #1 is not an array in date_field_views_data_alter() (line 252 of /sites/all/modules/date/date_views/date_views.module).

Greets

karens’s picture

Status: Reviewed & tested by the community » Fixed

The latest version of Views changed the grouping of fields from 'Fields' to 'Content'. Date and Calendar were using that group to identify the fields that were eligible for use in date filters and arguments, so everything broke. I have been committing fixes that should correct this.

bryancasler’s picture

#49 works for me

bibble_235’s picture

Many thanks to karilu_ec for providing which packages will make this work.

Status: Fixed » Closed (fixed)

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