Setting a target for "langcode" field will sometimes throw "this field cannot hold more than 1 values"

Created on 22 December 2020, almost 4 years ago
Updated 20 July 2024, 3 months ago

Hello. We are experiencing a problem, basically, there is a json file with a lot of articles to import, and 'langcode' is provided with them. But when setting the langcode in the mapper, sometimes, it will throw "this field cannot hold more than 1 values", this happens when updating an already existing article.

Steps to reproduce:

  1. Set the mapper normally
  2. Set a target for 'langcode' to a language
  3. There must be a target for a translatable field with its language different than the 'langcode' target
  4. Import.
  5. Now, if it finds an already existing entity, it will throw this error

I will upload a patch, but I don't think it is the best solution right now. Also, I'm not sure if this counts as a bug or a feature.

🐛 Bug report
Status

Needs work

Version

3.0

Component

Code

Created by

🇯🇴Jordan yahyaalhamad Palestine

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024