If you use file field with entity translations enabled, you are able to have different files attached to an entity depending on language.

But during the file import the ":language" mapping for file field is ignored and default language is always used.

After some digging into migrate code, I found out that inside MigrateFileFieldBaseHandler->prepare() language is always set to default one, the one returned by $this->getFieldLanguage() even if we have it set into arguments.

I made a patch that checks if language argument is set and use that language instead of default one.

CommentFileSizeAuthor
migrate-file-language-arguments.patch1.04 KBLuxian
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

  • mikeryan committed 037d3bd on 7.x-2.x authored by Luxian
    Issue #2258909 by Luxian: Use migrated languages for file fields
    
mikeryan’s picture

Status: Needs review » Fixed

Committed, thanks!

mikeryan’s picture

Issue tags: +Migrate 2.6

Status: Fixed » Closed (fixed)

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