Have a FullCalendar that is being generated of of Drupal Commerce product data with dates and a field list selector. Where the view is double displaying the returned results.

FullCalendar

The query from views is:

SELECT DISTINCT commerce_product.product_id AS product_id, commerce_product.title AS commerce_product_title, 'commerce_product' AS field_data_field_grp_tour_trp_date_commerce_product_entity_t, 'commerce_product' AS field_data_field_tour_commerce_product_entity_type, COUNT(DISTINCT commerce_product.sku) AS commerce_product_sku
FROM 
{commerce_product} commerce_product
LEFT JOIN {field_data_field_cruise_cabin_names} field_data_field_cruise_cabin_names ON commerce_product.product_id = field_data_field_cruise_cabin_names.entity_id AND (field_data_field_cruise_cabin_names.entity_type = 'commerce_product' AND field_data_field_cruise_cabin_names.deleted = '0')
LEFT JOIN {field_data_field_tour} field_data_field_tour ON commerce_product.product_id = field_data_field_tour.entity_id AND (field_data_field_tour.entity_type = 'commerce_product' AND field_data_field_tour.deleted = '0')
WHERE (( (field_data_field_tour.field_tour_nid = '892' ) )AND(( (field_data_field_cruise_cabin_names.field_cruise_cabin_names_value IN  ('3', '6', '10', '21')) )))
GROUP BY product_id

When the query is run directly in mysql the results show each value uniquely. However when goto the FullCalendar View there are double entries. Similar to #1111008: Double Calendar postings after upgrade

I am running
FullCalendar 7.x-2.0-beta3
Date 7.x-2.0-rc2
Views 7.x-3.1

Thanks in advance for the help!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HyperGlide’s picture

Title: Duplicate / Double display of Events » Duplicate / Double display of Events -- Multiple Date Fields - [SOLVED]
Assigned: Unassigned » HyperGlide
Status: Active » Fixed
FileSize
34.65 KB

A few notes to add about our view:

  1. We have (2) date fields - 1 for the calendar to show the range and the 2nd for a JSON call.
  2. So in fact FullCalendar did as it should put the dates on the calendar but how do we stop the double entry?
  3. Funny you shall ask -- goto Format >> FullCalendar >> Settings >> Customize Field >> (scroll down) and find "Use a custom a date field".
  4. Find it?
  5. Click and select the field you want to render.
  6. field selector
  7. Apply and don't forget to save your view.

Did it work?

A few other things learned along the way:

  1. FullCalendar is not a fan of "GROUP BY" as it is not needed. In the end our view has it and still works like a champ. Per @timplunkett -- normally such grouping would be set on the row plugin, which fullcalendar doesn't use, or the style plugin itself, which is fullcalendar in this case.
  2. If you think you have a solution on a clone of your view -- test it before going forward.

Huge thanks to the rockstar support from @timplunkett and @aspilicious.

Status: Fixed » Closed (fixed)

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

velpan’s picture

In case of somebody else has the same issue...

I solved the double view of events by

unchecking the checkbox "Display all values in the same row" inside the fieldset MULTIPLE FIELD SETTINGS

in the configuration of the Date field used for the event.

HyperGlide’s picture

@velpan thanks -- but the issue I posted was only 1 instance per field value.

pramodga’s picture

I tried below solution and works fine for me. :)

  1. Navigate to your event content type Date Field Settings
  2. Structure >> Content Type >> Events >> Manage fileds >> Date >> Field settings
  3. Change Time zone handling to No time zone conversion
  4. Click on Save

Now you can check the view, it should stop showing duplicate events