In our use case, we are displaying a default message when there are no comments to display.

I have added ajax-comment-wrapper and ajax-comment-dummy-comment which allows ajax to add the new comment in the correct place.

Unfortunately, this also leaves the default message in place. We don't want it to be displayed when the comment is added.

Can the dummy comment be removed when the first comment is added.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

John Cook created an issue. See original summary.

John Cook’s picture

Status: Active » Needs review
FileSize
554 bytes

I have created a patch to remove the dummy comment using ajax when the first comment is submitted.

This will not re-add the dummy comment when the last comment is removed. This is not needed for our current use case as only administrators can delete comments. I will have a look at implementing this if I get the time.

formatC'vt’s picture

i agree, we should restore dummy comment when the last comment is removed.

formatC'vt’s picture

Status: Needs review » Needs work
John Cook’s picture

Status: Needs work » Needs review
FileSize
4.25 KB

I've re-implemented the functionality using ajax replace methods.

There is a extra text_format field in the configuration settings (admin/config/content/ajax_comments) to set the 'no comments' text.