Topic titles missing from deleted posts page when OP is deleted

AI-generated summary

Topic titles missing from deleted posts page when OP is deleted

A bug has been reported where deleted posts from a topic with a deleted original post (OP) do not display the topic title and category link on the /u/username/deleted-posts page. MarkDoerr provided an example and code references from the Discourse GitHub repository. JammyDodger noted that this issue has been mentioned in another topic. A fix has been merged by nat via a GitHub pull request (#19610).

Admins can see a list of deleted user posts at /u/username/deleted-posts. The expectation is that a listed post will include the title of the topic it belongs to (linking to the relevant post), as well as a link to the category that holds the topic. I’m finding that if the topic post (OP) of the associated topic is deleted, that deleted post and any deleted replies will be listed without including a title and category link. The code suggests that the title and category would be shown in all cases.

An example shows how the topic titles are displayed when the OP has been deleted, and when the OP still exists:

The code for the page comes from:
https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/templates/components/user-stream-item.hbs

And the evaluation of postUrl seems to come from here, line 106:

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/lib/utilities.js

It’s still possible to reach the content of the deleted posts through the logs, if necessary:

3 Likes

Just to note that this has cropped up in another topic recently too -

2 Likes

Same issue here:

1 Like

Merged the fix. Thanks for the report

https://github.com/discourse/discourse/pull/19610

5 Likes

This topic was automatically closed after 2 days. New replies are no longer allowed.