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 Drupal Modules (Moderator: Donald Lobo) »
  • D7/C4 and the Default Events Calendar View
Pages: [1]

Author Topic: D7/C4 and the Default Events Calendar View  (Read 1235 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
D7/C4 and the Default Events Calendar View
June 20, 2011, 08:17:56 am
Using the latest versions of all tools involved, the built in Events Calendar View not only generates errors for me, it also doesn't show my event. The SQL query is correct and when run manually, brings up one event, but I don't see it in the view.

Does anyone have this working? If so, can you provide tips? Precise versions of modules etc.

I also tried the dev versions of the Drupal modules, but no luck.
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.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: D7/C4 and the Default Events Calendar View
June 24, 2011, 03:40:25 am
Issue filed: http://issues.civicrm.org/jira/browse/CRM-8353
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.

jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: D7/C4 and the Default Events Calendar View
June 24, 2011, 01:10:26 pm
The issue is with the calendar module from Drupal.  I've got it partially working, ie items  but with new errors by replace line 592 of /sites/all/modules/calendar/calendar.module as below.  Can you test it and let me know?  If it works for you I'll post the patch to d.o

replace

Code: [Select]
$fields = date_views_fields($base_table[0]);
with

Code: [Select]
foreach ($view->date_info->date_fields as $key => $field_name) {
  $base_table = explode(".",$field_name);
  $fields = date_views_fields($base_table[0]); 
}
« Last Edit: June 24, 2011, 01:13:02 pm by jalama »
http://www.rootyhollow.com

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: D7/C4 and the Default Events Calendar View
June 25, 2011, 01:45:50 pm
That line in the latest dev Calendar release is:

Code: [Select]
  $fields = date_views_fields();
but anyhow your patch worked. :)

I still get:

Code: [Select]
Notice: Undefined index: exception in calendar_plugin_display_attachment->display_granularity()
(line 70 of /srv/http/xxx.com/sites/all/modules/calendar/includes/calendar_plugin_display_attachment.inc).

but it works anyhow.
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.

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/C4 and the Default Events Calendar View
June 25, 2011, 07:51:37 pm
Same issue as Hershel when fix applied.

View works but shows error


Notice: Undefined index: exception in calendar_plugin_display_attachment->display_granularity() (line 70 of /var/www/.../all/modules/calendar/includes/calendar_plugin_display_attachment.inc).



jalama

  • I post frequently
  • ***
  • Posts: 176
  • Karma: 22
    • Rooty Hollow LLC
  • CiviCRM version: 3.3.5
  • CMS version: Drupal 6 and 7
  • MySQL version: 5.1
  • PHP version: 5.2.5 and 5.3
Re: D7/C4 and the Default Events Calendar View
June 27, 2011, 06:31:41 am
Father Shawn was right just ned to re-save the view, I attached the new view here and committed to the 4.0.5 codebase
http://www.rootyhollow.com

lesmanalim

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Drupal
  • MySQL version: 5.0
  • PHP version: 5.2
Re: D7/C4 and the Default Events Calendar View
August 04, 2011, 11:39:45 pm
The above mostly worked for me as well. I also had to change a line in Calendar module's theme/theme.inc since the CiviCRM event ID key is only 2 characters long:

Line 98:
Quote
if (strlen($key) == 3 && substr($key, -2) == 'id' && !empty($row->$key)) {

One possible fix:
Quote
if (strlen($key) <= 3 && substr($key, -2) == 'id' && !empty($row->$key)) {

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • D7/C4 and the Default Events Calendar View

This forum was archived on 2017-11-26.