{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/5530","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5530/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5530/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5530/events","html_url":"https://github.com/WordPress/gutenberg/issues/5530","id":303843702,"node_id":"MDU6SXNzdWUzMDM4NDM3MDI=","number":5530,"title":"Embed proxy API does not return HTML in all cases, so some providers will not embed","user":{"login":"notnownikki","id":3314354,"node_id":"MDQ6VXNlcjMzMTQzNTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3314354?v=4","gravatar_id":"","url":"https://api.github.com/users/notnownikki","html_url":"https://github.com/notnownikki","followers_url":"https://api.github.com/users/notnownikki/followers","following_url":"https://api.github.com/users/notnownikki/following{/other_user}","gists_url":"https://api.github.com/users/notnownikki/gists{/gist_id}","starred_url":"https://api.github.com/users/notnownikki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notnownikki/subscriptions","organizations_url":"https://api.github.com/users/notnownikki/orgs","repos_url":"https://api.github.com/users/notnownikki/repos","events_url":"https://api.github.com/users/notnownikki/events{/privacy}","received_events_url":"https://api.github.com/users/notnownikki/received_events","type":"User","site_admin":false},"labels":[{"id":644619174,"node_id":"MDU6TGFiZWw2NDQ2MTkxNzQ=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/Core%20REST%20API%20Task","name":"Core REST API Task","color":"d4c5f9","default":false},{"id":813888420,"node_id":"MDU6TGFiZWw4MTM4ODg0MjA=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/REST%20API%20Interaction","name":"REST API Interaction","color":"d4c5f9","default":false},{"id":531680823,"node_id":"MDU6TGFiZWw1MzE2ODA4MjM=","url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Type]%20Bug","name":"[Type] Bug","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":{"login":"notnownikki","id":3314354,"node_id":"MDQ6VXNlcjMzMTQzNTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3314354?v=4","gravatar_id":"","url":"https://api.github.com/users/notnownikki","html_url":"https://github.com/notnownikki","followers_url":"https://api.github.com/users/notnownikki/followers","following_url":"https://api.github.com/users/notnownikki/following{/other_user}","gists_url":"https://api.github.com/users/notnownikki/gists{/gist_id}","starred_url":"https://api.github.com/users/notnownikki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notnownikki/subscriptions","organizations_url":"https://api.github.com/users/notnownikki/orgs","repos_url":"https://api.github.com/users/notnownikki/repos","events_url":"https://api.github.com/users/notnownikki/events{/privacy}","received_events_url":"https://api.github.com/users/notnownikki/received_events","type":"User","site_admin":false},"assignees":[{"login":"notnownikki","id":3314354,"node_id":"MDQ6VXNlcjMzMTQzNTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3314354?v=4","gravatar_id":"","url":"https://api.github.com/users/notnownikki","html_url":"https://github.com/notnownikki","followers_url":"https://api.github.com/users/notnownikki/followers","following_url":"https://api.github.com/users/notnownikki/following{/other_user}","gists_url":"https://api.github.com/users/notnownikki/gists{/gist_id}","starred_url":"https://api.github.com/users/notnownikki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notnownikki/subscriptions","organizations_url":"https://api.github.com/users/notnownikki/orgs","repos_url":"https://api.github.com/users/notnownikki/repos","events_url":"https://api.github.com/users/notnownikki/events{/privacy}","received_events_url":"https://api.github.com/users/notnownikki/received_events","type":"User","site_admin":false}],"milestone":null,"comments":13,"created_at":"2018-03-09T13:38:17Z","updated_at":"2018-07-19T16:18:06Z","closed_at":null,"author_association":"MEMBER","body":"## Issue Overview\r\n\r\nGutenberg uses the embed proxy API to get rendered HTML for URLs. This works for most cases, but the Kickstarter provider does not return any HTML, even though it returns a type of `rich`.\r\n\r\nThe classic editor POSTs to `/wp-admin/admin-ajax.php` requesting that the URL is rendered using an `[embed]` shortcode. This always returns HTML.\r\n\r\nWe do not want to call `/wp-admin/admin-ajax.php` because that is tied into the wp-admin area only, so we need to have an API which does the same as the call that the classic editor makes, but exposed through the REST API.\r\n\r\n## Steps to Reproduce (for bugs)\r\n1. Try to embed a Kickstarter URL\r\n2. Weep for all embedkind.\r\n\r\nNote that sometimes on your second attempt to embed a specific KS url, it will return HTML, this is down to some inconsistent behaviour inside oembed. The `/wp-admin/admin-ajax.php` call will process the embed using the `[embed]` shortcode, and this always gives the desired result. The code that the admin ajax actions uses can be pretty much copied into a REST API endpoint to give us what we need, and have the same embed previewing as in the classic editor.\r\n\r\n## Todos\r\n- [ ] Tests\r\n- [ ] Documentation\r\n"},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/406333901","html_url":"https://github.com/WordPress/gutenberg/issues/5530#issuecomment-406333901","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5530","id":406333901,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjMzMzkwMQ==","user":{"login":"notnownikki","id":3314354,"node_id":"MDQ6VXNlcjMzMTQzNTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3314354?v=4","gravatar_id":"","url":"https://api.github.com/users/notnownikki","html_url":"https://github.com/notnownikki","followers_url":"https://api.github.com/users/notnownikki/followers","following_url":"https://api.github.com/users/notnownikki/following{/other_user}","gists_url":"https://api.github.com/users/notnownikki/gists{/gist_id}","starred_url":"https://api.github.com/users/notnownikki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notnownikki/subscriptions","organizations_url":"https://api.github.com/users/notnownikki/orgs","repos_url":"https://api.github.com/users/notnownikki/repos","events_url":"https://api.github.com/users/notnownikki/events{/privacy}","received_events_url":"https://api.github.com/users/notnownikki/received_events","type":"User","site_admin":false},"created_at":"2018-07-19T16:18:06Z","updated_at":"2018-07-19T16:18:06Z","author_association":"MEMBER","body":"@pento @mkaz could you take a look at this with me please? Kickstarts embeds intermittently fail - I think it's some kind of rate limiting going on because there's some code in `lib/rest-api.php` which does the embed again to make sure it's going through oembed sanitisation, but that'll result in another call to kickstarter's oembed, and I believe that's the problem we're seeing here."}}
{"actor":{"display_login":"notnownikki"}}