To reproduce:

  • Install ajax_comments and enable for content types
  • Comment on a node
  • Select 'reply' to the comment you have just posted
  • Click 'cancel' on the comment reply form
  • Select 'reply' again

The comment form will not reappear after it has been cancelled.

Try for yourself

My ajax_comments_nodejs test site exhibits this same behaviour. Bear in mind it is not related to nodejs as this behaviour occurs when ajax_comments_nodejs is disabled and ajax_comments is enabled.

How do you fix this?

I tracked the issue down to a line in ajax_comments.js
I'm not sure what the selectors are in the present version of this module but I couldn't get it to work, replacing the line as follows does however work. Patch is attached.

-          $('[about="/comment/' + commentNumber[1] + '#comment-' + commentNumber[1] + '"]').next().show();
+          $('#comment-wrapper-' + commentNumber[1] + ' .comment-form').show();
CommentFileSizeAuthor
reply_reappear_after_cancel.patch565 bytesadammalone

Comments

mstef’s picture

Works

ttkaminski’s picture

Status: Needs review » Reviewed & tested by the community

Works for me

jean-eric’s picture

works for me in the use case described in the issue summary (with the addtion that the reply button disappears after pressing it for the second time), but with the following side effects on these two (marginal) uses cases:

A> forms on previously canceled comments on indented comments reappear all together (whether the patch http://drupal.org/node/1792734 is applied or not)
A.1 click the reply button/link on an indented comment, then the cancel one
A.2 do the same on another indented comment (tested only in the same thread on two consecutive comments)
A.3 click again the reply button/link : the two previously hidden/canceled forms reappear

B> text entered in a comment on a comment is shifted into the tex area of the article comment form after preview + cancel + refresh
B.1 comment a comment
B.2 preview it
B.3 then cancel -> the reply link/button does not reappear in that case
B.4 refreshiing the page makes the reply link/button reappear, but the prevously entered text is shifted to the article comment form

jean-eric’s picture

Issue summary: View changes

Updated issue summary.

formatC'vt’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

try latest dev, please

Status: Fixed » Closed (fixed)

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