CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • D7/Civi4.0.1/Views 3
Pages: [1]

Author Topic: D7/Civi4.0.1/Views 3  (Read 1151 times)

theMusician

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 3
  • CiviCRM version: 4.0 and 4.0.1
  • CMS version: Drupal 7.0
  • MySQL version: MySQL 5.x
  • PHP version: 5.2
D7/Civi4.0.1/Views 3
May 19, 2011, 01:58:58 pm
Hi fellow event users,

I have been able to install Views 3, Date, ctools, and calendar with out a problem. I have appended the prefix db tables in my drupal settings.php file and have enabled the Events view. However, no events appear on the calendar. I have removed all of the filters and ensured that my events are active for the current month. I do get the following block of notices but no significant errors.

  • Notice: Undefined index: exception in calendar_plugin_display_attachment->display_granularity() (line 70 of /vpfa-dev/fa-drupal7/president/sites/all/modules/calendar/includes/calendar_plugin_display_attachment.inc).
  • Notice: Undefined variable: id in template_preprocess_calendar() (line 106 of /vpfa-dev/fa-drupal7/president/sites/all/modules/calendar/theme/theme.inc).
  • Notice: Undefined index: civicrm_event.start_date in calendar_build_nodes() (line 616 of /vpfa-dev/fa-drupal7/president/sites/all/modules/calendar/calendar.module).
  • Notice: Undefined index: exception in calendar_plugin_display_attachment->display_granularity() (line 70 of /vpfa-dev/fa-drupal7/president/sites/all/modules/calendar/includes/calendar_plugin_display_attachment.inc).

I do not see any database errors. This is the first time I have used Views with Civi so it is entirely possible I missed some essential step. I am trying for Option 1 at
http://wiki.civicrm.org/confluence/display/CRMDOC40/Using+Drupal+Calendar+with+CiviEvent

I also followed the page on Views 2 integration though I am using Views 3
http://wiki.civicrm.org/confluence/display/CRMDOC40/Views2+Integration+Module

Thanks for any ideas for a resolution.

theMusician

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 3
  • CiviCRM version: 4.0 and 4.0.1
  • CMS version: Drupal 7.0
  • MySQL version: MySQL 5.x
  • PHP version: 5.2
Re: D7/Civi4.0.1/Views 3
May 24, 2011, 01:54:09 pm
This error,

Notice: Undefined index: exception in calendar_plugin_display_attachment->display_granularity() (line 70 of /vpfa-dev/fa-drupal7/president/sites/all/modules/calendar/includes/calendar_plugin_display_attachment.inc).

can be resolved by following comment #4 over at drupal.org. http://drupal.org/node/1140932#comment-4500032

 ::) I am still working on the other ones.

theMusician

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 3
  • CiviCRM version: 4.0 and 4.0.1
  • CMS version: Drupal 7.0
  • MySQL version: MySQL 5.x
  • PHP version: 5.2
Re: D7/Civi4.0.1/Views 3
May 24, 2011, 02:44:51 pm
Upgrading to the latest development versions of Calendar, Date, and Views, as recommended in the Drupal Calendar issue queue solved a few oddities but not the following two Notices:

Code: [Select]
Notice: Undefined variable: id in template_preprocess_calendar() (line 106 of /vpfa-dev/fa-drupal7/president/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined index: civicrm_event.start_date in calendar_build_nodes() (line 606 of /vpfa-dev/fa-drupal7/president/sites/all/modules/calendar/calendar.module).

I am unable to see my events listed on the calendar in calendar view. However, if I choose the Upcoming Events Display option I can see the future events. The only difference between the views besides the display type is the contextual filter. I understand that the calendar view needs a date or nothing could be displayed in the appropriate place on the calendar.

Could the notices be wreaking havoc on the view? I am a bit befuddled as to why the events will not show up on the calendar display but will on the upcoming events display.

Thanks

mc625569

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.2
  • PHP version: 5.1
Re: D7/Civi4.0.1/Views 3
June 25, 2011, 12:23:16 pm
Hello, I have D7 and Civi 4.0 and Im trying to get the monthly calendar view of all civi events complete with registration links, but I keep getting the following errros.

* Notice: Undefined variable: id in template_preprocess_calendar() (line 99 of /var/www/drupal/sites/all/modules/calendar/calendar_multiday/theme/theme.inc).

* Notice: Undefined index: civicrm_event.start_date in calendar_build_nodes() (line 606 of /var/www/drupal/sites/all/modules/calendar/calendar.module).

* Notice: Undefined index: civicrm_event.start_date in calendar_build_nodes() (line 616 of /var/www/drupal/sites/all/modules/calendar/calendar.module).


I have the following versions:
Views 7.x-3.0-rc1
Calendar 7.x-2.0-alpha1
Date   7.x-2.0-alpha3
Civicrm 4.0

This thread is the only similar type of error I can find, and I have tried to edit the view and re-save as instructed by I'm still getting the errors listed.

Can someone point me in the right direction, or if I need to rely on CiviEvent and calendars for a prodcution system, should I stick with the d6/civi3.4 setup we have now that runs fine.

I'm new to drupal, and have tried searching for listed bugs , but can't find anything other than this thread, which seems to indicate that people have not had time to fix this?

Any suggestions are appreciated

-MC


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: D7/Civi4.0.1/Views 3
June 25, 2011, 01:47:17 pm
Quote from: theMusician on May 24, 2011, 02:44:51 pm
Upgrading to the latest development versions of Calendar, Date, and Views, as recommended in the Drupal Calendar issue queue solved a few oddities but not the following two Notices:

Code: [Select]
Notice: Undefined variable: id in template_preprocess_calendar() (line 106 of /vpfa-dev/fa-drupal7/president/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined index: civicrm_event.start_date in calendar_build_nodes() (line 606 of /vpfa-dev/fa-drupal7/president/sites/all/modules/calendar/calendar.module).


I also had these. For the first I patched template_preprocess_calendar myself, starting around line 95 I added the first line in this code snippet:

Code: [Select]
  $id = 'id';  // Hershel added this
  foreach ($result as $num => $row) {
    $keys = array_keys((array) $row);
    foreach ($keys as $key) {
      if (strlen($key) == 3 && substr($key, -2) == 'id' && !empty($row->$key)) {
        $id = $key;
      }
    }
  }

and that fixed it.

For the second see: http://forum.civicrm.org/index.php?topic=20413.new;topicseen#new 
« Last Edit: June 25, 2011, 02:00:07 pm by hershel »
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • D7/Civi4.0.1/Views 3

This forum was archived on 2017-11-26.