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 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
Comment #1
twistor CreditAttribution: twistor commentedWhat does "The imported URLs point at home pages, not necessarily the exact feed URL." mean?
Comment #2
crantok CreditAttribution: crantok commentedIt 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):
Comment #3
crantok CreditAttribution: crantok commentedOops, forgot to set active again.
Was that enough information?
Comment #4
MegaChriz CreditAttribution: MegaChriz commentedIs 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.
Comment #5
crantok CreditAttribution: crantok commentedYes, "Import on submission" is checked.
Comment #6
MegaChriz CreditAttribution: MegaChriz commentedForget 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 infeeds_node_validate()
: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 infeeds_node_presave()
, but this static variable seem to be only set infeeds_node_validate()
.Comment #7
twistor CreditAttribution: twistor commented@MegaChriz, see FeedsNodeProcessor::setTargetElement(). When mapping to feeds_source, the $node->feeds[] array gets populated.
Comment #8
aaronpinero CreditAttribution: aaronpinero commentedHello,
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.