While using the FieldCollectionItem.php migrate source plugin, I noticed that a hook_migrate_prepare_row() implementation was invoked before the prepareRow() method in the source plugin. As a result, the hook implementation does not have access to field_collection fields.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

weekbeforenext created an issue. See original summary.

weekbeforenext’s picture

Status: Active » Needs review
FileSize
906 bytes

Attached is a patch that moves parent::prepareRow($row) to the bottom of the FieldCollectionItem.php migrate source plugin and allows the method to run before the hook_migrate_prepare_row() is invoked.

marcoscano’s picture

Status: Needs review » Reviewed & tested by the community

That makes sense to me.

We appear to not have test coverage for that currently, but I wonder if it's a too specific scenario to warrant a test.

  • Berdir committed 55c5971 on 8.x-1.x authored by weekbeforenext
    Issue #3016757 by weekbeforenext: hook_migrate_prepare_row() invoked...
Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.