At some point after some categories were created, the user that created them was deleted. Looking at the log, I can see that Discourse deleted those posts automatically at the same time the user was deleted.
We failed to notice that this caused any problems until some time later, when it became clear that while admins can still see (and edit) the affected category description posts, when regular users try to view those posts, they get this instead: “Error; while trying to load; Something went wrong.”
These category description posts appear with red backgrounds. I can see that they were deleted, and when. I can see the ‘undelete’ button, but clicking it does nothing at all.
If I go to the settings for one of the affected categories (by clicking its Edit button), and click the Edit Description button, I’m taken to the corresponding deleted post. I can make changes and save them, and after I’ve refreshed the page, the new description appears. But non-admin users still can’t see the contents of the post (just that error).
I was able to change the ownership for one of the posts to my own admin user, but the undelete button still doesn’t do anything.
I’ve found similar reports on meta Discourse, but so far none of the advice helped.
I found one reference to a person who was able to undelete a similarly-affected post using the Discourse API, and I started looking into that, but I was unable to find anything about undeleting posts in the API documentation. See Can't recover a topic by a deleted user
I hope there’s a solution that doesn’t involve recreating the affected categories from scratch.
Update: when I click the undelete button for one of these posts, it generates an entry in the error log:
Url: mysite/assets/ember_jquery-189e46ebcb33594b835e782fd1ce916ec750bc0cf980ebc4fb7796649161a18d.js
Line: 1
Column: 266460
Window Location: mysite/t/about-the-showcases-and-use-cases-category/28```