Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YouTube Embed Shows Error Message But Actually Works #1314

Closed
roundhill opened this issue Jun 20, 2017 · 9 comments
Closed

YouTube Embed Shows Error Message But Actually Works #1314

roundhill opened this issue Jun 20, 2017 · 9 comments
Labels
[Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended

Comments

@roundhill
Copy link

I was trying out Gutenberg (it's so cool! 🎉) and noticed an issue when trying to embed a YouTube video.

To Reproduce

  1. Start a new post
  2. Select + and then YouTube in the Embeds section.
  3. Insert a YouTube url, I used https://www.youtube.com/watch?v=pdZQ98mWeto
  4. You'll see this message Sorry, we could not embed that content.:

screen shot 2017-06-20 at 9 38 58 am

5. Publish the post. You'll see the video in the post just fine!
@aduth
Copy link
Member

aduth commented Jun 20, 2017

This would occur if there was an error in retrieving the embed result.

https://github.com/WordPress/gutenberg/blob/8fd70f4/blocks/library/embed/index.js#L144

Can you look at your network tab and see what response you're receiving for the embed request?

It may be a 404 if you're running a version of WordPress that does not include the oEmbed proxy endpoint (>= WordPress 4.8).

@aduth aduth added [Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended labels Jun 20, 2017
@roundhill
Copy link
Author

I think you're exactly right @aduth:

{
    "code": "rest_no_route",
    "message": "No route was found matching the URL and request method",
    "data": {
        "status": 404
    }
}

@aduth
Copy link
Member

aduth commented Jun 20, 2017

Which version of WordPress are you running?

@roundhill
Copy link
Author

Which version of WordPress are you running?

Version 4.8: http://11f5306f.ngrok.io

@aduth
Copy link
Member

aduth commented Jun 20, 2017

Your site is not serving the REST API: http://11f5306f.ngrok.io/wp-json

Is this disabled, by you or your host?

@youknowriad
Copy link
Contributor

(Try enabling permalinks if they're not already enabled)

@roundhill
Copy link
Author

roundhill commented Jun 21, 2017

(Try enabling permalinks if they're not already enabled)

This was the issue, the site had them set to plain. 👍 Seems like there should be a warning or something if that's the case.

@youknowriad
Copy link
Contributor

@roundhill Depending on the web server, this isn't required. AFAIK this is more an issue in the web server breaking the REST API. It's not specific to Gutenberg.

@roundhill
Copy link
Author

roundhill commented Jun 22, 2017

It's not specific to Gutenberg.

Agreed, will close here and check if there's an issue on the REST API repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants