I am trying to write a migrate source class (#1883112: Migrate SourceEntity? ), and so I've set up a test migration that works with it.
Because I don't want to create data, I've added a prepareRow() to my migration class which just returns FALSE, the idea being I can run this migration over and over again while outputting debug data, and get the source class right.
Unfortunately, after the first run of this, I don't get any results because of this:
// 4. At this point, we have a row which has previously been imported and
// not marked for update. If we're not using highwater marks, then we
// will not take this row.
elseif (empty($this->highwaterField)) {
// No highwater, skip
$this->currentRow = NULL;
continue;
}
Comments
Comment #1
mikeryanCan you explain a little more precisely the behavior that is getting in your way?
Thanks.
Comment #2
joachim commentedI'm not entirely sure myself -- this hit me when I was at that 'aaargh! firefighting!!!' stage of things, so I commented out the highwater bit just to get it to work :/
So, investigating more...
This is MigrateSource::next(), line 270 whose comment says:
Step 1 is skipped because there's no idList:
Step 2 looks like it SHOULD pass:
So it's quite likely that this problem happened because I did an test import with my prepareRow() deliberately returning FALSE, just to see debug output, and forgot that even that needs to be rolled back for the migrate map to be reset.
I'll close this as works as designed and reopen if I find problems with this again :)