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) »
  • Calendar View not displaying results set
Pages: [1]

Author Topic: Calendar View not displaying results set  (Read 4653 times)

Lionsharz

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
    • www.ulearnschool.com
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • PHP version: 5.3 / 5.4
Calendar View not displaying results set
August 29, 2013, 03:21:50 pm
Hi

I have a view based on Membership table. Its pretty simple - just pulls in a Membership ID and the Membership Start Date. I can see these fields populated fine within a table, but on using them in a calendar they do not appear.

I've tried using both Calendar and Full Calendar modules to display the information in a calendar format but neither seems to recognize the fields fed from CiviCRM as dates and so nothing is displayed.

Am I correct on this? Anyone have any success feeding *any* civicrm date based field into a drupal calendar view?
www.ulearnschool.com

kreynen

  • I post occasionally
  • **
  • Posts: 105
  • Karma: 8
Re: Calendar View not displaying results set
August 30, 2013, 07:09:55 am
There are a lot of options to display CiviCRM dates in a Drupal calendar, but most of the these solutions have been designed around CiviEvents... not other date values in CiviCRM.  The problem with Drupal's calendar Views is that they now assume all date data is coming from Drupal's Date module.  Back when Drupal had competing Date and Event modules, this functionality was more flexible.  To get around this limitation, CiviCRM now includes it's own Calendar views...

https://github.com/civicrm/civicrm-drupal/blob/7.x-master/modules/views/civicrm.views_default.inc#L24

That use it's own View plugins...

https://github.com/civicrm/civicrm-drupal/tree/7.x-master/modules/views/plugins

There are limitations to those Views, which is why so many alternatives exist.

https://drupal.org/project/civicrm_multiday_event displays CiviCRM Events in Drupal by synchronizing data between a Drupal node type and a CiviCRM Event.

There is a CiviCRM native extension that used FullCalendar http://civicrm.org/extensions/event-calendar-extension

https://drupal.org/project/civicrm_events displays events directly from CiviCRM in FullCalendar without requiring views.  If you can't get the membership dates to display using Views, you might want to try altering the query in civicrm_event to work with the membership dates...

http://drupalcode.org/project/civicrm_events.git/blob/refs/heads/7.x-1.3:/civicrm_events.module#l140

But if you can't get *any* civicrm dates to show up in a calendar view w/ Drupal, you are likely doing something wrong.  Since you didn't bother to include the version of CiviCRM, Drupal, Views, and Calendar or an export of your View, I'm going to assume you posted this to vent more than an attempt to actually get help.

Lionsharz

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
    • www.ulearnschool.com
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • PHP version: 5.3 / 5.4
Re: Calendar View not displaying results set
August 31, 2013, 09:01:08 am
Hi

Thanks for your response. I am working with developers in an attempt to solve certain issues related in the Drupal / CiviCRM integration, including the Views code. Hopefully once solved we want to post everything back to the community. We are focused on issues connected to the solutions required by our organization, which include:

1) Ability to use date data from CiviCRM in Views and display as calendar
2) Pulling in Smart Group data into View (Drupal 6 & 7)

I have already some code lifted from another forum post on second issue and we're hoping for a solution on that very soon (already functions in D6)

I have used the CiviCRM Events module to feed in events to the calendar. However we don't work so much with events, rather memberships. The key issue seems to be that in feeding in dates (any dates such as start / finish for memberships, or contributions etc) from CiviCRM they do not appear as date fields in views and so the Calendar displays nothing at all. Here http://forum.civicrm.org/index.php/topic,29061.msg124588.html#msg124588 I believe this post is identifying the same issue
"Views is attempting to use the MySQL function "FROM_UNIXTIME" for the start_date field, which returns a null.    Why is this function even being used for this field?"

This is possibly down to the way the handlers are parsing the information to Views into the Calendar display.

I have also toyed around with Full Calendar - same issue though. The Contextual Filters which make date processing / calendar display possible are not rendering the civicrm data in views as date formatted fields. At least that's what I think at present.

Obviously this is a huge limitation on what you could do in terms of pulling information from the CRM to a display layer like Views. It also seems like a solution would be possible if we knew the reason behind the failure of the date data in Views.

Oh - I have run these tests on D6 & 7 and the version information is part of my profile down the left hand sidebar in the forum. Thanks.
www.ulearnschool.com

Lionsharz

  • I post occasionally
  • **
  • Posts: 76
  • Karma: 0
    • www.ulearnschool.com
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7
  • PHP version: 5.3 / 5.4
Re: Calendar View not displaying results set
August 31, 2013, 11:40:12 am
Additionally here are some of the sample tables / displays I referred to

a) Basic Table containing the CiviCRM Membership ID and Start Date http://class.ulearn.ie/civi-members
b) A Calendar display View with one sample Event being fed from CiviCRM http://class.ulearn.ie/events/month?month=2013-08
c) An attempt at converting View a) (membership start dates with IDs) into a Calendar View. http://class.ulearn.ie/calendar-clone-civi-members

The last view shows debugging information Debug:
'calendar_plugin_style: The calendar row plugin is required when using the calendar style, but it is missing.'
in calendar_plugin_style->render() (line 228 of /home/class/public_html/sites/all/modules/calendar/includes/calendar_plugin_style.inc).

And no results are shown.

I also reference this https://drupal.org/node/1329894 which as KarenS (developer of Calendar module) says:
"...You should be able to use any Views field that extends the date handlers. So if you have a custom field you need to make sure it is set up to be integrated into Views. "
« Last Edit: August 31, 2013, 11:48:11 am by Lionsharz »
www.ulearnschool.com

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Calendar View not displaying results set
September 01, 2013, 08:36:08 am

Thanx for pushing this forward with your developers. Would be good to see if we can incorporate all the date fixes for Civi v4.4

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

pressurecooker

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Drupal
  • MySQL version: 5.6.14
  • PHP version: 5.5.3
Re: Calendar View not displaying results set
September 24, 2013, 08:59:44 am
Hello,

I am developing a website using CiviCRM 4.3.4 and was wondering if these issues may be related to being in a sandbox, or the specific CiviCRM version and I should just upgrade to 4.3.5:

    Notice: Undefined offset: 5 in calendar_plugin_row_civicrm->render() (line 135 of XXXX.com/html/sites/all/modules/contrib/civicrm/drupal/modules/views/plugins/calendar_plugin_row_civicrm.inc).
    Notice: Undefined property: stdClass::$start_date in calendar_plugin_row_civicrm->render() (line 156 of XXXX.com/html/sites/all/modules/contrib/civicrm/drupal/modules/views/plugins/calendar_plugin_row_civicrm.inc).
    Warning: Invalid argument supplied for foreach() in calendar_plugin_style->render() (line 299 of XXXX.com/html/sites/all/modules/contrib/calendar/includes/calendar_plugin_style.inc).

Looked for other documentation on this forum for this type of calendar issue.  I apologize if I have a noobish approach to helping smooth out this bug as I am new to posting feedback, but I will be glad to provide any extra feedback.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Calendar View not displaying results set
September 24, 2013, 12:38:21 pm

Those are notices and warnings, so for now I would just ignore them and see what happens

In the medium term would be good to resolve those notices and warnings

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Calendar View not displaying results set
December 16, 2013, 08:29:03 pm
we might do a bit of digging in to this - has anyone pushed any further on sorting out whether we need to patch Calendar or patch Civi Views so that civi date fields can be interpreted as dates by Calendar plug in for Views?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Calendar View not displaying results set

This forum was archived on 2017-11-26.