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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 986582-fix-incorrect-tnid.patch | 710 bytes | infojunkie |
| #1 | 986582-1.patch | 1.08 KB | good_man |
Comments
Comment #1
good_man commentedComment #2
good_man commented#986586: Compatibilty with Translation Management module
Comment #3
brucepearson commentedThanks for the patch, it's been committed.
Comment #4
good_man commentedThanks, waiting the Node Comment's maintainer to do that too :)
Comment #5
infojunkieThis 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.