• I have an RSS importer that is attached to a "Feed importer" node type.
  • I have a CSV importer that is not attached to a node type.
  • The CSV importer creates "Feed importer" nodes.
  • The CSV importer maps a "Website Address" column in the CSV to the "Feed source" field in the "Field importer" node type.
  • I ran the CSV import and it created lots of "Feed importer" nodes. Good.
  • I ran CRON in order to execute RSS imports through all of the newly created "Feed importer" nodes but no articles were created.
  • I edited and resaved a "Feed importer" node without making any changes and ran CRON again. This time, articles were imported from the relevant RSS feed.
  • I tried this on several other "Feed importer" nodes and got the same result.

It looks like importing URLs and mapping them to the "Feed source" field does not leave that field in a useful state for importing articles from RSS.

Note: The imported URLs point at home pages, not necessarily the exact feed URL.

Comments

twistor’s picture

Status: Active » Postponed (maintainer needs more info)

What does "The imported URLs point at home pages, not necessarily the exact feed URL." mean?

crantok’s picture

It means that the URL that is imported in to the "Feed source" field may contain a home page URL e.g. example.com, rather than the feed URL, e.g. example.com/feed

I am using the following setting in my RSS feed importer (that uses the imported URL):

Settings for HTTP Fetcher

Auto detect feeds
If the supplied URL does not point to a feed but an HTML document, attempt to extract a feed URL from the document.

crantok’s picture

Status: Postponed (maintainer needs more info) » Active

Oops, forgot to set active again.

Was that enough information?

MegaChriz’s picture

Is the "Import on submission" option (from "Basic settings") activated on the RSS importer?

If so, it's possible the import isn't scheduled when a "Feed importer" node is created programmatically.

crantok’s picture

Yes, "Import on submission" is checked.

MegaChriz’s picture

Forget the "Import on submission" option. That is used to start the import directly when a node is created, which you probably don't want anyway.

When I scan through feeds.module I see that in feeds_node_insert() an import of a feed node is only scheduled when $node->feeds is available. Looking further, I see the following comment in feeds_node_validate():

// Node module magically moved $form['feeds'] to $node->feeds :P.

This leaves me to think that the variable is only set when submitting the feeds import form manually.

There is also a static variable called "feeds_node_last_feeds", where $node->feeds is eventually set from in feeds_node_presave(), but this static variable seem to be only set in feeds_node_validate().

twistor’s picture

@MegaChriz, see FeedsNodeProcessor::setTargetElement(). When mapping to feeds_source, the $node->feeds[] array gets populated.

aaronpinero’s picture

Hello,

It is unclear to me if there was a resolution on this issue. I'm having the same issue. I cannot seem to get the import attached to the Feed importer nodes to run when those nodes are created, even when I have the "Import on submission" option checked for the importer. I would very much like to have the feed import run as soon as the feed importer nodes are created.

Thank you.