"Show category list" causes page glitch upon page reload

AI-generated summary

A bug was reported where selecting the same category from the drop-down list causes the page to glitch, loading either the root category index on top of the topic list or adding a link above the heading in the table. erlend_sh shared a video demonstrating the issue, and strager confirmed the issue, sharing a screenshot. eviltrout fixed erlend_sh’s bug with a commit, but was unable to reproduce strager’s issue. After further investigation, eviltrout found and fixed the bug causing the issue for strager.

It’s hard to say in words what’s wrong, so here’s a video. This is obviously with “show subcategory list” enabled.

The moment to pay attention to is when I have a category selected, and I re-select that same identical category from the drop-down. You’d expect…

A: Nothing is loaded.
B. The page refreshes.

… instead I get weird option C: It loads the root category index on top of the topic list.

I can confirm something funky is going on when you select the subcategory page in the list while already on that page. In our case it puts a link above the heading in the table:

Can you check this @eviltrout?

I was able to fix @erlend_sh’s bug with this commit:

https://github.com/discourse/discourse/commit/6c4c542ae37f2cd16049b11aa2e1dcf51e557174

However I could not reproduce yours @strager – is it still happening on the latest build? Do you have steps to reproduce?

2 Likes

Still occurring on the latest version, but not with every board. Simply go to page (example IP/c/announcements-discussions/announcements) and click on the board again. If you send me a PM, I can give you the IP if you want to take a look.

Do you have topic list display customizations?

Thanks for giving me access to your server. I did find a bug with refreshing a category which I fixed in this commit:

https://github.com/discourse/discourse/commit/9c977a08cdc0149f970981bad15647b9675902d6

I think that will fix this for you!

3 Likes

Excellent and thank you :smile: