{"action":"opened","number":283,"pull_request":{"url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/283","id":44146650,"html_url":"https://github.com/Automattic/Co-Authors-Plus/pull/283","diff_url":"https://github.com/Automattic/Co-Authors-Plus/pull/283.diff","patch_url":"https://github.com/Automattic/Co-Authors-Plus/pull/283.patch","issue_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/283","number":283,"state":"open","locked":false,"title":"Fixing failing wp_get_object_terms filter during bulk edit","user":{"login":"david-binda","id":3651036,"avatar_url":"https://avatars.githubusercontent.com/u/3651036?v=3","gravatar_id":"","url":"https://api.github.com/users/david-binda","html_url":"https://github.com/david-binda","followers_url":"https://api.github.com/users/david-binda/followers","following_url":"https://api.github.com/users/david-binda/following{/other_user}","gists_url":"https://api.github.com/users/david-binda/gists{/gist_id}","starred_url":"https://api.github.com/users/david-binda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-binda/subscriptions","organizations_url":"https://api.github.com/users/david-binda/orgs","repos_url":"https://api.github.com/users/david-binda/repos","events_url":"https://api.github.com/users/david-binda/events{/privacy}","received_events_url":"https://api.github.com/users/david-binda/received_events","type":"User","site_admin":false},"body":"The filter applied inside `wp_get_object_terms` triggered only during a `bulk_edit` REQUEST is failing from multiple reasons resulting in lost co authors plus data during said action.\r\n\r\nFirst of all, the `$taxonomy` variable already contains sanitized string ('author') and thus is being double-quoted by `$wpdb->prepare` resulting in failing MySQL query. I'm fixing that by using `$this->coauthor_taxonomy` instead of `$taxonomy` variable.\r\n\r\nFurther the filter gets called multiple times during a request, but with different arguments - it's not always asking for a list of slugs (actually never). I'm fixinig it by switch which returns approapriate data in accordance with arguments passed to filter. This requires updating the query to select t.name instead of t.slug and extra tt.term_taxonomy_id.\r\n\r\nfixes #282","created_at":"2015-09-03T19:24:38Z","updated_at":"2015-09-03T19:24:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/283/commits","review_comments_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/283/comments","review_comment_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/283/comments","statuses_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/statuses/8a7cad4a4b2ac7ffb82c6aee5eaf62796de1e17e","head":{"label":"Automattic:fix/282-bulk-edit-loosing-cap-data","ref":"fix/282-bulk-edit-loosing-cap-data","sha":"8a7cad4a4b2ac7ffb82c6aee5eaf62796de1e17e","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":3251207,"name":"Co-Authors-Plus","full_name":"Automattic/Co-Authors-Plus","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/Co-Authors-Plus","description":"Multiple bylines and Guest Authors for WordPress","fork":false,"url":"https://api.github.com/repos/Automattic/Co-Authors-Plus","forks_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/forks","keys_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/teams","hooks_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/hooks","issue_events_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/events","assignees_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/tags","blobs_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/languages","stargazers_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/stargazers","contributors_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/contributors","subscribers_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/subscribers","subscription_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/subscription","commits_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/merges","archive_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/downloads","issues_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/releases{/id}","created_at":"2012-01-23T22:43:07Z","updated_at":"2015-09-03T09:25:12Z","pushed_at":"2015-09-03T19:23:15Z","git_url":"git://github.com/Automattic/Co-Authors-Plus.git","ssh_url":"git@github.com:Automattic/Co-Authors-Plus.git","clone_url":"https://github.com/Automattic/Co-Authors-Plus.git","svn_url":"https://github.com/Automattic/Co-Authors-Plus","homepage":"http://vip.wordpress.com/plugins/co-authors-plus/","size":2470,"stargazers_count":105,"watchers_count":105,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":83,"forks":78,"open_issues":83,"watchers":105,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"562ce2028c49d232e71f567b6b9dd7cceb554bdb","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":3251207,"name":"Co-Authors-Plus","full_name":"Automattic/Co-Authors-Plus","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/Co-Authors-Plus","description":"Multiple bylines and Guest Authors for WordPress","fork":false,"url":"https://api.github.com/repos/Automattic/Co-Authors-Plus","forks_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/forks","keys_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/teams","hooks_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/hooks","issue_events_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/events","assignees_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/tags","blobs_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/languages","stargazers_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/stargazers","contributors_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/contributors","subscribers_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/subscribers","subscription_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/subscription","commits_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/merges","archive_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/downloads","issues_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/Co-Authors-Plus/releases{/id}","created_at":"2012-01-23T22:43:07Z","updated_at":"2015-09-03T09:25:12Z","pushed_at":"2015-09-03T19:23:15Z","git_url":"git://github.com/Automattic/Co-Authors-Plus.git","ssh_url":"git@github.com:Automattic/Co-Authors-Plus.git","clone_url":"https://github.com/Automattic/Co-Authors-Plus.git","svn_url":"https://github.com/Automattic/Co-Authors-Plus","homepage":"http://vip.wordpress.com/plugins/co-authors-plus/","size":2470,"stargazers_count":105,"watchers_count":105,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":83,"forks":78,"open_issues":83,"watchers":105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/283"},"html":{"href":"https://github.com/Automattic/Co-Authors-Plus/pull/283"},"issue":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/283"},"comments":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/issues/283/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/283/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/pulls/283/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/Co-Authors-Plus/statuses/8a7cad4a4b2ac7ffb82c6aee5eaf62796de1e17e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":17,"deletions":2,"changed_files":1}}