Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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:
- install a drupal with entity translation and at least 2 language (fr & en for example)
- create a content-type with an image file marked translatable with a file directory value comporting a token: for example 'photos/[vd:language]'
- 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.
Comment | File | Size | Author |
---|---|---|---|
#2 | file_mapper_need_pass_language_to_file_widegt_uri-2958529.patch | 439 bytes | ceonizm |
|
Comments
Comment #2
ceonizm CreditAttribution: ceonizm as a volunteer commentedComment #3
ceonizm CreditAttribution: ceonizm as a volunteer commented