Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to get an ical view working but as result for DTSTART and DTEND I get the current date, without time:
DTSTAMP:20110301T125741Z
DTSTART:20110301Z
DTEND:20110301Z
1298970999
Any ideas? I use, Calendar 6.x-2.4, Date 6.x-2.7, Views 6.x-2.12.
The query looks like this:
SELECT node.nid AS nid,
node.title AS node_title,
node_revisions.teaser AS node_revisions_teaser,
node_revisions.format AS node_revisions_format,
node_data_field_datum.field_datum_value AS node_data_field_datum_field_datum_value,
node_data_field_datum.field_datum_value2 AS node_data_field_datum_field_datum_value2,
node.type AS node_type,
node.vid AS node_vid,
node.changed AS node_changed
FROM node node
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
LEFT JOIN content_type_activiteit node_data_field_datum ON node.vid = node_data_field_datum.vid
WHERE ((node.status <> 0) AND (node.nid = 18))
AND (DATE_FORMAT(ADDTIME(FROM_UNIXTIME(node.changed), SEC_TO_TIME(3600)), '%Y-%m-%d') >= '2008-01-01')
ORDER BY node_changed ASC
</>
The export of the relevant part of the view:
<code>
$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', '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,
'name' => 'navigation',
));
$handler->override_option('displays', array(
'default' => 0,
'calendar_1' => 0,
'calendar_block_1' => 0,
'block_1' => 0,
'block_2' => 0,
));
$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',
),
'field_datum_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'long',
'multiple' => array(
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
'group' => '',
),
'repeat' => array(
'show_repeat_rule' => '',
),
'fromto' => array(
'fromto' => 'both',
),
'exclude' => 0,
'id' => 'field_datum_value',
'table' => 'node_data_field_datum',
'field' => 'field_datum_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'changed' => array(
'order' => 'ASC',
'granularity' => 'minute',
'delta' => '-1',
'id' => 'changed',
'table' => 'node',
'field' => 'changed',
'relationship' => 'none',
'override' => array(
'button' => 'Use 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_datum.field_datum_value' => 'node_data_field_datum.field_datum_value',
),
'date_method' => 'OR',
'granularity' => 'hour',
'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',
),
));
Thank you very much for helping
Comments
Comment #1
unic CreditAttribution: unic commentedHas same bug.
Comment #2
ezra-g CreditAttribution: ezra-g commentedSetting priority back to normal as this is not a critical issue.
Comment #3
unic CreditAttribution: unic commentedOk, it's not a bug. It's misunderstanding. Just correct iCal feed display filters/arguments as you need.
Comment #4
gjones CreditAttribution: gjones commentedI thought I had this bug also, but realized it was my filters that were incorrect.
Comment #5
yan CreditAttribution: yan commented