It appears that in comment_resource.inc on line 188 the creation of the empty comment object should include the pid (parent ID) value if provided by the request for the comment_form to properly process threaded comments.

$comment_empty = (object) array(
'nid' => $comment['nid'],
'cid' => NULL,
);

should be

$comment_empty = (object) array(
'nid' => $comment['nid'],
'cid' => NULL,
'pid' => $comment['pid'],
);

This appears to work in our limited testing and appears to pass the pid into the comment_form successfully for threading to occur.

CommentFileSizeAuthor
#1 comment-pid.patch862 bytesmarcingy

Comments

marcingy’s picture

Version: 7.x-3.0-rc5 » 7.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new862 bytes

The solution is actually bit more complex as we need to check if a pid is provided.

Patch also adds a check to ensure that nid is provided when creating a comment which is currently missing.

kylebrowning’s picture

Status: Needs review » Patch (to be ported)
kylebrowning’s picture

Status: Patch (to be ported) » Fixed

Fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.