1

I have three websites on the same domain and subdomains that has three different databases (sharing user tables though). All three has Events Content type and an Event calendar. My client would like to have one Event management area and it should display on all three website. Events also has their own page and so description/location/date.

My current solution is to expose the events using Feeds (generated from Views) on one site and consume it on other two sites on daily basis using Feed, Feed Importer, Feed Tempar, Feed XPath modules. Right now,

PROBLEM IS, Importing the feed is giving message "There is no new node", when in debug mode context show up empty, however, I set it to "//item". Please note that same feed has already been fetching and adding events few months ago.

Anyone can help? how can I debug the feed area? Is there away I can clean up the cache?

I setup another site and import the feed. It went well and fetched all the events. I then deleted all those events. Reimported the feed and none of the new event came up. Why is that? Can I make it fetch the new events again?

I am using Drupal 7.

Updates: Thanks for your interest.

Here is the partial Feed full feed can be viewed here.

<?xml version="1.0" encoding="utf-8" ?> <rss version="2.0" xml:base="http://example.com/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"> <channel> <title>Client Name</title>
 <link>http://example.com/</link>
 <atom:link rel="self" href="http://example.com/events/feed" />
 <language>en</language>
 <pubDate>Tue, 21 Apr 2015 14:32:45 +0000</pubDate>
 <lastBuildDate>Tue, 21 Apr 2015 14:32:45 +0000</lastBuildDate>
 <item> <title>Client Test Import Event</title>
 <link>http://example.com/event/clientnames-test-import-event</link>
 <description>Client Test Import Event Client Test Import Event Client Test Import Event Client Test Import Event</description>
 <category>Suth Huron</category>
 <guid isPermaLink="false">http://example.com/event/clientnames-test-import-event</guid>
 <pubDate>21 April, 2015 - 14:32</pubDate>
 <source url="http://example.com/events/feed">Client Name</source>
 <dc:date>2015-04-25 01:30:00 to 2015-04-25 15:30:00</dc:date>
</item>
 <item> <title>Earth Day BBQ</title>
 <link>http://example.com/event/earth-day-bbq</link>
 <category>Parkette in Exeter</category>
 <guid isPermaLink="false">http://example.com/event/earth-day-bbq</guid>
 <pubDate>15 April, 2015 - 19:40</pubDate>
 <source url="http://example.com/events/feed">Client Name</source>
 <dc:date>2015-04-22 15:00:00 to 2015-04-22 17:00:00</dc:date>
</item>

Importer code is

$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 = 'event_import';
$feeds_importer->config = array(
  'name' => 'Event Import',
  'description' => 'Import events from Other Website',
  'fetcher' => array(
    'plugin_key' => 'FeedsHTTPFetcher',
    'config' => array(
      'auto_detect_feeds' => FALSE,
      'use_pubsubhubbub' => FALSE,
      'designated_hub' => '',
      'request_timeout' => NULL,
    ),
  ),
  'parser' => array(
    'plugin_key' => 'FeedsXPathParserXML',
    'config' => array(
      'sources' => array(
        'xpathparser:0' => 'title',
        'xpathparser:1' => 'link',
        'xpathparser:2' => 'pubDate',
        'xpathparser:3' => 'description',
        'xpathparser:4' => 'category',
        'xpathparser:5' => 'dc:date',
        'xpathparser:6' => 'dc:date',
      ),
      'rawXML' => array(
        'xpathparser:3' => 'xpathparser:3',
        'xpathparser:0' => 0,
        'xpathparser:1' => 0,
        'xpathparser:2' => 0,
        'xpathparser:4' => 0,
        'xpathparser:5' => 0,
        'xpathparser:6' => 0,
      ),
      'context' => '//item',
      'exp' => array(
        'errors' => 1,
        'tidy' => 0,
        'tidy_encoding' => 'UTF8',
        'debug' => array(
          'context' => 'context',
          'xpathparser:0' => 'xpathparser:0',
          'xpathparser:1' => 'xpathparser:1',
          'xpathparser:2' => 'xpathparser:2',
          'xpathparser:3' => 'xpathparser:3',
          'xpathparser:4' => 'xpathparser:4',
          'xpathparser:5' => 'xpathparser:5',
          'xpathparser:6' => 'xpathparser:6',
        ),
      ),
      'allow_override' => 0,
    ),
  ),
  'processor' => array(
    'plugin_key' => 'FeedsNodeProcessor',
    'config' => array(
      'expire' => '-1',
      'author' => 0,
      'mappings' => array(
        0 => array(
          'source' => 'xpathparser:0',
          'target' => 'title',
          'unique' => 0,
        ),
        1 => array(
          'source' => 'xpathparser:1',
          'target' => 'url',
          'unique' => 0,
        ),
        2 => array(
          'source' => 'xpathparser:2',
          'target' => 'created',
          'unique' => FALSE,
        ),
        3 => array(
          'source' => 'xpathparser:3',
          'target' => 'field_body',
          'unique' => FALSE,
        ),
        4 => array(
          'source' => 'xpathparser:4',
          'target' => 'field_location',
          'unique' => FALSE,
        ),
        5 => array(
          'source' => 'xpathparser:5',
          'target' => 'field_date:start',
          'unique' => FALSE,
        ),
        6 => array(
          'source' => 'xpathparser:6',
          'target' => 'field_date:end',
          'unique' => FALSE,
        ),
      ),
      'update_existing' => '2',
      'input_format' => 'plain_text',
      'bundle' => 'event',
      'authorize' => 0,
      'skip_hash_check' => 0,
    ),
  ),
  'content_type' => '',
  'update' => 0,
  'import_period' => '1800',
  'expire_period' => 3600,
  'import_on_create' => 1,
  'process_in_background' => 0,
);

Same is working on another website. I think it might be some PHP errors during the process. but there are neither in Drupal Log nor in PHP error log.

  • There really isn't enough information to help you troubleshoot this. Can you export your importer and point to the RSS feed? If a new importer works as expected, why not purge the items, replace the importer, and reimport? – kreynen Apr 21 '15 at 20:02
  • @kreynen, updated the answer with xml and importer code. I am in process of creating new importer as you suggested, I tried to import the importer but initially, it raised errors "importer ID already exist" although it was a new ID. I used the "replace" option to make it import forcefully which in turn added a blank importer. :surprised: Something must be wrong.. – FatalError Apr 22 '15 at 15:34

Your Answer

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

Browse other questions tagged or ask your own question.