Category setting to enable solutions doesn't stay checked


(Michael Downey) #1

Reproduce:

  1. Go to a category where people can mark solutions & click the Edit button to modify category settings.
  2. Notice “Allow topic owner and staff to mark a reply as the solution” is not checked.
  3. Check the box for that, and click Save Category.
  4. Open the edit dialog again.

Expected result:

  • The box accurately represents the state of the toggle, and stays checked.

Actual result:

  • The box is not checked for categories with solutions enabled, and the box never stays checked after checking it and saving settings.

Can't find "Allow topic owner and staff to mark a reply as the solution" Setting
(Michael Downey) #2

To make matters worse, I can’t figure out how to get solutions re-enabled for my category after trying to fix this setting. Yikes!


(Robin Ward) #3

Fixed this one. We were doing something weird and modifying Category instances after they were already created.

https://github.com/discourse/discourse-solved/commit/de39f462791416e23df6e01f1fa4e4e1fd23cf8e


(Régis Hanol) #4