{"action":"created","issue":{"url":"https://api.github.com/repos/wp-e-commerce/WP-e-Commerce/issues/1444","labels_url":"https://api.github.com/repos/wp-e-commerce/WP-e-Commerce/issues/1444/labels{/name}","comments_url":"https://api.github.com/repos/wp-e-commerce/WP-e-Commerce/issues/1444/comments","events_url":"https://api.github.com/repos/wp-e-commerce/WP-e-Commerce/issues/1444/events","html_url":"https://github.com/wp-e-commerce/WP-e-Commerce/issues/1444","id":38150622,"number":1444,"title":"Issue with removing a pre_get_posts hook within itself","user":{"login":"bradyvercher","id":1302030,"avatar_url":"https://avatars.githubusercontent.com/u/1302030?v=3","gravatar_id":"","url":"https://api.github.com/users/bradyvercher","html_url":"https://github.com/bradyvercher","followers_url":"https://api.github.com/users/bradyvercher/followers","following_url":"https://api.github.com/users/bradyvercher/following{/other_user}","gists_url":"https://api.github.com/users/bradyvercher/gists{/gist_id}","starred_url":"https://api.github.com/users/bradyvercher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradyvercher/subscriptions","organizations_url":"https://api.github.com/users/bradyvercher/orgs","repos_url":"https://api.github.com/users/bradyvercher/repos","events_url":"https://api.github.com/users/bradyvercher/events{/privacy}","received_events_url":"https://api.github.com/users/bradyvercher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"JustinSainton","id":1168754,"avatar_url":"https://avatars.githubusercontent.com/u/1168754?v=3","gravatar_id":"","url":"https://api.github.com/users/JustinSainton","html_url":"https://github.com/JustinSainton","followers_url":"https://api.github.com/users/JustinSainton/followers","following_url":"https://api.github.com/users/JustinSainton/following{/other_user}","gists_url":"https://api.github.com/users/JustinSainton/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinSainton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinSainton/subscriptions","organizations_url":"https://api.github.com/users/JustinSainton/orgs","repos_url":"https://api.github.com/users/JustinSainton/repos","events_url":"https://api.github.com/users/JustinSainton/events{/privacy}","received_events_url":"https://api.github.com/users/JustinSainton/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/wp-e-commerce/WP-e-Commerce/milestones/5","labels_url":"https://api.github.com/repos/wp-e-commerce/WP-e-Commerce/milestones/5/labels","id":232674,"number":5,"title":"3.9.0","description":"This is our next major release.  Early planning to start in January.  For now, moving everything in Google Code milestoned for 3.9 here.  We'll triage later as we refine the roadmap.","creator":{"login":"JustinSainton","id":1168754,"avatar_url":"https://avatars.githubusercontent.com/u/1168754?v=3","gravatar_id":"","url":"https://api.github.com/users/JustinSainton","html_url":"https://github.com/JustinSainton","followers_url":"https://api.github.com/users/JustinSainton/followers","following_url":"https://api.github.com/users/JustinSainton/following{/other_user}","gists_url":"https://api.github.com/users/JustinSainton/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinSainton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinSainton/subscriptions","organizations_url":"https://api.github.com/users/JustinSainton/orgs","repos_url":"https://api.github.com/users/JustinSainton/repos","events_url":"https://api.github.com/users/JustinSainton/events{/privacy}","received_events_url":"https://api.github.com/users/JustinSainton/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":105,"state":"closed","created_at":"2012-12-19T17:28:41Z","updated_at":"2015-01-20T21:43:48Z","due_on":"2014-05-21T07:00:00Z","closed_at":"2014-12-04T23:09:09Z"},"comments":4,"created_at":"2014-07-18T06:11:32Z","updated_at":"2015-01-20T21:44:23Z","closed_at":null,"body":"The `wpsc_split_the_query()` hook is being [removed from within itself](https://github.com/wp-e-commerce/WP-e-Commerce/blob/d9ca9a33329f50d0bab303ca52d33f4a2271a4af/wpsc-components/theme-engine-v1/helpers/query.php#L396), which causes any hooks attached at the next priority to be skipped. The [bug originates in WP](https://core.trac.wordpress.org/ticket/21169), but modifying the implementation in WP eCommerce will help prevent a few headaches.\r\n\r\nWhile [writing a hotfix](https://core.trac.wordpress.org/ticket/21169), I came up with a couple of possible solutions. Either:\r\n\r\n1. Attach a dummy hook just after `wpsc_split_the_query()` is registered so that at least two callbacks exist at the same priority: `add_filter( 'pre_get_posts', '__return_null', 8 );`\r\n\r\n2. Or move the `remove_filter()` call from `wpsc_split_the_query()` to a `template_redirect` hook so that it's only fired for the main query."},"comment":{"url":"https://api.github.com/repos/wp-e-commerce/WP-e-Commerce/issues/comments/70740097","html_url":"https://github.com/wp-e-commerce/WP-e-Commerce/issues/1444#issuecomment-70740097","issue_url":"https://api.github.com/repos/wp-e-commerce/WP-e-Commerce/issues/1444","id":70740097,"user":{"login":"JustinSainton","id":1168754,"avatar_url":"https://avatars.githubusercontent.com/u/1168754?v=3","gravatar_id":"","url":"https://api.github.com/users/JustinSainton","html_url":"https://github.com/JustinSainton","followers_url":"https://api.github.com/users/JustinSainton/followers","following_url":"https://api.github.com/users/JustinSainton/following{/other_user}","gists_url":"https://api.github.com/users/JustinSainton/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinSainton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinSainton/subscriptions","organizations_url":"https://api.github.com/users/JustinSainton/orgs","repos_url":"https://api.github.com/users/JustinSainton/repos","events_url":"https://api.github.com/users/JustinSainton/events{/privacy}","received_events_url":"https://api.github.com/users/JustinSainton/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T21:44:23Z","updated_at":"2015-01-20T21:44:23Z","body":"This commit seems to have broken some search layouts for different themes."}}