Node Comment module converts comments into nodes, the problems occurs when trying to translate a node comment content. The original node comment has a 'comment_target_nid' field in it's node object that referes to it's parent node (the node that the comment is written). When using TM (Translation Management) to translate it, it does not know this field, and it ends up with the translated comment on the same parent node instead of the translated parent node.

Steps to reproduce:
- Enable TM and nodecomment.
- Create an English node, translate it to Arabic.
- Write an english comment.
- Translate it using TM dashboard and jobs to another language (e.g. Arabic).
- The resulted comment translation will show up on the same English original node instead of the Arabic.

Comments

good_man’s picture

StatusFileSize
new1.08 KB
good_man’s picture

brucepearson’s picture

Status: Active » Needs review

Thanks for the patch, it's been committed.

good_man’s picture

Thanks, waiting the Node Comment's maintainer to do that too :)

infojunkie’s picture

StatusFileSize
new710 bytes

This patch misses the case where the nodecomment is related NOT to the original parent node, but to the parent's translation. It causes the newly translated nodecomment to be attached to the same parent because the tnid is not correct.

Attached is a patch that fixes this.