When purging all comments under a post, the comments then reappear immediately after if I click to add a comment. They then disappear again after posting the comment.

It's not uncommon to leave a comment when purging a thread, as often the comment thread has gotten out of hand and a mod explanation of why the thread is deleted is helpful.

enter image description here

Comments disappear after purging.

enter image description here

Comments reappear when posting a comment.

enter image description here

They then disappear again after posting the comment.

enter image description here

  • Bear with me, there may be a few bug reports. It's a bit of hack and slashing in the mod queue at the moment.
    – user310756
    Sep 17 '19 at 12:20
  • Are you sure this isn't a userscript bug? E.g. if you have a script to see deleted comments more easily. Sep 17 '19 at 12:22
  • @Randal'Thor no, not at all. I'm not sure at all.
    – user310756
    Sep 17 '19 at 12:23
  • Is the the AJAX show/hide magic, or does the behavior survive a reload of the page? There's some other strangeness with deleting and posting comments that goes away on a hard reload.
    – rob
    Sep 17 '19 at 12:27
  • 1
    @rob good question. I'd say it disappears on reload. I need to also test it without userscripts. I always forget those things darn it. I'll have to come back to this. I'm a tad busy. Sorry
    – user310756
    Sep 17 '19 at 12:35
  • Should we blame caching?
    – Luuklag
    Sep 18 '19 at 12:22

This is a user-script bug.

The "Purge all" button and the way it updates the UI is different from how the moderator menu does it.

When the moderator menu purges comments, it follows it with a call to StackExchange.moderator.loadAllComments($post) which is mostly just a wrapper around StackExchange.comments.loadAll($post, '?includeDeleted=true'). This displays all comments on the post in their new deleted state.

The user-script is likely just hiding the comments display:none and the script that shows the add form is interacting with that in an unexpected way. If the script truly wants to remove those from the UI, the best way would be to call StackExchange.comments.loadAll($post) after purging the comments.

You must log in to answer this question.