"Enum" broken in settings.yml of Theme (Components)

AI-generated summary

A bug has been reported in the settings.yml of Theme Components, where Enum’s are not rendering correctly in the admin section. This issue was introduced in the 2.4.0.beta10 release and affects all Theme Components. To reproduce the issue, install a Theme Component like Discourse Versatile Banner and check the enum setting on the settings page. A proposed fix was initially submitted in pull request 8995, but joffreyjaffeux later reverted it due to causing more issues and is working on a better solution.

Bug description

Enum’s defined in the settings.yml of Theme Components are not being rendering correctly in the admin section. The dropdown is not working and neither are the value options visible in the source code. We tested 2 independent Theme Components so the problem seems to be affecting all Theme Components.

Observation
It seems that the problem was introduced in the 2.4.0.beta10 release.

We tested it on version 2.4.0.beta10 and 2.4.0.beta11 and both versions showed the above mentioned problem. Previous versions, in particular 2.4.0.beta9 and 2.4.0.beta8, don’t have this problem.

How to reproduce it:

  1. Install a Theme Component that uses enums like Discourse Versatile Banner
  2. Go the settings page of the theme component (../admin/customize/themes/…) and check the enum setting

3 Likes

Thanks.

This will be fixed by:

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

8 Likes

I reverted this fix as it’s causing more issues than it solves. Taking the time to write multiple tests and will come up with a better solution.

2 Likes