Top topics text missing

AI-generated summary

The discussion revolves around a bug where category names are missing in the Top topics text. darkpixlz initially reports the issue on the Brave Linux theme, but bryce confirms it also occurs on the default theme. Arkshine investigates and finds that the issue is due to a missing displayName getter in the context of user summary, which was introduced in a recent commit. Moin and awesomerobot suggest that this issue might be related to another similar problem reported on the group permissions page. awesomerobot @-mentions joffreyjaffeux, who provides a fix for the issue in a pull request.

Brave Linux, Meta theme. Unsure if this is intentional but it doesn’t look right

2 Likes

Hmm, I’m seeing the same thing on the default theme.

There’s an element for the name, but it’s empty!

This doesn’t seem intentional to me, some I’m going to move it to Contribute > Bug for now.

5 Likes

Here is a quick look to help figure out the issue before bed. :smile:

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/helpers/category-link.js#L159

displayName doesn’t exist. There is a name field instead.

The changes happen in this commit:

https://github.com/discourse/discourse/commit/c197daa04c3114184cbd3ec2f1cfade1b5701793

It seems to miss the getters in the context of user summary since the data is retrieved from /summary.json.

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/models/user.js#L1068-L1073

Maybe mapping top_categories with Category.create() or a basic specific class would be okay.

4 Likes

This makes me think of Category names missing on group permissions page. Both lost the text, so maybe it’s the same issue.

2 Likes

Seems like it could possible be a result of then same issue but it’s in a different area. Not going to pretend like I know how Discourse works so I can’t input on that really

1 Like

@j.jaffeux this and Category names missing on group permissions page look like regressions from DEV: allows to alter category name/description (#28263) · discourse/discourse@c197daa · GitHub

categoryName is returning an empty string, looks like these couple of places aren’t working with the new displayName getter?

4 Likes

That should fix it:

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

6 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.