In both websites I have, most content types are field-translatable using Entity Translation. However, I am using node translation for my blog entries. (I know that it would be better not to mix the two methods, and I woulddefinitely prefer to have everything field-translatable. However, I just have to do it the way it ism because I need to have my blog entries crossposted sometimes, and crossposting modules do not handle properly any content translated with Entity Translation.) Now comes the bug.
I created a blog entry as a "Language neutral" node. It had, say, "Some Title" as its title, and "Some text" as its Body. After that, I realized that I want different language versions of this blog entry. I opened it and changed the language from Language neutral to English. I saved the node; under the View tab, I still see its original content, i.e. "Some text". However, when I click the Edit tab to edit it, I see its title as it should be (i.e. "Some Title"), but I see a blank text area under Body.
If I switch to the View tab again, I still see its original text, i.e. "Some text". Even if I change its Title, or select a different language, and then save the node and view it, I still see the same "Some Title" as its title and "Some text" as its body under the View tab. As soon as I enter "Some other text" in that blank Body under the Edit tab and save it, I start seeing "Some other text" under both View and Edit tabs, i.e. things start working as they should, but the original "Some text" body is, of course, lost.
I have installed Devel, and checked that when the Edit tab shows a blank area under Body, [node: body] under the Devel tab still has "Some text" as its value. (Well, seeing that the View tab shows that text, one would expect exactly that as the value of [node: body] under Devel, but I thought it is always better to double-check :).)
I also have a vague (and maybe wrong) feeling that #1086454: DATA-LOSS: Changing the Language of a node via language assignment deletes the content on the edit page for the Language Assignment module may be related to this one.

As I tested later, the same happens when switching from Language neutral to any other language available for selection. I just describe the situation with English, because it is the main language of my website, i.e. I try to eliminate as much as possible any additional factors like the node language being different from the site language, etc.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Maksym Kozub’s picture

Priority: Major » Critical

Now I think this is not just major but critical: if a user does not check the node content in the view mode before editing it, (s)he can easily delete the original content of the node by entering something new in that (seemingly) blank text area.

tim.plunkett’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

How is this not a duplicate of that other issue?

ezra-g’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
4.97 KB

I found this issue via #1811116: Title set to empty string when changing entity language to untranslated language, which suggests that this may be a core issue and is reproducible without the contributed Languageassign module.

I'm attaching a patch from that issue by plach so the testbot can do an initial review.

Status: Needs review » Needs work

The last submitted patch, drupal-null_%20fallback-1811116-8.patch, failed testing.

ezra-g’s picture

Version: 7.18 » 7.x-dev
Status: Needs work » Needs review
FileSize
4.96 KB

Re-rolled #3 as a standard Drupal git patch.

plach’s picture

This patch just handles an edge-case in the language fallback logic applied during entity rendering. How is it related to this issue?

Also, can we make sure the issue reported in the OP is reproducible without contrib modules, except perhaps ET?