Hi folks,

I set the setting to always keep the comment form expanded. But when I post a new comment the comment form is collapsed again. This is a problem as I have a comment on this link, which does not find the anchor when the form is collapsed.

Is there are way to change this behaviour? To keep the form always open.

Also, when I unset the title variable of the form (Add Comment) by deleting the title in box.tpl.php all together, it breaks the ajax comments (the comment is submitted only in the background, the form stays in its status, and the comments are not refreshed).

Thank you for your help.

CommentFileSizeAuthor
#3 always_expanded.patch732 bytesd.clarke

Comments

theusualsuspect’s picture

nobody here to help out a fellow drupaler...I am sorry I post again, I just can't put my finger on the solution yet.

theusualsuspect’s picture

Alright.. I found a hack for the problems I had.

For the first issue (keeping the form open after a comment submit) I hacked ajax_comments.js .

In line 443 you'll find

 // hiding comment form
    ajax_comments_close_form(true); 

I've added simply this to it (after scanning through the file for the appropriate function)

    // hiding comment form
    ajax_comments_close_form(true);
    $('#comment-form-title').click();

This works so far and I hope its fine with the developer.

For the second issue I just added a

#comment-form-title {

	display: none;

}

to my CSS..

d.clarke’s picture

Status: Active » Needs review
StatusFileSize
new732 bytes

I also experienced a similar issue. If I selected "Form always expanded" on the settings page, I experienced the following inconsistent behavior:

  1. The form would collapse after a comment was submitted
  2. The end user could collapse the form by clicking the "Post new comment" header

If there was a deliberate reason behind this functionality can someone update this thread with those reasons. Otherwise, I have attached a patch, based on theusualsuspect's comment above, that will resolve these issues. Can someone review the attached solution?

Thanks

neochief’s picture

Status: Needs review » Reviewed & tested by the community

Commited this patch to dev. Thanks! Can somebody test it out?

mattwmc’s picture

Verified!

Dev fixed it for me.

Now is there any way to put a login/logout link or button somewhere? :)

rjbrown99’s picture

Status: Reviewed & tested by the community » Fixed

Seems like this was resolved via a commit in #4.

Status: Fixed » Closed (fixed)

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