If you have a translatable text field that also has a default value and entity_translation is enabled then on a Feeds import field values for all languages will be saved. I only want to save content for one language. There should be no values for other languages, but currently Feeds creates translation field values with the configured default value of the field.

CommentFileSizeAuthor
#2 feeds-et-2850474-2.patch937 bytesklausi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klausi created an issue. See original summary.

klausi’s picture

Status: Active » Needs review
FileSize
937 bytes

Workaround patch, but I'm not sure this is the correct solution.

klausi’s picture

Title: Entity Translation support creates text field entriues for all languages with default values » Entity Translation support creates text field entries for all languages with default values

typo

MegaChriz’s picture

I'm not completely sure if the call to removeTranslation() is really needed. I assume it is meant to properly clear out values when importing empty values. It was added by olofjohansson in #1183440-108: Multilingual Feeds - Make field import language-aware.

Do you want to write a test to demonstrate the issue? The test could be added to the Feedsi18nNodeTestCase class which is in the file tests/feeds_i18n_node.test.