0

I'm trying to import events to a calendar from an external ics.. I installed the Calendar module with the Feeds module. Unfortunately it creates the whole time new nodes. Even if the UID is unique (mapped to field field_gimme_uid) in the node. Update nodes is setted 'on'. I have checked everything but everything seems alright. The unique field is correctly imported (and the same for multiple nodes)..

I have a contenttype "Evenement" with the following fields:

  • Evenement (title)
  • Datum (field_event_date) Date
  • Gimme-UID (field_gimme_uid) Text

I have a feed that maps the ics import to the nodes

$feeds_importer = new stdClass();
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'ics_importer';
$feeds_importer->config = array(
  'name' => 'Gimme Agenda',
  'description' => 'Gimme agenda importeren van het account website',
  'fetcher' => array(
    'plugin_key' => 'FeedsHTTPFetcher',
    'config' => array(
      'auto_detect_feeds' => 0,
      'use_pubsubhubbub' => 0,
      'designated_hub' => '',
      'request_timeout' => '',
      'auto_scheme' => '',
      'accept_invalid_cert' => 0,
      'cache_http_result' => 1,
    ),
  ),
  'parser' => array(
    'plugin_key' => 'DateiCalFeedsParser',
    'config' => array(
      'indefinite_count' => '52',
      'indefinite_message_display' => TRUE,
      'until_not_utc' => FALSE,
      'skip_days' => NULL,
    ),
  ),
  'processor' => array(
    'plugin_key' => 'FeedsNodeProcessor',
    'config' => array(
      'expire' => '-1',
      'author' => '1',
      'authorize' => 1,
      'mappings' => array(
        0 => array(
          'source' => 'SUMMARY',
          'target' => 'title',
          'unique' => 0,
          'language' => 'und',
        ),
        1 => array(
          'source' => 'DTSTART',
          'target' => 'field_event_date:start',
          'unique' => FALSE,
          'language' => 'und',
        ),
        2 => array(
          'source' => 'DTEND',
          'target' => 'field_event_date:end',
          'unique' => FALSE,
          'language' => 'und',
        ),
        3 => array(
          'source' => 'UID',
          'target' => 'field_gimme_uid',
          'unique' => TRUE,
          'language' => 'und',
        ),
      ),
      'insert_new' => '1',
      'update_existing' => '1',
      'update_non_existent' => 'skip',
      'input_format' => 'plain_text',
      'skip_hash_check' => 0,
      'bundle' => 'evenement',
      'language' => 'und',
    ),
  ),
  'content_type' => '',
  'update' => 0,
  'import_period' => '900',
  'expire_period' => 3600,
  'import_on_create' => 1,
  'process_in_background' => 1,
);

My modules:

  • Drupal 7.56
  • Calendar module 7.x-3.5
  • Date 7.x-2.10
  • Date iCal 7.x-3.9
  • Feeds 7.x-2.0-beta4

My ICS that I use to import can you find here

Why is it importing the whole time the same nodes?

0

My bad! The "Unique" option in the feeds module isn't working without the module "Field Validation". I added an unique rule to the contenttype "evenement" and now it works like a charm!

0

The "Unique" option in the feeds module is working out-of-the-box only with title field. If you're using another field - you need "field validation" module

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.