Related: Schedule Migrate to import XML data regularly

I am getting duplicate nodes every time I try to do a rollback/update. Is it because they are triggered when users visit the page (instead of me), or does it have something to do with my MigrateSQLMap?

EDIT I have come up with a sort of workaround for this: I need to, instead of doing a rollback/migrate, I need to do something like what I outlined below. I just don't know how to put it together. Each source item in the XML has an ID, which I have/will import ad the field_sourceid in the node.

Here are the steps I need:

  1. Grab all source IDs of the nodes and source IDs of the XML
  2. Check them against each other:

    • If the node's SourceID isn't matched in the XML, that means that node is expired. Delete it.
    • If there is a Source ID in the XML but nothing matching in the nodes, then this is a new node. Import it.
    • If the SourceID exists in the XML, we have a current node. Update it.

It was my understanding that you could not declare prepareRow() when you use XMLMigration. What do I do then? It seems like I need something like that here.

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.