Seems cannot "undelete the first post"

AI-generated summary

xiasummer reported an issue where they cannot “undelete” the first post of a topic after accidentally deleting it. JammyDodger suggested using the un-delete icon or the topic wrench option, but was unable to reproduce the issue after upgrading their test site.

Don suggested that this issue occurs when a user self-deletes the topic (OP), and that staff users cannot see the un-delete icon in this situation. JammyDodger responded that once a post is deleted, the un-delete options are available as normal, but noted that if the topic is still in the “(topic deleted by author)” stage, it hasn’t been deleted yet and counts as a post edit.

Don clarified that even if the post can be undeleted, it can only be restored to the “(topic deleted by author)” status, and expressed confusion about the scenario causing the issue.

I found that, when I delete the second and other posts, it can be “undeleted” , but if I accidently miss-deleted the first post, it will not be allowed to “undelete” the post any more.

image

image

What if I just miss-deleted the first post of the full page?

My discourse version:

That has just cropped up in another topic. You should be able to un-delete a topic using these UI elements:

I’m upgrading my test site now to see if something has gone awry. :+1:


I’ve just upgraded (940eb0ce4d) and it seems to be working fine for me. I am not sure why yours is missing?

Hello,

I think this is happens when a user self delete the topic (OP).

I created a topic with a non-staff (TL1) user and than delete it with this user. This user can undelete the topic OP with clicking the Screenshot 2022-10-13 at 9.59.13 icon.


But in this situation staff users can’t see the undelete Screenshot 2022-10-13 at 9.59.13 icon. And I think this is because the user decided to delete the topic and there is no reply yet so user free to delete it.

There is only a wrench button which is also not contains undelete…

And the topic actions buttons also not contains.


If this is the case I think the only way to undelete the topic OP from staff side is open the topic and revert the topic history.

I’ve just had a quick go at this @Don, and based on the screenshot in the OP [1] the icons are red, so it means that the post has been deleted rather than at the ‘visible but (topic deleted by author) stage’.

Once it’s been deleted I can see, as admin, the un-delete options as normal:

Though if it’s still at the visible ‘(topic deleted by author)’ stage then it hasn’t been deleted yet and counts as a post edit, in which case you’d be right. :slight_smile:


  1. image ↩︎

Ah yes you right :slightly_smiling_face: but you can only undelete to the (topic deleted by author) status.

I don’t know what scenario cause this. :confused: