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.
Problem/Motivation
When saving a new entity using an entityreference field and the standard inline_entity_form widget the items are saved with the LANGUAGE_NONE langcode, and not the default language. E.g. 'en'. Like all other fields are. Entity translation is being used, but this is not the problem here.
Proposed resolution
Use field_language() in inline_entity_form_field_attach_submit() to get the correct langcode for the field, taking into account translation handlers etc..
Remaining tasks
User interface changes
None
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#1 | 2373827.patch | 733 bytes | damiankloip |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedComment #2
Fidelix CreditAttribution: Fidelix as a volunteer commented#2028711: Field language is not correctly set on new nodes