{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/2121","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/2121/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/2121/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/2121/events","html_url":"https://github.com/magento/magento2/issues/2121","id":111658815,"number":2121,"title":"Category Layered Filter Issue","user":{"login":"kost08","id":3988557,"avatar_url":"https://avatars.githubusercontent.com/u/3988557?v=3","gravatar_id":"","url":"https://api.github.com/users/kost08","html_url":"https://github.com/kost08","followers_url":"https://api.github.com/users/kost08/followers","following_url":"https://api.github.com/users/kost08/following{/other_user}","gists_url":"https://api.github.com/users/kost08/gists{/gist_id}","starred_url":"https://api.github.com/users/kost08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kost08/subscriptions","organizations_url":"https://api.github.com/users/kost08/orgs","repos_url":"https://api.github.com/users/kost08/repos","events_url":"https://api.github.com/users/kost08/events{/privacy}","received_events_url":"https://api.github.com/users/kost08/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magento/magento2/labels/bug","name":"bug","color":"eb6420"},{"url":"https://api.github.com/repos/magento/magento2/labels/MX","name":"MX","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"kandy","id":100289,"avatar_url":"https://avatars.githubusercontent.com/u/100289?v=3","gravatar_id":"","url":"https://api.github.com/users/kandy","html_url":"https://github.com/kandy","followers_url":"https://api.github.com/users/kandy/followers","following_url":"https://api.github.com/users/kandy/following{/other_user}","gists_url":"https://api.github.com/users/kandy/gists{/gist_id}","starred_url":"https://api.github.com/users/kandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kandy/subscriptions","organizations_url":"https://api.github.com/users/kandy/orgs","repos_url":"https://api.github.com/users/kandy/repos","events_url":"https://api.github.com/users/kandy/events{/privacy}","received_events_url":"https://api.github.com/users/kandy/received_events","type":"User","site_admin":false},"milestone":null,"comments":16,"created_at":"2015-10-15T16:45:43Z","updated_at":"2016-06-14T01:07:01Z","closed_at":null,"body":"When you search for something, using sample data for example, a '**bag**' no category filters are displayed. That happens because category filters are only rendered if Category in `$categories` has no children categories. In [`Magento\\CatalogSearch\\Model\\Layer\\Filter\\Category`](https://github.com/magento/magento2/blob/develop/app/code/Magento/CatalogSearch/Model/Layer/Filter/Category.php) in `::_getItemsData()` `$category` is *Default Category* and `$categories` is a collection of it's direct children categories. \r\n![1](https://cloud.githubusercontent.com/assets/3988557/10520519/8279a772-737b-11e5-860b-5857581f2fda.PNG)\r\nBut `$optionsFacetedData` is an array of Categories which are children of the `$categories`\r\n![2](https://cloud.githubusercontent.com/assets/3988557/10520523/87efc222-737b-11e5-9eb0-1d0dcd6fbf48.PNG)\r\nWhen you check \r\n````\r\n...\r\nforeach ($categories as $category) {\r\n    if ($category->getIsActive()\r\n        -> && isset($optionsFacetedData[$category->getId()]) <-\r\n        && $this->isOptionReducesResults($optionsFacetedData[$category->getId()]['count'], $collectionSize)\r\n) {\r\n...\r\n```\r\nThere is no match and filters aren't rendered."},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/225753356","html_url":"https://github.com/magento/magento2/issues/2121#issuecomment-225753356","issue_url":"https://api.github.com/repos/magento/magento2/issues/2121","id":225753356,"user":{"login":"blizam","id":8940155,"avatar_url":"https://avatars.githubusercontent.com/u/8940155?v=3","gravatar_id":"","url":"https://api.github.com/users/blizam","html_url":"https://github.com/blizam","followers_url":"https://api.github.com/users/blizam/followers","following_url":"https://api.github.com/users/blizam/following{/other_user}","gists_url":"https://api.github.com/users/blizam/gists{/gist_id}","starred_url":"https://api.github.com/users/blizam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blizam/subscriptions","organizations_url":"https://api.github.com/users/blizam/orgs","repos_url":"https://api.github.com/users/blizam/repos","events_url":"https://api.github.com/users/blizam/events{/privacy}","received_events_url":"https://api.github.com/users/blizam/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T01:07:01Z","updated_at":"2016-06-14T01:07:01Z","body":"https://github.com/magento/magento2/issues/5009"}}
{"actor":{"display_login":"blizam"}}