{"action":"created","issue":{"url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/886","repository_url":"https://api.github.com/repos/Smile-SA/elasticsuite","labels_url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/886/labels{/name}","comments_url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/886/comments","events_url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/886/events","html_url":"https://github.com/Smile-SA/elasticsuite/issues/886","id":316224378,"number":886,"title":"Filters in frontend disappear when you add a sequence to Smile_ElasticsuiteCatalog in a module","user":{"login":"Tokipudi","id":29551076,"avatar_url":"https://avatars3.githubusercontent.com/u/29551076?v=4","gravatar_id":"","url":"https://api.github.com/users/Tokipudi","html_url":"https://github.com/Tokipudi","followers_url":"https://api.github.com/users/Tokipudi/followers","following_url":"https://api.github.com/users/Tokipudi/following{/other_user}","gists_url":"https://api.github.com/users/Tokipudi/gists{/gist_id}","starred_url":"https://api.github.com/users/Tokipudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tokipudi/subscriptions","organizations_url":"https://api.github.com/users/Tokipudi/orgs","repos_url":"https://api.github.com/users/Tokipudi/repos","events_url":"https://api.github.com/users/Tokipudi/events{/privacy}","received_events_url":"https://api.github.com/users/Tokipudi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-20T11:03:53Z","updated_at":"2018-04-26T15:17:08Z","closed_at":"2018-04-26T12:05:53Z","author_association":"NONE","body":"### Preconditions\r\nMagento Version : _EE 2.2.2_\r\nElasticSuite Version : _2.5.8_\r\nEnvironment : _Developer_\r\n\r\n### Steps to reproduce\r\n1. Create a new module\r\n2. Add a sequence to **Smile_ElasticsuiteCatalog**\r\n\r\n### Expected result\r\nThe new module works properly\r\n\r\n### Actual result\r\nThe filters in the frontend, on the category page, disappear. \r\n\r\n### What is causing the issue\r\nIt is caused by the fact that **_Smile_ElasticsuiteCatalog_** gets loaded before **_Magento_LayeredNavigationStaging_**. This is due to the fact that **_Smile_ElasticsuiteCatalog_** has a sequence to **_Magento_LayeredNavigation_**, instead of  **_Magento_LayeredNavigationStaging_**.\r\n\r\n**_Smile_ElasticsuiteCatalog_** has a virtualType that requires **_Magento_LayeredNavigationStaging_** to be loaded first for it to work :\r\n```\r\n<virtualType name=\"Magento\\LayeredNavigationStaging\\Block\\Navigation\\Search\" type=\"Smile\\ElasticsuiteCatalog\\Block\\Navigation\">\r\n    <arguments>\r\n        <argument name=\"filterList\" xsi:type=\"object\">searchFilterList</argument>\r\n    </arguments>\r\n</virtualType>\r\n```\r\nYou can find it in `frontend/etc/di.xml`\r\n\r\n### How to solve the issue\r\nSimply change the line `<module name=\"Magento_LayeredNavigation\" />` in `Smile\\ElasticsuiteCatalog\\etc\\module.xml` by `<module name=\"Magento_LayeredNavigationStaging\" />`, so that **_Magento_LayeredNavigationStaging_**, which also loads **_Magento_LayeredNavigation_** is always loaded before **_Smile_ElasticsuiteCatalog_**.\r\n"},"comment":{"url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/comments/384679368","html_url":"https://github.com/Smile-SA/elasticsuite/issues/886#issuecomment-384679368","issue_url":"https://api.github.com/repos/Smile-SA/elasticsuite/issues/886","id":384679368,"user":{"login":"afoucret","id":529238,"avatar_url":"https://avatars0.githubusercontent.com/u/529238?v=4","gravatar_id":"","url":"https://api.github.com/users/afoucret","html_url":"https://github.com/afoucret","followers_url":"https://api.github.com/users/afoucret/followers","following_url":"https://api.github.com/users/afoucret/following{/other_user}","gists_url":"https://api.github.com/users/afoucret/gists{/gist_id}","starred_url":"https://api.github.com/users/afoucret/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afoucret/subscriptions","organizations_url":"https://api.github.com/users/afoucret/orgs","repos_url":"https://api.github.com/users/afoucret/repos","events_url":"https://api.github.com/users/afoucret/events{/privacy}","received_events_url":"https://api.github.com/users/afoucret/received_events","type":"User","site_admin":false},"created_at":"2018-04-26T15:17:08Z","updated_at":"2018-04-26T15:17:08Z","author_association":"OWNER","body":"Reopen since it seems that we can add a non existing module into the module sequence definition without breaking anything. Dependency check is done using composer.\r\n\r\nWe should be able to add the Magento_LayeredNavigationStaging into the Smile_ElasticsuiteCatalog sequence without breaking community edition.\r\n\r\nNote: it is an hack. Maybe Magento will change this behavior one day. "}}
{"actor":{"display_login":"afoucret"}}