2

I have a content type that references nodes of the same content type (using References module).

So example nodes might look like this:

Title   Body       See also (Node reference)
AAA     Testing    CCC 
BBB     Testing 
CCC     Testing    AAA, BBB

I'm pulling all of this information from an XML feed using Feeds Node processor. The problem is that when creating node AAA, node CCC hasn't been created yet so the reference field doesn't populate.

Do I need to create a second importer - but can two importers update the same nodes? I also had a look at Feeds Self Node Processor but don't think that's the answer.

5

Two importers can work on the same nodes without any problem, but that's not what you need. Instead, You need to set the importer to update/overwrite existing nodes when they have the same GUID. Then you run the importer twice on the same xml file. The first time they won't be populated properly, but because they'll already exist the second time, the second run should fix it.

  • +1 This is exactly how commerce feeds works. If you want to create products and product displays (product displays reference products) you import the same xml file twice. – Mike Apr 25 '13 at 22:12
1

Importing twice the same xml won't work because feeds store a hash of each item to be sure it has changed. The better will be to order the items to be imported to have referenced item loaded before. Otherwise, you should empty the table 'feeds_item'.

1

just run it without the reference column first... then all the nodes will be there... update the nodes with a second run to add the reference column. I think you need GUID to ensure that it updates the same field rather than make a new one as well as changing the importer settings to update the node rather than replace it.

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.