{"action":"created","issue":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/11680","repository_url":"https://api.github.com/repos/Yoast/wordpress-seo","labels_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/11680/labels{/name}","comments_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/11680/comments","events_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/11680/events","html_url":"https://github.com/Yoast/wordpress-seo/pull/11680","id":384205784,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNDYxOTcy","number":11680,"title":"Introduces class WPSEO_Handle_404","user":{"login":"stodorovic","id":15647032,"node_id":"MDQ6VXNlcjE1NjQ3MDMy","avatar_url":"https://avatars1.githubusercontent.com/u/15647032?v=4","gravatar_id":"","url":"https://api.github.com/users/stodorovic","html_url":"https://github.com/stodorovic","followers_url":"https://api.github.com/users/stodorovic/followers","following_url":"https://api.github.com/users/stodorovic/following{/other_user}","gists_url":"https://api.github.com/users/stodorovic/gists{/gist_id}","starred_url":"https://api.github.com/users/stodorovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stodorovic/subscriptions","organizations_url":"https://api.github.com/users/stodorovic/orgs","repos_url":"https://api.github.com/users/stodorovic/repos","events_url":"https://api.github.com/users/stodorovic/events{/privacy}","received_events_url":"https://api.github.com/users/stodorovic/received_events","type":"User","site_admin":false},"labels":[{"id":200344831,"node_id":"MDU6TGFiZWwyMDAzNDQ4MzE=","url":"https://api.github.com/repos/Yoast/wordpress-seo/labels/code-review","name":"code-review","color":"78BDF2","default":false},{"id":665788661,"node_id":"MDU6TGFiZWw2NjU3ODg2NjE=","url":"https://api.github.com/repos/Yoast/wordpress-seo/labels/needs-changes","name":"needs-changes","color":"78BDF2","default":false}],"state":"open","locked":false,"assignee":{"login":"stodorovic","id":15647032,"node_id":"MDQ6VXNlcjE1NjQ3MDMy","avatar_url":"https://avatars1.githubusercontent.com/u/15647032?v=4","gravatar_id":"","url":"https://api.github.com/users/stodorovic","html_url":"https://github.com/stodorovic","followers_url":"https://api.github.com/users/stodorovic/followers","following_url":"https://api.github.com/users/stodorovic/following{/other_user}","gists_url":"https://api.github.com/users/stodorovic/gists{/gist_id}","starred_url":"https://api.github.com/users/stodorovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stodorovic/subscriptions","organizations_url":"https://api.github.com/users/stodorovic/orgs","repos_url":"https://api.github.com/users/stodorovic/repos","events_url":"https://api.github.com/users/stodorovic/events{/privacy}","received_events_url":"https://api.github.com/users/stodorovic/received_events","type":"User","site_admin":false},"assignees":[{"login":"stodorovic","id":15647032,"node_id":"MDQ6VXNlcjE1NjQ3MDMy","avatar_url":"https://avatars1.githubusercontent.com/u/15647032?v=4","gravatar_id":"","url":"https://api.github.com/users/stodorovic","html_url":"https://github.com/stodorovic","followers_url":"https://api.github.com/users/stodorovic/followers","following_url":"https://api.github.com/users/stodorovic/following{/other_user}","gists_url":"https://api.github.com/users/stodorovic/gists{/gist_id}","starred_url":"https://api.github.com/users/stodorovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stodorovic/subscriptions","organizations_url":"https://api.github.com/users/stodorovic/orgs","repos_url":"https://api.github.com/users/stodorovic/repos","events_url":"https://api.github.com/users/stodorovic/events{/privacy}","received_events_url":"https://api.github.com/users/stodorovic/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2018-11-26T07:32:58Z","updated_at":"2018-11-27T17:06:08Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/pulls/11680","html_url":"https://github.com/Yoast/wordpress-seo/pull/11680","diff_url":"https://github.com/Yoast/wordpress-seo/pull/11680.diff","patch_url":"https://github.com/Yoast/wordpress-seo/pull/11680.patch"},"body":"## Summary\r\n\r\nThis PR can be summarized in the following changelog entry:\r\n\r\n* Props @jdevalk - #11645. For non-existing pages, WordPress still shows feeds, with 200 status codes. This makes it not do that.\r\n\r\n## Relevant technical choices:\r\n\r\n* Uses hook [`pre_handle_404`](https://developer.wordpress.org/reference/hooks/pre_handle_404/) to improve handling of 404 pages. Adds method `is_feed_404` which is based on WP core method to check is the query valid. If the query contains posts or an object then feed should return 200.  Otherwise feed doesn't exist.\r\n* Related WP core ticket:  https://core.trac.wordpress.org/ticket/30210\r\n\r\n## Test instructions\r\n<!--\r\nPlease follow these guidelines when creating test instructions:\r\n- Please provide step-by-step instructions how to reproduce the issue, if applicable.\r\n- Write step-by-step test instructions aimed at non-tech-savvy users, even if the PR is not user-facing.\r\n-->\r\nThis PR can be tested by following these steps:\r\n\r\n* Create and publish new post.\r\n* Check feed for this post. It should works.\r\n* Delete post and check feed again. It shouldn't work.\r\n* Repeat same for an category or an tag.\r\n* Check home_url/feed and home_url/comments/feed. Both feeds should work.\r\n\r\n## Quality assurance\r\n\r\n* [x] I have tested this code to the best of my abilities\r\n* [ ] I have added unittests to verify the code works as intended\r\n\r\nFixes [Yoast/yoast.com#3884](https://github.com/Yoast/yoast.com/issues/3884)"},"comment":{"url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/comments/442137990","html_url":"https://github.com/Yoast/wordpress-seo/pull/11680#issuecomment-442137990","issue_url":"https://api.github.com/repos/Yoast/wordpress-seo/issues/11680","id":442137990,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjEzNzk5MA==","user":{"login":"stodorovic","id":15647032,"node_id":"MDQ6VXNlcjE1NjQ3MDMy","avatar_url":"https://avatars1.githubusercontent.com/u/15647032?v=4","gravatar_id":"","url":"https://api.github.com/users/stodorovic","html_url":"https://github.com/stodorovic","followers_url":"https://api.github.com/users/stodorovic/followers","following_url":"https://api.github.com/users/stodorovic/following{/other_user}","gists_url":"https://api.github.com/users/stodorovic/gists{/gist_id}","starred_url":"https://api.github.com/users/stodorovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stodorovic/subscriptions","organizations_url":"https://api.github.com/users/stodorovic/orgs","repos_url":"https://api.github.com/users/stodorovic/repos","events_url":"https://api.github.com/users/stodorovic/events{/privacy}","received_events_url":"https://api.github.com/users/stodorovic/received_events","type":"User","site_admin":false},"created_at":"2018-11-27T17:06:08Z","updated_at":"2018-11-27T17:06:08Z","author_association":"CONTRIBUTOR","body":"@IreneStr I've checked it again and I've added PHP unit tests (I'm not sure for coding standards for tests). I've tested it with WPML.\r\nI'll add more tests (a post, a category, ...). Please review test classes before I continue with tests.\r\n"}}
{"actor":{"display_login":"stodorovic"}}