podlove / podlove-publisher

Podlove Podcast Publisher for WordPress
https://wordpress.org/plugins/podlove-podcasting-plugin-for-wordpress/
MIT License
296 stars 82 forks source link

oembed not working #1015

Open eteubert opened 5 years ago

eteubert commented 5 years ago

It looks like WordPress is registering oembed routes, no matter if they are supported or not. The oembed module currently just adds its own routes but that still leaves the unsupported ones.

Example:

<link rel="alternate" type="application/json+oembed" href="https://freakshow.fm/wp-json/oembed/1.0/embed?url=https%3A%2F%2Ffreakshow.fm%2Ffs227-alien-wave" />
<link rel="alternate" type="text/xml+oembed" href="https://freakshow.fm/wp-json/oembed/1.0/embed?url=https%3A%2F%2Ffreakshow.fm%2Ffs227-alien-wave&#038;format=xml" />

<link rel="alternate" type="application/json+oembed" href="https://freakshow.fm/fs227-alien-wave?service=podlove-oembed&amp;format=json" title="FS227 Alien Wave oEmbed Profile"/>
<link rel="alternate" type="application/xml+oembed" href="https://freakshow.fm/fs227-alien-wave?service=podlove-oembed&amp;format=xml" title="FS227 Alien Wave oEmbed Profile"/>

Possibly the way WordPress expects oembed to work changed. Need to look into that.

Current oembed implementation: https://github.com/podlove/podlove-publisher/blob/master/lib/modules/oembed/oembed.php

benhartwich commented 4 years ago

Can confirm this problem. You could disable the wordpress ones by installing the plugin Disable Embeds. But it seems that the oembed function of podlove is generally broken:

elector #podlovewebplayer_90b00b943088f27e408415489af9413083863d38 (anonymous) @ embed.js?ver=2.9.6:2 s @ embed.js?ver=2.9.6:2 (anonymous) @ embed.js?ver=2.9.6:2 t.<computed> @ embed.js?ver=2.9.6:2 n @ embed.js?ver=2.9.6:2 u @ embed.js?ver=2.9.6:2 Promise.then (async) n @ embed.js?ver=2.9.6:2 c @ embed.js?ver=2.9.6:2 Promise.then (async) n @ embed.js?ver=2.9.6:2 c @ embed.js?ver=2.9.6:2 (anonymous) @ embed.js?ver=2.9.6:2 (anonymous) @ embed.js?ver=2.9.6:2 (anonymous) @ embed.js?ver=2.9.6:2 (anonymous) @ pwp4.js?ver=2.9.6:8 each @ jquery.js?ver=1.12.4-wp:2 each @ jquery.js?ver=1.12.4-wp:2 (anonymous) @ pwp4.js?ver=2.9.6:2 i @ jquery.js?ver=1.12.4-wp:2 fireWith @ jquery.js?ver=1.12.4-wp:2 ready @ jquery.js?ver=1.12.4-wp:2 J @ jquery.js?ver=1.12.4-wp:2 embed.js?ver=2.9.6:2 config https://audio.xy.de/2019/11/wie-begeistere-ich-mein-kind/?podlove_action=pwp4_config (anonymous) @ embed.js?ver=2.9.6:2 s @ embed.js?ver=2.9.6:2 (anonymous) @ embed.js?ver=2.9.6:2 t.<computed> @ embed.js?ver=2.9.6:2 n @ embed.js?ver=2.9.6:2 u @ embed.js?ver=2.9.6:2 Promise.then (async) n @ embed.js?ver=2.9.6:2 c @ embed.js?ver=2.9.6:2 Promise.then (async) n @ embed.js?ver=2.9.6:2 c @ embed.js?ver=2.9.6:2 (anonymous) @ embed.js?ver=2.9.6:2 (anonymous) @ embed.js?ver=2.9.6:2 (anonymous) @ embed.js?ver=2.9.6:2 (anonymous) @ pwp4.js?ver=2.9.6:8 each @ jquery.js?ver=1.12.4-wp:2 each @ jquery.js?ver=1.12.4-wp:2 (anonymous) @ pwp4.js?ver=2.9.6:2 i @ jquery.js?ver=1.12.4-wp:2 fireWith @ jquery.js?ver=1.12.4-wp:2 ready @ jquery.js?ver=1.12.4-wp:2 J @ jquery.js?ver=1.12.4-wp:2 embed.js?ver=2.9.6:2 DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame. at r (https://cdn.podlove.org/web-player/embed.js?ver=2.9.6:2:8240) at e (https://cdn.podlove.org/web-player/embed.js?ver=2.9.6:2:8122) at https://cdn.podlove.org/web-player/embed.js?ver=2.9.6:2:41984 at https://cdn.podlove.org/web-player/embed.js?ver=2.9.6:2:11968 at https://cdn.podlove.org/web-player/embed.js?ver=2.9.6:2:141873 at new Promise (<anonymous>) at https://cdn.podlove.org/web-player/embed.js?ver=2.9.6:2:141836 at https://cdn.podlove.org/web-player/embed.js?ver=2.9.6:2:13109 at https://cdn.podlove.org/web-player/embed.js?ver=2.9.6:2:11968

I´ve checked the Access-Control-Allow-Origin header, which is present at nginx with *. So this can´t be the problem.