If you enable the i18n option for a global flag to (i.e. "Flag translations of content as a group"), and the flag is visible in the node form, then the flag's form element receives a default value rather than the value for the translation set that the node will be a part of, and when you submit the form it clobbers the translation set's value.

CommentFileSizeAuthor
#1 flag-i18n_add_translation-1973514.patch1.37 KBjweowu

Comments

jweowu’s picture

Status: Active » Needs review
StatusFileSize
new1.37 KB

This patch makes use of the $node->translation_source object added by translation_node_prepare() when a new translation is being added.

joachim’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Needs work

Thanks for reporting this and making the patch!

This needs to be fixed on 3.x first though.

joachim’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, flag-i18n_add_translation-1973514.patch, failed testing.

jweowu’s picture

Righto. I'm not using 3.x so I'll leave it to someone else to sort that version out. (if anyone else wants to test it in 2.x, the original patch does apply correctly.)

jweowu’s picture

I just took a (very) quick look at 7.x-3.x, and it doesn't even have a node_form alter hook. Are you sure this is relevant to 3.x? I'd hate for this to be sitting in limbo if it could be reviewed and pushed to 2.x.

joachim’s picture

3.x does all the form alteration in one place, for all entities.

Could you install 3.x and try it out on actual nodes to see what happens please?

ivnish’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Drupal 7 is EOL. Issue will be closed, but patches are still here