# Invalid items can be added to the top\_menu setting

**URL:** https://meta.discourse.org/t/invalid-items-can-be-added-to-the-top-menu-setting/80074
**Category:** Bug
**Created:** [February 8, 2018, 2:23am UTC](https://meta.discourse.org/t/invalid-items-can-be-added-to-the-top-menu-setting/80074 "2018-02-08T02:23:37Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 26, 2018, 7:04am UTC](https://meta.discourse.org/t/invalid-items-can-be-added-to-the-top-menu-setting/80074/9 "2018-04-26T07:04:56Z")

</div>

I am mostly done here but kind of want to hand this over to @j.jaffeux to finish some stuff up here:

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/7/b77e1892622acec08e3c2ce6b99031b5878dcc10.png)

Per:

[https://github.com/discourse/discourse/commit/88f5251415650f875817c3b3d4a73987a6cd270a](https://github.com/discourse/discourse/commit/88f5251415650f875817c3b3d4a73987a6cd270a)

We have an extra `allow_any` attribute for site setting (default is true). If `allow_any` is set to `false` on a list, the choices are restricted so they always match the list.

So for this case, top\_menu is now restricted to any combination of:

```plaintext
choices:
     - latest
     - new
     - unread
     - top
     - categories
     - read
     - posted
     - bookmarks

```

But… the control used in the UX is now an ugly text box. Since this is a site setting we can live with this, but it is visually somewhat ugly.

That said, you can no longer shoot yourself in foot, which is great.

This commit totally kills 2 features as well:

1. You can not longer “magic” a category into top menu which we used to support, this has to be done in a theme.

2. You can not longer use the “magic” `-` thingy to remove categories from lists, instead you set it in category settings.

---

_[View the full topic](https://meta.discourse.org/t/invalid-items-can-be-added-to-the-top-menu-setting/80074)._
