Topics where topic voting is enabled are broken for visitors

On topics where topic voting is enabled (like topics in the #feature category here on Meta), visitors only get an almost blank page:

Uncaught (in promise) TypeError: Cannot read properties of null (reading ‘vote_limit’)

5 Likes

clarification: you mean not-logged-in users?

(I can reproduce the problem with an incognito browser)

2 Likes

I noticed it while I was not logged in. Not sure if it also happens for logged-in users with a different vote limit than mine. (I think TL0 have 0 votes on Meta, so it could be a problem for them too, but I didn’t check. However, 0 is not the same as null.)

1 Like

This should be fixed and will be deployed here soon, it was a simple but silly error of not checking to see if a user existed before assigning a class to the voting button.

Thanks for reporting.

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

5 Likes