[object Object] Error appearing in admin dropdown selectors

I just added another support issue which may be related to what I’m illustrating in this video:
https://meta.discourse.org/t/digest-summary-emails-not-working/141980/2

For some reason when I click on the drop-down menus, in several fields of the admin interface, I’m greeted with this “[object Object]” option, which appears to be an error.

Here’s a little screencast to show what I’m experiencing…

1 Like

I have the problem, I think it’s introduced in the latest version.

3 Likes

I believe @joffreyjaffeux is on it?

4 Likes

Yes.

I see exactly what’s going on. I have to think about it though. It’s very unexpected to me and I don’t have a straightforward fix.

Basically we have site settings we call “enums” which are not flat arrays but array of objects, however enum site setting doesn’t give info about the key used in the object.

2 Likes

problem with this is tests-passed pointing to this version. I prefer a reverse. Otherwise whoever upgrade to this latest version will have a problem.

1 Like

This was tricky. I reverted the previous fix, and created this new fix with tests:

https://github.com/discourse/discourse/commit/74f2d480186b6cd87a6032ccfadc5721a76eb4b3

I think this should solve all issues related to enums.

8 Likes