When adding a translation to an existing node, the core 'translation' module sets $node->translation_source on 'prepare' of the new node. For this to work, the node needs to be saved in the form cache, otherwise, upon the POST of the add node form, the translation_source will no longer be set.
cck disables $form['#cache'] in content_field_form(..):
function content_field_form(&$form, &$form_state, $field, $get_delta = NULL) {
$form['#cache'] = FALSE;
[...]
}
Form cache gets re-enabled when one of the cck field is multiple values (for Add another item to work).
So:
1) If you have a node with one or more CCK fields
2) None of the fields allow multiple values
3) You are using the core 'translation' module
When adding a translation to an existing node, the 'translation_source' node is lost, and 'translation' module cannot properly add the new node to the translation set. The new node even gets set to 'language neutral', even when language neutral is disabled, and the proper language was selected when adding the node.
My fix is to simply remove the $form['#cache'] = FALSE; line in content.node_form.inc
Comments
Comment #1
rjerome commented+1
I maintain the biblio module which also requires $form['#cache'] to be TRUE.
The other option to fix this is not not pass the $form by reference, and thus it will not get changed globally.