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

Comments

klausi created an issue. See original summary.

klausi’s picture

Status: Active » Needs review
StatusFileSize
new937 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.

bluegeek9’s picture

Status: Needs review » Closed (outdated)

Drupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.

If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.

If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.