qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Link associated with a deleted username, in a comment thread, redirects to the top of the current page.

Open sylvainRigal opened this issue 2 years ago • 7 comments

Describe the bug See Meta post: https://meta.codidact.com/posts/288749 The name of a deleted user in a comment thread appears with a clickable link. This link redirect to the top of the current page (tested in "main" view and in comment thread view). Also occurs in search results.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://meta.codidact.com/posts/282342/282380#answer-282380
  2. Open the first comment thread entitled "Feature for creator of thread"
  3. Click on the first author name, i.e. "deleted user".
  4. See error, i.e. redirection to the top of the page

Expected behavior I don't know, the link could just be removed because the user was deleted or it could redirect to a dedicated page about general information regarding user account management or something...

sylvainRigal avatar Jun 28 '23 05:06 sylvainRigal

When someone works on this, it's worth also checking the behaviour of the deleted user name below one of the deleted user's posts (for example, a question or answer).

trichoplax avatar Jun 28 '23 09:06 trichoplax

Ideally (in my opinion), deleted users in both comments and posts would be links for people who can see deleted profile pages (i.e. moderators and admins) and, for people who can't see those profiles, would either not be links at all or would link to a relevant help topic.

cellio avatar Jun 28 '23 15:06 cellio

This issue is also present on search result pages; for example: https://meta.codidact.com/posts/search?search=5+tag+limit#

by deleted user

ws909 avatar Oct 24 '23 23:10 ws909

Also post lists: https://meta.codidact.com/posts/290947

cellio avatar Feb 26 '24 13:02 cellio

I haven't looked at the source code, but it would really surprise me if this wasn't an intentional decision. It seems to be that anywhere a link to a deleted user is presented in the UI, it's replaced with a link to the current page itself. Something is responsible for that, and it's probably the same piece of code generating all of these.

ws909 avatar Feb 26 '24 23:02 ws909

I don't think we want the mostly-no-op link, though; if there's no user page to link to, we should show the text without making it a link. (Small tweak: moderators can see deleted profiles, so this should be behind a check for mod status.)

cellio avatar Feb 26 '24 23:02 cellio

I don't think we want the mostly-no-op link, though; if there's no user page to link to, we should show the text without making it a link. (Small tweak: moderators can see deleted profiles, so this should be behind a check for mod status.)

There are other options:

  • Red text otherwise stylized as a link
  • Link to a custom 404 page for user profiles
  • Link to a help page about deleted users (which you already mentioned)
  • Disabled link

ws909 avatar Feb 26 '24 23:02 ws909