The DocBlock comments on comment_reply() document the return value thus:

<?php
/**
* @return
*   The rendered parent node or comment plus the new comment form.
*/
?>

That's not correct. What's actually returned is an array containing a renderable array for the node or parent comment and the comment form as an array. I propose the comment be changed to read something like this:

<?php
/**
* @return array
*   An associative array containing:
*   - An array for rendering the node or parent comment.
*     - comment_node: If the comment is a reply to the node.
*     - comment_parent: If the comment is a reply to another comment.
*   - comment_form: The comment form as a renderable array.
*/
?>

When there's consensus on the change I'll roll a patch.

Files: 
CommentFileSizeAuthor
#7 comment-comment_reply-1532682-7.patch800 bytesTravisCarden
PASSED: [[SimpleTest]]: [MySQL] 39,092 pass(es).
[ View ]
#4 comment-comment_reply-1532682-4.patch1.25 KBTravisCarden
PASSED: [[SimpleTest]]: [MySQL] 35,395 pass(es).
[ View ]
#3 drupal-1532682-3.patch1.21 KBTravisCarden
PASSED: [[SimpleTest]]: [MySQL] 35,060 pass(es).
[ View ]

Comments

Issue tags:+Novice

Tagging.

Issue tags:+documentation

I like this, but I'm not sure about the established conventions for describing the presence of things like comment_node/comment_parent. In fact, I wonder why the key here needs to change at all.

Please go ahead and make patches in situations like this, that way the status could have been "Needs review" already and can attract the appropriate attention. Tags help too.

Status:Active» Needs review
StatusFileSize
new1.21 KB
PASSED: [[SimpleTest]]: [MySQL] 35,060 pass(es).
[ View ]

Can do! Thanks.

StatusFileSize
new1.25 KB
PASSED: [[SimpleTest]]: [MySQL] 35,395 pass(es).
[ View ]

Re-rolled.

Status:Needs review» Reviewed & tested by the community

The patch updates the code as per the summary.

Version:8.x-dev» 7.x-dev
Status:Reviewed & tested by the community» Patch (to be ported)

Committed to 8.x. Moving to 7.x. for back porting.

Assigned:Unassigned» TravisCarden
Status:Patch (to be ported)» Reviewed & tested by the community
StatusFileSize
new800 bytes
PASSED: [[SimpleTest]]: [MySQL] 39,092 pass(es).
[ View ]

Great! Here's the same thing for d7. (Can I put it right into RTBC?)

Version:7.x-dev» 8.x-dev

I don't see this in D8 yet.. anyone else?

Let's also move it to the documentation queue - @jhodgdon will likely snag reviewing/committing it there before any of the rest of us gets around to it :)

Component:comment.module» documentation

Um, I forgot to actually move it, apparently.

Version:8.x-dev» 7.x-dev

Committed it to 8.x. For real now. Moving back to 7.x.

I still don't see the commit. It should be in the repository pretty much immediately, right?

Version:7.x-dev» 8.x-dev

You're right, maybe it was committed but never pushed? I'm actually seeing the same thing for a few other issues too, so I will bump them back to Drupal 8 also.

#4 is still RTBC for Drupal 8. Hopefully third time's the charm :)

Status:Reviewed & tested by the community» Fixed

Forgot to push my changes. It is committed now: http://drupalcode.org/project/drupal.git/commit/1ed9d79.

Version:8.x-dev» 7.x-dev
Status:Fixed» Reviewed & tested by the community

I see you learned my trick - if you paste the commit link into the issue, that guarantees you'll never forget to push :)

#7 looks RTBC for Drupal 7 to me.

Status:Reviewed & tested by the community» Fixed

The patch in #7 has been committed (and pushed :) ) to Drupal 7.x. Thanks!

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