Category "Uncategorized" not displayed for globally pinned topics below title

AI-generated summary

The “Uncategorized” category label is not displayed for globally pinned topics, despite appearing correctly for non-pinned topics and other categories. Terrapop and simon have confirmed this issue. The problem seems to originate from the JavaScript code that checks for pinned uncategorized topics. A possible solution, as suggested by simon, could be to modify the logic to account for the “suppress uncategorized badge” site setting. Terrapop has also pointed out that this issue causes formatting problems when used in conjunction with the Topic List Thumbnails Theme Component.

We do show “Uncategorized” globally below the topic title.

However, when you pin a post globally the category “Uncategorized” disappears, other categories are shown correctly for pinned topics in topic lists.

Also “Uncategorized” is displayed for not pinned topics as you can see in the screenshot below.

Both first globally pinned topics are “Uncategorized” but don’t display it (and it’s not in the rendered HTML, the div link-bottom-line is empty).

2 Likes

I can confirm that this is the case. If an uncategorized topic is pinned, the topic’s category link is not displayed. I’m not sure what the reasoning behind this is.

The code checks for pinned uncategorized topics here: https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/templates/list/topic-list-item.hbr#L35.

Maybe the logic that sets isPinnedUncategorized could check to see if the suppress uncategorized badge site setting has been disabled. If the uncategorized badge is being displayed in non-pinned topics in the topic list, it would make sense to also display it for pinned topics.

3 Likes

Would be nice if this could be fixed, because in combination with Topic List Thumbnails Theme Component the titles are not centered anymore due to the empty link-bottom-line container:

1 Like