I can’t enable voting

AI-generated summary

A user, MrMoins, is having trouble enabling voting on their Discourse forum, running version v2.3.0.beta5 +175. They installed the voting plugin but the setting to enable voting in category parameters does not save correctly. An error is displayed in the /logs after saving category settings.

sam inquired about the Discourse version and reported the issue to vinothkannans, who identified the problem as a serializer issue and fixed it in a commit.

After the fix, MrMoins reported another issue where all topics displayed 1 vote in the list, but 0 votes on the topic thread. vinothkannans determined that this was a French translation-related issue and fixed it in a commit. The French translation has since been updated in Transifex.

Stephen asked if other translations might be affected similarly, but no response has been provided yet.

Hi!
I’ve install the voting plugin, I see the checkbox to enable voting in the category parameters but when I check it to enable voting it doesn’t save correctly.
Re-opening category settings show me the setting unchecked.
Did I miss some config stuff after plugin install or something?

Just after saving category settings I can see this error in /logs

Uncaught Error: Property set failed: object in path "custom_fields" could not be found.
Url: https://forum.example.com/assets/ember_jquery-5dbd79abddf53926275c73f77dbe61e7351258de8d2e886bf2ce86f144378598.js
Line: 6
Column: 27777
Window Location: https://forum.example.com/c/my-category/my-subcategory

What version of Discourse are you running?

it’s version v2.3.0.beta5 +175 with :

and

40

I am not reproing this here @vinothkannans can you have a quick look to see the serializer is adding custom_fields even if there are none, can you test this on local?

My fault! It’s not adding it. Fixed in commit

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

Thanks a lot! it’s working fine now, but there is another glitch.

Just after enabling votes for a category, I can see that all topic have 1 vote in the list, but 0 on a topic thread.


@vinothkannans is this also coming from the serializer changes?

I don’t think so. I will check now.

It is French translation related issue. I fixed the English locale file in below commit. I will fix the French translation in Transifex and let you know here.

https://github.com/discourse/discourse-voting/commit/412320b06e02260fcc302451fc48f8eefc988a77

Thank you for your availability and your efficiency :+1:

French translation is updated.

Are any other translations going to be in a similar state?