iCal empty

richard.e.morton - April 27, 2009 - 21:02
Project:Calendar
Version:6.x-2.1
Component:iCal export
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Hi There,

We have a website (nafof) and it works well with calendar and date for our event calendar. We've noticed that the ical however is empty, like this.
BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-WR-CALNAME: Calendar | NaFoF
PRODID:-//Drupal iCal API//EN
END:VCALENDAR

we haven't changed any settings in the view (I think) that could have broken this... any ideas? any help appreciated

thanks

Richard

#1

richard.e.morton - April 29, 2009 - 18:52

apologies, If I am logged in, the ICal is empty, if I am logged out of the website :
- the ICAL contains all past events (or seems to at least) - I have a filter set on the view for now through to now+365days so it shouldnt have any past events in it
- the events in the past have a start time of the set start time in the event information but an end time of now (the time the ical file was generated)
- I can't get a teaser in the ICal without it appearing in the calendar view as well.

My ical when I am logged out, looks like this:

thanks

Richard

BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-WR-CALNAME: Calendar | NaFoF
PRODID:-//Drupal iCal API//EN
BEGIN:VEVENT
UID:calendar:24:field_eventdatetime:0:100
SUMMARY:SHQ @ The Mitre
DTSTAMP;TZID=Europe/London;VALUE=DATE-TIME:20090428T133135
DTSTART;TZID=Europe/London;VALUE=DATE-TIME:20090219T203000
DTEND;TZID=Europe/London;VALUE=DATE-TIME:20090428T133135
URL;VALUE=URI:http://www.nafof.org.uk/event/shqthemitre
END:VEVENT

......

BEGIN:VEVENT
UID:calendar:182:field_eventdatetime:0:140
SUMMARY:Bournemouth &amp\; Pier Theatre
DTSTAMP;TZID=Europe/London;VALUE=DATE-TIME:20090428T133135
DTSTART;TZID=Europe/London;VALUE=DATE-TIME:20090801T100000
DTEND;TZID=Europe/London;VALUE=DATE-TIME:20090428T133135
URL;VALUE=URI:http://www.nafof.org.uk/event/bournemouthpiertheatre
END:VEVENT
BEGIN:VEVENT
UID:calendar:78:field_eventdatetime:0:141
SUMMARY:Posh Party Cruise
DTSTAMP;TZID=Europe/London;VALUE=DATE-TIME:20090428T133135
DTSTART;TZID=Europe/London;VALUE=DATE-TIME:20091003T120000
DTEND;TZID=Europe/London;VALUE=DATE-TIME:20090428T133135
URL;VALUE=URI:http://www.nafof.org.uk/event/poshpartycruise
END:VEVENT
END:VCALENDAR

#2

markDrupal - April 28, 2009 - 15:48

The ical when logged out might be cached, so try emptying the cache using the dev module.

But for an empty ical, you may need to change the view settings, click the "ical" view and see if you have any "Date" arguments.
For the iCal view, the "Date" should be in the filters section, NOT the Arguments section like it is for all the other view.

So, removing the "Date argument" and adding a "date filter" might fix it.

#3

richard.e.morton - April 28, 2009 - 20:01

Hi,

Thanks for the email. I have cleared the cache and turned off caching. Still the same, empty iCal when logged in, populated iCal when logged out of the site, but even then the iCal has an event start of the correct date-time but an end date-time of the iCal file generation (also, as it is updated with each update it shows it is not a caching issue).

help greatly appreciated and I can supply screenshots / settings that are in use to help debug this.

Thanks

Richard

#4

richard.e.morton - April 28, 2009 - 23:01
Category:support request» bug report

Hi,

I've been looking at the filter options and even with date filter on event start time between now and now+30days the iCal still contains (when logged out) all past events and future events. with event start in the ical to set to the correct start time and event end time set to the ical file generation date (as previously described).

thanks for any help

Richard

#5

richard.e.morton - April 29, 2009 - 18:52
Component:iCal export» Code

#6

markDrupal - April 29, 2009 - 22:24

You really got me stumped. Let's try comparing settings, here are mine in a screen grab.
In addition, try updating to the newest DEV version of DATE and CALENDAR modules, also clear the views cache in the "tools" tab (See screen shot). Also be sure to click the "Gear" icon next to "style: iCal feed" and (in my case) "Date:Date (node) Content:", There are some options in there that may need adjusting.
If you still have problems, post your settings as a screen shot.

AttachmentSize
ical-setting.png 79.06 KB

#7

richard.e.morton - April 29, 2009 - 23:09

Humm...

Thanks for the screenshot. I have reviewed my settings, cleared the views cache and things have changed a little.

Now, when I am logged in I get a properly formatted iCal but with only one item in it...
BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-WR-CALNAME: Calendar | NaFoF
PRODID:-//Drupal iCal API//EN
BEGIN:VEVENT
UID:calendar:157:field_eventdatetime:0:22
SUMMARY:Cinema - X-Men Origins\: Wolverine
DTSTAMP;TZID=Europe/London;VALUE=DATE-TIME:20090429T235841
DTSTART;TZID=Europe/London;VALUE=DATE-TIME:20090429T203000
DTEND;TZID=Europe/London;VALUE=DATE-TIME:20090429T223000
URL;VALUE=URI:http://nafof.org.uk/event/cinemaxmenoriginswolverine
END:VEVENT
END:VCALENDAR

(good film by the way)

but when I am logged out, same problem, all events appear and event end date is set to ical file generation date-time.

AttachmentSize
snapshot1.png 163.85 KB

#8

markDrupal - April 30, 2009 - 17:05

Almost, Make sure you are on the "iCal feed" tab when taking the screen shot. Please post another screen shot.

#9

richard.e.morton - April 30, 2009 - 18:12

oops, here it is .

AttachmentSize
snapshot2.png 178.2 KB

#10

richard.e.morton - May 3, 2009 - 16:38

When an event is on during the day of the iCal generation, when logged in the event shows correctly in the iCal (for only the logged in user)

when logged out, it still produces the iCal as above, a long chain of every event with incorrect event end time.

thanks

R

#11

markDrupal - May 3, 2009 - 18:52

You're view looks normal. I'm still stumped, but you could try to export your view, save it as a text file and attach it. I might understand more if I can use the view on my system and play around with it.

Be sure you're using the latest dev versions of the date/calendar modules.

Take a look at this bug too: sounds similar #353837: added iCAL to an existing calendar and its empty

#12

richard.e.morton - May 3, 2009 - 18:55

here is the export.
$view = new view;
$view->name = 'calendar';
$view->description = 'A multi-dimensional calendar view with back/next navigation.';
$view->tag = 'Calendar';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'field' => 'title',
'table' => 'node',
'relationship' => 'none',
),
'teaser' => array(
'label' => 'Teaser',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'exclude' => 1,
'id' => 'teaser',
'table' => 'node_revisions',
'field' => 'teaser',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'field_eventdatetime_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
'group' => TRUE,
),
'repeat' => array(
'show_repeat_rule' => '',
),
'fromto' => array(
'fromto' => 'both',
),
'exclude' => 1,
'id' => 'field_eventdatetime_value',
'table' => 'node_data_field_eventdatetime',
'field' => 'field_eventdatetime_value',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'field_eventdatetime_value' => array(
'id' => 'field_eventdatetime_value',
'table' => 'node_data_field_eventdatetime',
'field' => 'field_eventdatetime_value',
),
));
$handler->override_option('arguments', array(
'date_argument' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'default_argument_type' => 'date',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'date_fields' => array(
'node_data_field_eventdatetime.field_eventdatetime_value' => 'node_data_field_eventdatetime.field_eventdatetime_value',
),
'year_range' => '-3:+1',
'date_method' => 'OR',
'granularity' => 'month',
'id' => 'date_argument',
'table' => 'node',
'field' => 'date_argument',
'relationship' => 'none',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'blog' => 0,
'image' => 0,
'book' => 0,
'club' => 0,
'event' => 0,
'nafofpage' => 0,
'page' => 0,
'story' => 0,
'test' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'2' => 0,
'4' => 0,
'1' => 0,
'3' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
'override' => array(
'button' => 'Override',
),
'default_options_div_prefix' => '',
'user_argument_type' => '',
'restrict_user_roles' => 0,
'user_roles' => array(),
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'tid' => array(
'operator' => 'or',
'value' => array(
'2' => '2',
'9' => '9',
'10' => '10',
'3' => '3',
'8' => '8',
'12' => '12',
'1' => '1',
'11' => '11',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'tid_op',
'identifier' => 'tid',
'label' => 'Event Type: (use CTRL to multi-select)',
'optional' => 0,
'single' => 0,
'remember' => 0,
'reduce' => 0,
),
'type' => 'select',
'vid' => '1',
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 1,
'relationship' => 'none',
'reduce_duplicates' => 0,
'override' => array(
'button' => 'Override',
),
),
'tid_1' => array(
'operator' => 'or',
'value' => array(
'13' => '13',
'4' => '4',
'5' => '5',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => 'tid_1_op',
'label' => 'Club Calendars:',
'use_operator' => 0,
'identifier' => 'tid_1',
'optional' => 0,
'single' => 0,
'remember' => 0,
'reduce' => 0,
),
'type' => 'select',
'vid' => '2',
'id' => 'tid_1',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 1,
'relationship' => 'none',
'reduce_duplicates' => 0,
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('access', array(
'type' => 'none',
'role' => array(),
'perm' => '',
));
$handler->override_option('title', 'Calendar');
$handler->override_option('header_format', '2');
$handler->override_option('header_empty', 1);
$handler->override_option('items_per_page', 0);
$handler->override_option('use_more', 0);
$handler->override_option('style_plugin', 'calendar_nav');
$handler = $view->new_display('calendar', 'Calendar page', 'calendar_1');
$handler->override_option('path', 'calendar');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'Event Calendar',
'description' => '',
'weight' => '0',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
$handler->override_option('calendar_colors', array(
'0' => array(),
));
$handler->override_option('calendar_colors_vocabulary', array(
'1' => 1,
));
$handler->override_option('calendar_colors_taxonomy', array(
'2' => '#ff00ff',
'9' => '#440044',
'10' => '#888800',
'3' => '#22ff22',
'8' => '#880088',
'12' => '#00bbbb',
'1' => '#0000ff',
'11' => '#bbbbbb',
));
$handler->override_option('calendar_popup', 0);
$handler->override_option('calendar_date_link', '');
$handler = $view->new_display('calendar_block', 'Calendar block', 'calendar_block_1');
$handler->override_option('block_description', 'Calendar');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('calendar_period', 'Year view', 'calendar_period_1');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'display_type' => 'year',
'name_size' => 1,
'max_items' => 0,
'truncated_fields' => array(),
'truncate_length' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
'calendar_1' => 'calendar_1',
'default' => 0,
'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'year');
$handler = $view->new_display('calendar_period', 'Month view', 'calendar_period_2');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'display_type' => 'month',
'name_size' => '99',
'with_weekno' => '1',
'date_fields' => NULL,
'max_items' => 0,
'truncated_fields' => array(),
'truncate_length' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
'calendar_1' => 'calendar_1',
'default' => 0,
'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'month');
$handler = $view->new_display('calendar_period', 'Day view', 'calendar_period_3');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'name_size' => '99',
'with_weekno' => 0,
'max_items' => 0,
'max_items_behavior' => 'more',
'groupby_times' => 'hour',
'groupby_times_custom' => '',
'groupby_field' => '',
'truncated_fields' => array(),
'truncate_length' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
'calendar_1' => 'calendar_1',
'default' => 0,
'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'day');
$handler = $view->new_display('calendar_period', 'Week view', 'calendar_period_4');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'name_size' => '99',
'with_weekno' => 0,
'max_items' => 0,
'max_items_behavior' => 'more',
'groupby_times' => 'hour',
'groupby_times_custom' => '',
'groupby_field' => '',
'truncated_fields' => array(),
'truncate_length' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
'calendar_1' => 'calendar_1',
'default' => 0,
'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'week');
$handler = $view->new_display('calendar_period', 'Block view', 'calendar_period_5');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
'display_type' => 'month',
'name_size' => '1',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
'calendar_1' => 0,
'default' => 0,
'calendar_block_1' => 'calendar_block_1',
));
$handler->override_option('calendar_type', 'month');
$handler = $view->new_display('calendar_ical', 'iCal feed', 'calendar_ical_1');
$handler->override_option('arguments', array());
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'event' => 'event',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'date_filter' => array(
'operator' => '>=',
'value' => array(
'value' => NULL,
'min' => NULL,
'max' => NULL,
'default_date' => 'now',
'default_to_date' => '',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'date_fields' => array(
'node_data_field_eventdatetime.field_eventdatetime_value' => 'node_data_field_eventdatetime.field_eventdatetime_value',
),
'date_method' => 'OR',
'granularity' => 'day',
'form_type' => 'date_select',
'default_date' => 'now',
'default_to_date' => '',
'year_range' => '-3:+3',
'id' => 'date_filter',
'table' => 'node',
'field' => 'date_filter',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('style_plugin', 'ical');
$handler->override_option('style_options', array(
'mission_description' => FALSE,
'description' => '',
'summary_field' => 'title',
'description_field' => 'teaser',
'location_field' => '',
));
$handler->override_option('row_plugin', '');
$handler->override_option('path', 'calendar/ical');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
$handler->override_option('displays', array(
'calendar_1' => 'calendar_1',
'default' => 0,
'calendar_block_1' => 'calendar_block_1',
));
$handler->override_option('sitename_title', FALSE);
$handler = $view->new_display('block', 'Upcoming', 'block_1');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'field' => 'title',
'table' => 'node',
'relationship' => 'none',
'format' => 'default',
),
));
$handler->override_option('arguments', array());
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'date_filter' => array(
'operator' => '>=',
'value' => array(
'min' => NULL,
'max' => NULL,
'value' => NULL,
'default_date' => 'now',
'default_to_date' => '',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'date_fields' => array(
'node_data_field_eventdatetime.field_eventdatetime_value' => 'node_data_field_eventdatetime.field_eventdatetime_value',
),
'date_method' => 'OR',
'granularity' => 'day',
'form_type' => 'date_select',
'default_date' => 'now',
'default_to_date' => '',
'year_range' => '-3:+3',
'id' => 'date_filter',
'table' => 'node',
'field' => 'date_filter',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('items_per_page', 5);
$handler->override_option('use_more', 1);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
'grouping' => '',
'type' => 'ul',
));
$handler->override_option('block_description', 'Upcoming');
$handler->override_option('block_caching', -1);

#13

richard.e.morton - May 3, 2009 - 19:30

Hi MarkDrupal,

Could you confirm that there is no risk in implementing the dev version on our live site?

Thanks

R

#14

markDrupal - May 3, 2009 - 19:40

No there is some risk. However, It works fine for me. I suggest you test it on a test version of your website. or make a copy of your files and database and try it out, if it dosen't work you'll have to roll back to your backups losing any new content that was added to the site while you were testing.

#15

mroswell - May 6, 2009 - 00:01

I'm getting empty iCals on Drupal 5.x sites. Should I open a separate issue for that?

I've seen a number of postings about this throughout history, but they've been closed. (Are we giving up on Drupal 5 iCal support? I've got an iCal recipe in my D5 book which used to work, which is why I'm asking. I have a few days to decide whether to leave it in, or not.)

#16

KarenS - May 6, 2009 - 10:32

If you look at the commit logs for both Date and Calendar you'll see lots of recent commits to the D5 branch, so I'm not giving up support (although it definitely doesn't get handled as quickly). But yes, there needs to be a separate issue for the D5 version because the Calendar code in D5 and D6 is totally and completely different (because Views 1 and Views 2 are totally and completely different).

#17

jrb - May 7, 2009 - 16:56

The problem in D6 seems to be that $this->view->date_info->max_date is not being set correctly-- it's being set to the current date. So, when it loops through the items in calendar_build_nodes(), it ignores all of the items because they're not in the correct date range.

It looks like the $this->view->date_info->max_date is set back in calendar_plugin_style_ical->render() (in calendar/calendar_ical/calendar_plugin_style_ical.inc). Around line 190, there's some code to handle an empty min_date that sets both the min_date and max_date.

          if (empty($filter->min_date)) {
            $value = $filter->default_value('value');
            $range = $filter->date_handler->arg_range($value);
            $filter->min_date = $range[0];
            $filter->max_date = $range[1];
          }

It's here that the max_date is set to today. I was able to get this working by setting the max_date to a date in the future.

          if (empty($filter->min_date)) {
            $value = $filter->default_value('value');
            $range = $filter->date_handler->arg_range($value);
            $filter->min_date = $range[0];
            $filter->max_date = $range[1];
            // add this line
            date_date_set($filter->max_date, $this->view->date_info->max_allowed_year, 12, 31);
          }

This is very much a hack, but it does seem to work. I'm not sure what the real solution is.

#18

markDrupal - May 7, 2009 - 18:20

I've been trying to figure this out as I have some similar problems. (I'm using the "Node:Updated Time" as my date filter, the node is a blog post and it has no CCK date field). For some reason the $rrule_field is set to "node_changed" but there is no rrule set since we aren't dealing with a date field... here's what I found:

I think there might be an issue with calendar.inc, arround line 314

<?php
    $alias       
= $field['query_name'];
   
$field_name   = $field['field_name'];
   
$fromto       = $field['fromto'];
   
$tz_handling  = $field['tz_handling'];
   
$label        = isset($view->field[$name]) ? $view->field[$name]['label'] : $field['field_name'];
   
$tz_alias     = str_replace('.', '_', $field['timezone_field']);
   
$db_tz        = date_get_timezone_db($field['tz_handling']);
   
$local_tz     = date_get_timezone($field['tz_handling'], 'date');
   
$field_name   = $field['field_name'];
   
$rrule_field  = str_replace(array('_value2', '_value'), '_rrule', $alias);
  
   
// Set a flag to tell us if individual multi-day dates need to be
    // split into separate nodes.
?>

The $rrule_field gets set to "node_changed"

<?php
    $rrule_field 
= str_replace(array('_value2', '_value'), '_rrule', $alias);
?>

The $rrule_field is "node_changed" for every element in the view, so around line 370, the "continue" statement is executed all but one time, causing my ical feed to only show one value... Question is why is the $rrule_field value set to "node_changed"?

<?php
     
// When creating iCal feeds for repeating dates we don't want all
      // the multiple values, send only the first value.
     
if (strstr($view->current_display, '_ical') && !empty($rrule_field) && !empty($item->$rrule_field)) {
        if (!
in_array($rrule_field, $rrule_processed)) {
         
$rrule_processed[] = $rrule_field;
        }
        else {
          continue;
        }
      }
?>

Commenting out the "continue;" line fixes it and all my dates show up in the ical feed.

<?php
     
// When creating iCal feeds for repeating dates we don't want all
      // the multiple values, send only the first value.
     
if (strstr($view->current_display, '_ical') && !empty($rrule_field) && !empty($item->$rrule_field)) {
        if (!
in_array($rrule_field, $rrule_processed)) {
         
$rrule_processed[] = $rrule_field;
        }
        else {
        
// continue;
       
}
      }
?>

#19

markDrupal - May 7, 2009 - 18:18

A similar assignment to $rrule_field is in the theme.inc file on line 57ish

<?php
node_invoke_nodeapi
($node, 'ical item');
    unset(
$node->view);
   
$rrule_field = str_replace(array('_value2', '_value'), '_rrule', $node->datefield);
   
$event = array();
   
$event['summary'] = strip_tags($node->$summary_field);
?>

#20

markDrupal - November 10, 2009 - 18:19

==UPDATE==
The patch is in comment #26: #446614-26: iCal empty

I found that changing calendar.inc (and theme.inc) fixes my problem.

Change this 1 line

<?php
    $rrule_field 
= str_replace(array('_value2', '_value'), '_rrule', $alias);
?>

to these 4 lines

<?php
    $rrule_field 
= str_replace(array('_value2', '_value'), '_rrule', $alias, $count);
    if(!
$count){
     
$rrule_field = NULL;
    }
?>

#21

markDrupal - November 11, 2009 - 18:10
Component:Code» iCal export
Status:active» needs review

see patch in #20 #26

#22

pdcarto - May 18, 2009 - 14:22

To clarify, @markDrupal, you're referring to?...
calendar/calendar_ical/theme.inc:57:

<?php
$rrule_field
= str_replace(array('_value2', '_value'), '_rrule', $node->datefield);
?>

--and--
calendar/includes/calendar.inc:315:
<?php
$rrule_field 
= str_replace(array('_value2', '_value'), '_rrule', $alias, $count);
?>

In each case you are adding a third parameter, $count, which does not seem to have a corresponding field in the array (note: I'm a php newb, so maybe this is ok).

In any case, I'm not getting any change in behavior after applying your two code changes - the iCal feed view shows no nodes (however the iCal view preview sql, when tested in phpmyadmin, does generate the right number of rows).
(I'm using a CCK date field - not node:updated time)

#23

markDrupal - May 18, 2009 - 19:13

The $count value is a variable in the function "str_replace()" function, it counts how many replacements that were made. In my case it was 0.

<?php
  str_replace
($search, $replace, $subject, &$count);
?>

#24

TwoD - May 23, 2009 - 23:10

I can confirm that the changes in #20/#22 makes all the expected calendar entries show up in the feed.

#25

markDrupal - May 24, 2009 - 16:54
Status:needs review» reviewed & tested by the community

#26

markDrupal - May 28, 2009 - 22:19

Here is a proper patch, any reason this shouldn't be added to CVS?

AttachmentSize
Calendar.Fix_.Ical_.patch 2.01 KB

#27

tirsales - May 29, 2009 - 10:58

Works partly - calendar entries are shown, but only with the corresponding date, no time-information is included. (I have another issue with Calendar, so this could very well be unrelated).

Thanks for the patch. On a minor note: it looks like you created the patch with relative dirs assuming that Calendar can be found within contributions/modules/calendar/, shouldnt the patch be relative to calendar itself?

--edit: Works perfectly.

#28

TwoD - May 29, 2009 - 15:12

Ah, I see that now too. The iCal feed contains the dates but not times of entries in the DATE-TIME fields.

I also have another time-related problem on my calendar displays: The entries are not grouped by anything on the day-view. The entire left column is empty, while it used to contain one row for each hour/half hour etc.
I have no idea if that's related though since I forgot to check if it was like that before applying the patch.

#29

markDrupal - June 5, 2009 - 19:45

I noticed the missing times in day-view as well. I'm not certain if it is a side effect of this patch.

I just confirmed that my ical feed has both dates + dates/times maybe my patch to my date module fixed it for me. #370092-27: All-day event support for ical

Another thing you should check is if the end date in your ical program is correct. I was finding all my events in Drupal displayed correctly but in the external ical program the days end 24 hours early...

I patched that problem in the patch #370092-27: All-day event support for ical

#30

markDrupal - May 29, 2009 - 15:53

I patched it from the CVS repository... Not sure what command line flags I should use to make the paths correct.

However, I know you can do a

patch -p3 < MY-patch.patch
to make it relative to the calendar directory

#31

beckyjohnson - June 5, 2009 - 03:35

I think I am having the same problem. this is what i see when i preview my ical:
BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-WR-CALNAME: Calendar | WiMAX Forum
PRODID:-//Drupal iCal API//EN
END:VCALENDAR

When I click the ical icon, it goes to my calendar with the right date but no title for the event. Is the patch up on #26 still relevant or is it the fix on #29 that i need to use?

Becky

#32

markDrupal - June 5, 2009 - 19:46

Yeah that was a bit confusing, I removed the patch in #29 because it was just a side note. Use the patch in #26.
If it works for you, let us know, maybe if more people test this patch, it will get committed.

#33

beckyjohnson - June 5, 2009 - 23:36

The first part of the patch looked iike it was for file calendar_plugin_style_ical.inc but I couldn't find the right lines to start editing. I couldn't find this line to edit: $rrule_field = str_replace(array('_value2', '_value'), '_rrule', $node->datefield);

Am I editing the right file? Sorry if this is stupid sounding....i've only applied patches a few times..

Becky

#34

markDrupal - June 6, 2009 - 04:19

there are only 2 files to patch,
from your modules directory go to
calendar/calendar_ical/theme.inc

patch the first chunk of code )Change 1 line, add 3 lines of code)

then go to the file
calendar/includes/calendar.inc

again patch the file, change 1 line add 3 lines of code
good luck

BTW, to read the patch file

@@ -310,7 +310,10 @@

that means go to line 310 and look for those bits of code

#35

beckyjohnson - June 8, 2009 - 15:46

Ok, I applied the patch properly and got nothing. In fact, now when I click on the ical icon, it acts like it wants to put something on the calendar but nothing gets put on.
Here is what I see in views preview:
BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
X-WR-CALNAME: WiMAX Forum and Industry Events | WiMAX Forum
PRODID:-//Drupal iCal API//EN
END:VCALENDAR

Here is a link to the calendar so you can try it out. This is our beta site so it looks messy as I'm working on different projects:

http://beta.wimaxforum.org/calendar
Here is my view:

$view = new view;
$view->name = 'calendar';
$view->description = 'A multi-dimensional calendar view with back/next navigation.';
$view->tag = 'Calendar';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'field' => 'title',
    'table' => 'node',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'field_event_date_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'short',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => TRUE,
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_event_date_value',
    'table' => 'node_data_field_event_date',
    'field' => 'field_event_date_value',
    'relationship' => 'none',
  ),
  'field_long_description_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'plain',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 1,
    'id' => 'field_long_description_value',
    'table' => 'node_data_field_long_description',
    'field' => 'field_long_description_value',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('sorts', array(
  'changed' => array(
    'order' => 'ASC',
    'delta' => '-1',
    'id' => 'changed',
    'table' => 'node',
    'field' => 'changed',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'date_argument' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'default_argument_type' => 'date',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'date_fields' => array(
      'node_data_field_event_date.field_event_date_value' => 'node_data_field_event_date.field_event_date_value',
    ),
    'year_range' => '-3:+3',
    'date_method' => 'OR',
    'granularity' => 'month',
    'id' => 'date_argument',
    'table' => 'node',
    'field' => 'date_argument',
    'relationship' => 'none',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'webform' => 0,
      'blog' => 0,
      'poll' => 0,
      'image' => 0,
      'about' => 0,
      'analyst_reports' => 0,
      'case_studies' => 0,
      'certification' => 0,
      'course' => 0,
      'course_instance' => 0,
      'dashboard' => 0,
      'documentation' => 0,
      'feed' => 0,
      'industry_news' => 0,
      'ipr' => 0,
      'membership' => 0,
      'mobile_operator_profiles' => 0,
      'page' => 0,
      'press_front_page' => 0,
      'press_release' => 0,
      'product_showcase' => 0,
      'profile' => 0,
      'regional' => 0,
      'regulator' => 0,
      'staff' => 0,
      'story' => 0,
      'technical_document' => 0,
      'training' => 0,
      'vendor_stories' => 0,
      'white_papers' => 0,
      'wimax_events' => 0,
      'working_groups' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '17' => 0,
      '18' => 0,
      '2' => 0,
      '12' => 0,
      '4' => 0,
      '3' => 0,
      '10' => 0,
      '11' => 0,
      '7' => 0,
      '13' => 0,
      '6' => 0,
      '15' => 0,
      '8' => 0,
      '16' => 0,
      '5' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_php' => '',
    'override' => array(
      'button' => 'Override',
    ),
    'default_options_div_prefix' => '',
    'user_argument_type' => '',
    'restrict_user_roles' => 0,
    'user_roles' => array(),
    'validate_argument_node_flag_name' => '*relationship*',
    'validate_argument_node_flag_test' => 'flaggable',
    'validate_argument_node_flag_id_type' => 'id',
    'validate_argument_user_flag_name' => '*relationship*',
    'validate_argument_user_flag_test' => 'flaggable',
    'validate_argument_user_flag_id_type' => 'id',
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => 1,
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'wimax_events' => 'wimax_events',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
  'role' => array(),
  'perm' => '',
));
$handler->override_option('title', 'Calendar');
$handler->override_option('header_empty', 1);
$handler->override_option('items_per_page', 0);
$handler->override_option('use_more', 0);
$handler->override_option('style_plugin', 'calendar_nav');
$handler = $view->new_display('calendar', 'Calendar page', 'calendar_1');
$handler->override_option('path', 'calendar');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));
$handler->override_option('calendar_colors', array(
  '0' => array(),
));
$handler->override_option('calendar_colors_vocabulary', array());
$handler->override_option('calendar_colors_taxonomy', array());
$handler->override_option('calendar_popup', 0);
$handler->override_option('calendar_date_link', '');
$handler = $view->new_display('calendar_block', 'Calendar block', 'calendar_block_1');
$handler->override_option('block_description', 'Calendar');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('calendar_period', 'Year view', 'calendar_period_1');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'display_type' => 'year',
  'name_size' => 1,
  'max_items' => 0,
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 'calendar_1',
  'default' => 0,
  'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'year');
$handler = $view->new_display('calendar_period', 'Month view', 'calendar_period_2');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'display_type' => 'month',
  'name_size' => '99',
  'with_weekno' => '1',
  'date_fields' => NULL,
  'max_items' => 0,
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 'calendar_1',
  'default' => 0,
  'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'month');
$handler = $view->new_display('calendar_period', 'Day view', 'calendar_period_3');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'name_size' => '99',
  'with_weekno' => 0,
  'max_items' => 0,
  'max_items_behavior' => 'more',
  'groupby_times' => 'hour',
  'groupby_times_custom' => '',
  'groupby_field' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 'calendar_1',
  'default' => 0,
  'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'day');
$handler = $view->new_display('calendar_period', 'Week view', 'calendar_period_4');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'name_size' => '99',
  'with_weekno' => 0,
  'max_items' => 0,
  'max_items_behavior' => 'more',
  'groupby_times' => 'hour',
  'groupby_times_custom' => '',
  'groupby_field' => '',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 'calendar_1',
  'default' => 0,
  'calendar_block_1' => 0,
));
$handler->override_option('calendar_type', 'week');
$handler = $view->new_display('calendar_period', 'Block view', 'calendar_period_5');
$handler->override_option('style_plugin', 'calendar_style');
$handler->override_option('style_options', array(
  'display_type' => 'month',
  'name_size' => '1',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', TRUE);
$handler->override_option('inherit_exposed_filters', TRUE);
$handler->override_option('displays', array(
  'calendar_1' => 0,
  'default' => 0,
  'calendar_block_1' => 'calendar_block_1',
));
$handler->override_option('calendar_type', 'month');
$handler = $view->new_display('calendar_ical', 'iCal feed', 'calendar_ical_1');
$handler->override_option('fields', array(
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'field' => 'title',
    'table' => 'node',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'field_event_date_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'short',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => TRUE,
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'exclude' => 0,
    'id' => 'field_event_date_value',
    'table' => 'node_data_field_event_date',
    'field' => 'field_event_date_value',
    'relationship' => 'none',
  ),
  'field_long_description_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'plain',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 1,
    'id' => 'field_long_description_value',
    'table' => 'node_data_field_long_description',
    'field' => 'field_long_description_value',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('arguments', array());
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => 1,
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'date_filter' => array(
    'operator' => '>=',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => 'now',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'date_fields' => array(
      'node.changed' => 'node.changed',
    ),
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => 'now',
    'default_to_date' => '',
    'id' => 'date_filter',
    'table' => 'node',
    'field' => 'date_filter',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('style_plugin', 'ical');
$handler->override_option('style_options', array(
  'mission_description' => FALSE,
  'description' => '',
  'summary_field' => 'title',
  'description_field' => 'field_long_description_value',
  'location_field' => '',
));
$handler->override_option('row_plugin', '');
$handler->override_option('path', 'calendar/ical');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));
$handler->override_option('displays', array(
  'calendar_1' => 'calendar_1',
  'default' => 0,
  'calendar_block_1' => 'calendar_block_1',
));
$handler->override_option('sitename_title', FALSE);
$handler = $view->new_display('block', 'Upcoming', 'block_1');
$handler->override_option('fields', array(
  'title' => array(
    'label' => '',
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'field' => 'title',
    'table' => 'node',
    'relationship' => 'none',
    'format' => 'default',
  ),
  'changed' => array(
    'label' => '',
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'changed',
    'field' => 'changed',
    'table' => 'node',
    'relationship' => 'none',
    'date_format' => 'small',
    'format' => 'default',
  ),
));
$handler->override_option('arguments', array());
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => 1,
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'date_filter' => array(
    'operator' => '>=',
    'value' => array(
      'value' => NULL,
      'min' => NULL,
      'max' => NULL,
      'default_date' => 'now',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'date_fields' => array(
      'node.changed' => 'node.changed',
    ),
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => 'now',
    'default_to_date' => '',
    'id' => 'date_filter',
    'table' => 'node',
    'field' => 'date_filter',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('title', 'Upcoming');
$handler->override_option('items_per_page', 5);
$handler->override_option('use_more', 1);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
  'grouping' => '',
  'type' => 'ul',
));
$handler->override_option('block_description', 'Upcoming');
$handler->override_option('block_caching', -1);

Becky

#36

richard.e.morton - June 8, 2009 - 20:29

Hi,

I have just updated my site; all apart from D6core, to the latest versions and now the iCal feed seems to be correct.

I have just updated;
cck
content_taxonomy
date
em_field
mail_edit
rules
taxonomy_access
token
xmlsitemap

ok, I know I was brash in upgrading all the modules together; but the outcome is that the iCal is working. I guess it is the update to Date that has fixed it.

Thanks

maybe I am imagining it?/?? I will test it again tomorrow!

Richard

#37

beckyjohnson - June 8, 2009 - 20:43

what version of date are you running? I am running the latest dev version for D6 because there was another bug with the official version of date for d6 that was causing other issues.

Becky

#38

richard.e.morton - June 8, 2009 - 20:52

Hi Becky,

Date 2.2

R

P.S. what issues was the official version causing and what version was it?

#39

beckyjohnson - June 8, 2009 - 22:38

I'm using 6.x-2.x-dev and this was the issue: http://drupal.org/node/426990 (Views filter "Date (field_event_date) - From date >= now" doesn't work anymore?)

I should update to 6.X -2.2 and see how it works, though.
Becky

#40

beckyjohnson - June 9, 2009 - 19:40

I upgraded date, views and calendar and I still have a blank ical..... I am going to test it some more and then try applying the patch again.

Becky

#41

beckyjohnson - June 9, 2009 - 19:48

Here are a couple screenshots of my view. Maybe there is something subtle going on....

Becky

AttachmentSize
Picture 26.png 76.71 KB
Picture 25.png 33.75 KB

#42

FoolsRun - July 10, 2009 - 14:03

I think this problem is similar to mine: iCal Feed Not Showing Repeating Events Which Start Before The View Window.

I made a similar investigation to the one in #18 and ended up commenting out the entire section where mark only comments out "continue".

I believe the problem, as I noted in my issue, is related to repeating events which neither begin nor end during the iCal feed's filtered "window" ("now plus 60 days", or whatever) because events which have no repeating data, or events where the first occurrence appears within the feed's "window" seem to show up fine, but events that begin and/or end outside the filter seem to be the ones that fail to show up.

markDrupal's suggestion to comment out the "continue" line in #18 of this thread has fixed my issues more cleanly than my solution did, but it basically overrides the RRULEs, causing the iCal feed to contain a VEVENT entry for each recurrence of an event.

#43

FoolsRun - July 10, 2009 - 14:18

Another note, the patches in #20 did not work for me --my feed still only contained events that started during the filter's window, so I'm back to commenting out "continue" as noted in #18.

#44

KarenS - July 28, 2009 - 20:09
Status:reviewed & tested by the community» needs work

I'm looking for patches that are ready to apply and there are several comments that indicate there may still be problems here, so re-classifying. I will try to come back later and review, but I can't commit it yet.

#45

misterlawrence - August 14, 2009 - 01:39

subscribe.

#46

milkmiruku - August 14, 2009 - 06:39

i had this problem - i've just switched the iCal display Filters from Override to Default, turned my calendar.ics from 123b to 10.9Kb, woo.

@beckyjohnson; from your screen shot, you might wanna try that. your filter is set so that it only displays events with an updated date greater than now.

#47

beckyjohnson - August 14, 2009 - 17:56

Thanks, I"ll try what you suggest and modify my filter maybe.

#48

nowrap - August 31, 2009 - 10:06

Ahoy!
Is there any progress on this bug?
I tried the latest stable und dev version. Our ical is still empty ;(
Within the admin preview one normal test event is shown, but no repeating events at all.
All other views are rendered correctly.

Any suggestions?

Regards
.nowrap

#49

dugh - September 8, 2009 - 15:27

I see the same issue with latest version of date and calendar modules.

I tested the patch from #26 on a local server and still no change.

OK, now I edited the calendar view, click on the 'ical feed', and click on the node:published filter and clicked 'use default' and then saved the view (like mentioned a couple of posts above), and now the ical feed has some stuff in it.

#50

kirkhings - September 16, 2009 - 18:09

I just wrestled with this for the past hour and had a 'derrr' epiphany. Sharing just cuz it's an easy head slapper that may help someone else.

In the iCal feed view section, our filter was set on updated NODE date being greater than or equal to now, when actually we needed the EVENT date being greater than or equal to now. Then I got fancy and set the event TO date so we display events still in progress.

Simple, yet critical.

#51

rolfmeijer - October 9, 2009 - 12:06

subscribing

#52

Gribnif - October 19, 2009 - 15:49

#53

bwynants - October 20, 2009 - 11:11

iCal users should also check out #567614: ical does not parse files with EXDATE

#54

sp3boy - November 9, 2009 - 11:13

For what it's worth, I have also found that with a brand-new installation of Drupal 6.14 and Calendar DEV, I only get one item in the iCal export unless I put in the patch in #20.

I have another frustrating problem with my own theme inhibiting the availability of template_preprocess_views_view_field() from sites/all/modules/views/theme/theme.inc during the iCal field output theming, resulting in an empty feed, but that's still under investigation.

#55

sp3boy - November 11, 2009 - 10:36

I think the reason my own theme was causing the iCal output to be empty (same problem as #35?) is due to a theme building issue documented (and possibly fixed) in #591804: Theme registry build bug: External file with template_preprocess is not loaded if tpl.php is copied into theme. The incorrect handling of 'include' file paths was stopping the sites/all/modules/views/theme/theme.inc from being picked up during theme registry processing and the presence in my theme of a custom theme preprocess function for the preprocess_views_view_field hook was preventing the Views theme.inc from being included at a later stage in the theme() function of mysite/include/theme.inc (I think).

So if you're not getting iCal output normally, but it works under the Garland theme, that could be why. I now have my output thanks to the patch in #20 #26 and the patch in #591804: Theme registry build bug: External file with template_preprocess is not loaded if tpl.php is copied into theme.

#56

sp3boy - November 20, 2009 - 15:02

For information, there are now two patches from #591804: Theme registry build bug: External file with template_preprocess is not loaded if tpl.php is copied into theme that are linked to the "no iCal output" problem - or my attempt to resolve this problem. The first is essential as it affects <site>/includes/theme.inc, the second one is only required if you are using the theme developer part of Devel.

 
 

Drupal is a registered trademark of Dries Buytaert.