I have a site in drupal which is in spanish by default. Now I want to add the english translation. It has a lot of entities "producto" with undefined ('und') language. I want to mass assign the 'es' language to them. Before posting this question I have checked this other question How to change node languages in batches? but I'm unable to accomplish what I want. Let me explain:
a) I have tried Language Assignement but it last commit was 1 year ago and it has a critical bug that can lead to data loss (I reproduced the error too) I also tried with the patch from user barami but the data loss persists.
b) View Bulk Operations: I've tried it, but it does only update the field in database table "node". Not the other ones.
c) So I checked out how the drupal database works and created a sql script which also leads to data loss:
-- Step 1 Node lang
update node set language='es' where type='producto';
-- Step 2 body field
update field_data_body set language='es' where bundle='producto';
-- Step 3 Field comment vody
update field_data_comment_body set language='es' where bundle='comment_node_producto';
-- Step 4 For each field of producto, update language
update field_data_field_precio set language='es' where bundle='producto';
update field_revision_field_precio set language='es' where bundle='producto';
(...)
I have the following translation modules activated: Internationalization, Block languages, Field translation, Menu translation, Multilingual content, Multilingual select, Synchronize translations, Taxonomy translation, Translation redirect, Translation sets
What Am I doing wrong with my sql script? Are there other plugins to accomplish what I want to do? Any suggestion will be appreciated Thanks!