Adding a new translation overwrites the English/source field value

Created on 10 May 2013, about 11 years ago
Updated 11 April 2024, 3 months ago

Steps to reproduce:

1. Create a new node in English

2. Create a translation in French and add FR or something else obvious to the title

3. Edit the node in English
- note that the title is now the one entered for french.
- Look in {field_revision_title_field} and note that the title is the new French one for both the en and fr values.

This is because when new translations are saved from the entity translation UI, $node->title gets set to whatever the translated version is going to be. title_active_language() return 'en' during title_entity_presave(), so the English field value gets overwritten with the translated title.

I've got a patch which fixes the issue for me, this appears to work fine with the UI but there's one edge case where it'll break.

If you load a node, change node->title, then also add a new translation, then it woudn't update the title - but that's only possible via the API rather and seems unlikely.

Uploading patch once I've got an issue nid.

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

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.69.0 2024