wp-pwa / wp-plugin

Old Frontity plugin. For the new one please visit https://github.com/frontity.
https://frontity.org
GNU General Public License v3.0
2 stars 1 forks source link

[5] Youtube iframes are not showing in posts #89

Closed SantosGuillamot closed 5 years ago

SantosGuillamot commented 5 years ago

Youtube iframes are not showing in the next post when loaded through Frontity

https://docs.google.com/spreadsheets/d/1FWcvX7KiLAppGW2qOICxs8ATWqV1uEsCVdTnq5mK7q8/edit#gid=0&range=A42

Checking the API, the iframe is not showing in the content, even if we disable Htmlpurifier

https://docs.google.com/spreadsheets/d/1FWcvX7KiLAppGW2qOICxs8ATWqV1uEsCVdTnq5mK7q8/edit#gid=0&range=A43

However, if we check the page-source it is the first thing in post content


https://frontity.pipedrive.com/deal/262 Pageviews: (0.09) Environment: production (x10) Range: low (x1) Behaviour: not-nice (x1) Mass: everyone (x5) PRIORITY: [5]

luisherranz commented 5 years ago

Could you please ask him how is he inserting that YT video? Using a shortcode? Using a custom field?

luisherranz commented 5 years ago

Blocked until the customer answers.

DAreRodz commented 5 years ago

@SantosGuillamot any news?

SantosGuillamot commented 5 years ago

They told us that they always insert youtube videos adding the url

luisherranz commented 5 years ago

Where do they add the url?

luisherranz commented 5 years ago

@SantosGuillamot 👆

SantosGuillamot commented 5 years ago

He answered this: "Siempre insertamos los vídeos de YouTube colocando directamente la url". I understood they just added the link on WP post editor. If you feel it is not like that I will ask them again

luisherranz commented 5 years ago

Ok, so he adds the link in content but in the REST API neither the link nor the iframe appear. Is that right?

SantosGuillamot commented 5 years ago

Yes, that's right. However, it just happens in some posts. Here we have an example where youtube video is showing: https://docs.google.com/spreadsheets/d/1FWcvX7KiLAppGW2qOICxs8ATWqV1uEsCVdTnq5mK7q8/edit#gid=0&range=A49

luisherranz commented 5 years ago

Are we able to reproduce this issue locally? What happens when we insert a YT link in content?

SantosGuillamot commented 5 years ago

I tried on test and it is working properly, I am not sure how to reproduce this

luisherranz commented 5 years ago

Could you please ask them if they know any difference between a post where the REST API outputs the link and a post where it doesn't? And also: do they have any special YouTube or embed plugins?

SantosGuillamot commented 5 years ago

I already asked them if there was any difference between posts and they told me Youtube links were added the same way. I will ask them about Youtube or embed plugins.

luisherranz commented 5 years ago

Ok, thanks @SantosGuillamot.

SantosGuillamot commented 5 years ago

They told us they are not using these plugins

luisherranz commented 5 years ago

Ok, is it possible to get access to their dashboard to take a look?

SantosGuillamot commented 5 years ago

I will ask him

SantosGuillamot commented 5 years ago

We got access to their dashboard. After evaluating the posts affected, it seems that all of them have a "featured video" instead of a "featured image", so this should be the reason. It might be the same as this req. feature: https://github.com/frontity/saturn-theme/issues/212 so we have asked them to add the custom field "featured_video" to the API

luisherranz commented 5 years ago

Where do they get the "featured video" feature from? Is it a plugin or the theme?

SantosGuillamot commented 5 years ago

It seems to be the theme "Newspaper"

luisherranz commented 5 years ago

Ok. We should investigate if there's a WP plugin to select and expose custom fields in the REST API without people having to actually code. Ping me later and let's have a look.

luisherranz commented 5 years ago

I've been searching and there's nothing like it, although it may be possible and useful.

I've created a list of REST API plugins we can create, and added it there: https://github.com/frontity/wp-plugin/wiki/List-of-REST-API-plugins

For now, just tell them to use a code snippet.

luisherranz commented 5 years ago

Should we unblock this?

SantosGuillamot commented 5 years ago

This was fixed in this other issue: https://github.com/frontity/saturn-theme/issues/212

The client has to add the custom field "featured_video" with the url on the posts and it will work