{"action":"created","issue":{"url":"https://api.github.com/repos/CodeAtCode/Glossary/issues/34","repository_url":"https://api.github.com/repos/CodeAtCode/Glossary","labels_url":"https://api.github.com/repos/CodeAtCode/Glossary/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/CodeAtCode/Glossary/issues/34/comments","events_url":"https://api.github.com/repos/CodeAtCode/Glossary/issues/34/events","html_url":"https://github.com/CodeAtCode/Glossary/issues/34","id":145983438,"number":34,"title":"Use of plugin causes search functionality to fail.","user":{"login":"josefsalyer","id":247702,"avatar_url":"https://avatars.githubusercontent.com/u/247702?v=3","gravatar_id":"","url":"https://api.github.com/users/josefsalyer","html_url":"https://github.com/josefsalyer","followers_url":"https://api.github.com/users/josefsalyer/followers","following_url":"https://api.github.com/users/josefsalyer/following{/other_user}","gists_url":"https://api.github.com/users/josefsalyer/gists{/gist_id}","starred_url":"https://api.github.com/users/josefsalyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josefsalyer/subscriptions","organizations_url":"https://api.github.com/users/josefsalyer/orgs","repos_url":"https://api.github.com/users/josefsalyer/repos","events_url":"https://api.github.com/users/josefsalyer/events{/privacy}","received_events_url":"https://api.github.com/users/josefsalyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Mte90","id":403283,"avatar_url":"https://avatars.githubusercontent.com/u/403283?v=3","gravatar_id":"","url":"https://api.github.com/users/Mte90","html_url":"https://github.com/Mte90","followers_url":"https://api.github.com/users/Mte90/followers","following_url":"https://api.github.com/users/Mte90/following{/other_user}","gists_url":"https://api.github.com/users/Mte90/gists{/gist_id}","starred_url":"https://api.github.com/users/Mte90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mte90/subscriptions","organizations_url":"https://api.github.com/users/Mte90/orgs","repos_url":"https://api.github.com/users/Mte90/repos","events_url":"https://api.github.com/users/Mte90/events{/privacy}","received_events_url":"https://api.github.com/users/Mte90/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-04-05T13:09:42Z","updated_at":"2016-04-06T12:31:12Z","closed_at":null,"body":"Hi there,\r\n\r\nWhen I use your plugin (which is awesome) I get a PHP Notice - I have debugging turned on - when performing searches:\r\n\r\n`Array to string conversion in /code/wp-includes/query.php on line 3095`\r\n\r\nAnd no search results are returned for valid search criteria.  Disabling the plugin allows search to work again.\r\n\r\nLet me know what additional information you need to troubleshoot this problem.\r\n\r\nAll the best,\r\n\r\nJosef Salyer"},"comment":{"url":"https://api.github.com/repos/CodeAtCode/Glossary/issues/comments/206349487","html_url":"https://github.com/CodeAtCode/Glossary/issues/34#issuecomment-206349487","issue_url":"https://api.github.com/repos/CodeAtCode/Glossary/issues/34","id":206349487,"user":{"login":"rasmustaarnby","id":477220,"avatar_url":"https://avatars.githubusercontent.com/u/477220?v=3","gravatar_id":"","url":"https://api.github.com/users/rasmustaarnby","html_url":"https://github.com/rasmustaarnby","followers_url":"https://api.github.com/users/rasmustaarnby/followers","following_url":"https://api.github.com/users/rasmustaarnby/following{/other_user}","gists_url":"https://api.github.com/users/rasmustaarnby/gists{/gist_id}","starred_url":"https://api.github.com/users/rasmustaarnby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasmustaarnby/subscriptions","organizations_url":"https://api.github.com/users/rasmustaarnby/orgs","repos_url":"https://api.github.com/users/rasmustaarnby/repos","events_url":"https://api.github.com/users/rasmustaarnby/events{/privacy}","received_events_url":"https://api.github.com/users/rasmustaarnby/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T12:31:12Z","updated_at":"2016-04-06T12:31:12Z","body":"I'm actually just looking at this too. I have found the issue, which is causing the front end search to only search regular posts and the glossary post type. \r\n\r\nYou're using the filter pre_get_posts here https://github.com/CodeAtCode/Glossary/blob/master/public/class-glossary.php#L88\r\n\r\nThat results in the default search value (any) being overridden. You can see it here https://github.com/CodeAtCode/Glossary/blob/master/public/class-glossary.php#L183\r\n\r\nThe solution is to remove that function so it doesn't overwrite the default search value, which is 'any' and therefore should include the glossary post type anyway.\r\n\r\nQuestion is why this is set to overwrite - I might have overlooked a side effect of removing that function. @Mte90 Maybe you can help with an answer on this. "}}