MigrateDestinationFieldCollection::fields() ignores passed in migration object parameter thus loosing valuable information and not allowing migrate_handler_invoke_all() to use this information as well.

My issue use case is simple: I'm migration field collections with attached file fields. Specifying source migration for this field should pull some configuration options(like destination_dir, destination_file, file_replace, source_dir, urlencode) from source migration itself which is not happening.

Patch will follow.

CommentFileSizeAuthor
#2 field_collection-2638972-2.patch995 bytesRoSk0
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RoSk0 created an issue. See original summary.

RoSk0’s picture

Assigned: RoSk0 » Unassigned
Status: Active » Needs review
FileSize
995 bytes

Patch to fix issue.

Gold’s picture

Status: Needs review » Reviewed & tested by the community

This is working for me when applied to beta11.

Gold’s picture

This is working for me when applied to beta11.

jmuzz’s picture

Status: Reviewed & tested by the community » Needs work

That's a good point, but it's good courtesy to keep patches to the point and avoid making unrelated changes to the documentation / white space. For this case in particular, it would inherit the documentation for the abstract function that starts with "Derived classes must implement fields()" so it's better to override the docblock.