I was pulling my hair out attempting to get the --idlist flag to work with the URL migrate source plugin.

Tried to access the list of ids passed by the command line throughout all the migration classes and wasn't able to.

Currently working with a JSON migration that is pulled from an outside url.

Found this (attached patch) to be the best way to access the idlist from within the migration source / data parser plugins.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ccx105 created an issue. See original summary.

swiftsystems’s picture

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: -Drupal 8, -migrate, -migrate plus, -idlist

I haven't seen a problem with --idlist with XML/JSON migrations before - can you describe a little more what the issue is?

I'm not sure how adding "idlist" on the migration class helps, when there's nothing that reads it.

heddn’s picture

Version: 8.x-3.x-dev » 8.x-4.x-dev
Status: Postponed (maintainer needs more info) » Closed (duplicate)
Related issues: +#2798363: Implement --idlist options on rollback and messages
Ericmaster’s picture

Title: idlist not working with URL source plugin » Access MigrateExecutable object from Source Plugin
Version: 8.x-4.x-dev » 8.x-5.x-dev
Category: Bug report » Feature request
Status: Closed (duplicate) » Needs work
FileSize
553 bytes

I'm sorry for hijacking this closed ticket, but still needed this to optimize a custom source plugin and couldn't figure out a way to access the idlist so I can bypass some custom row processing when the id is not in the list, in case anyone is interested I re-rolled the patch for 8.x-5.x as a temporary solution. Thinking in the long term, maybe a way could be added (if there isn't one already that I haven't found yet) to access the MigrateExecutable object from the source plugin implementation?