Created a new type of view and cannot remove it

(Daler) #1

I accidentally created a “tags” list view and cannot remove it (that “tags” view became an empty grey box). Now whenever I try to “Edit” the category I get these (multiple) errors in the browser console:
TypeError: Cannot read property 'name' of undefined

This was discovered when playing with the Topic List Previews plugin, more details and picture:

So, how can I remove such arbitrary view type? This bug is causing unresponsive behavior in the Edit Category dialog modal.

(Jeff Atwood) #2

Sorry, is this an issue related to a third party plugin?

(Daler) #3

I’m not sure. Following the advice of the plugin author I’m reporting this as a possible bug in Discourse.

(Angus McLeod) #4

The issue is that the list-setting multi-select component allows the user to create arbitrary inputs, outside of the list of choices passed to it. If the user does this an exception is thrown.

The issue is also present in the list settings in /admin/site_settings. For example, if you start to type ‘test’ in the ‘top menu’ list, it will prompt you to create a new item. If you do so and then refresh the page you will see this exception and the UI will be unresponsive.