When importing translatables image fields which are using tokens in their field definitions, we need the file mapper to pass the current mapping language value to the $data array passed to file_field_widget_uri as third argument.
This way we let the opportunity to deal with the key used and translate it in another token name if needed.

Step to reproduce:

  1. install a drupal with entity translation and at least 2 language (fr & en for example)
  2. create a content-type with an image file marked translatable with a file directory value comporting a token: for example 'photos/[vd:language]'
  3. create an importer with at least two mapping of that field (one mapping per language).

Expected result:

The media files should be placed in their respective language folder.

Actual Result:

When launching the importation process we don't have any information to get the correct file directory to save these images.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ceonizm created an issue. See original summary.

ceonizm’s picture

ceonizm’s picture

Status: Active » Needs review