Skip Navigation

[Closed] Youtube Video does not display

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 14 replies, has 2 voices.

Last updated by Jamal 3 weeks, 3 days ago.

Assigned support staff: Jamal.

Author
Posts
#1781941

Hello!

I have created 2 custom "embed media" fields. These fields are added to a custom post type. I am then pulling those fields into a content template. The videos display on the template page but when I save, they do not show in the browser. Please let me know if you need WP credentials to take a look.

Thank you so much!

#1782303

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

Yes, please, I'll need to take a closer look at your custom fields, the post, and the content template. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

Please provide links for all these details:
- Custom fields.
- Content template.
- A post that you are testing.

#1787651

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

On one hand, the content template is not assigned to any custom post type, but it is being used for the homepage. On the other hand, the content template's video blocks are not correctly configured. And I guess that the block editor has pulled the video just as an example.

This post you shared hidden link is a post from the "Content Update" custom post type. And it holds two custom fields for the videos. But the homepage does not have such fields, that's why the content template did not find any videos to show.

I would like to ask, where would you like to display these videos? In posts of the custom post type or on the homepage?
Then, where these videos should come from? A specific post? Or the post/page that is currently visited?

#1788167

Thank you for the response.

I am attempting to get the fields that are on the home page content post to pull into the homepage content template. Then I would like to use this template on the homepage only.

I have attached a screenshot of how the videos are currently being pulled into the content template.

Thanks again!

#1789283

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for the details. I understand your use case better.

I tried on a clean install and I confirm that the "Youtube" Block is not rendering the video when pulled from a different post. But I was able to display the video with a "Single Field" block.

On your website, we can display the video by:
- Using the "Single Field" block instead of the "Youtube" block.
- Updating the video URL to include the protocol part "hidden link". Check this screenshot hidden link

I was able to display the first video on your website, check this screenshot hidden link

I did not remove the first "Youtube" block, so I'll let you remove that block and do the same for the second video.

I hope this is a viable solution for you. Otherwise, I can escalate the issue with the Youtube block to our 2nd Tier for further analysis. Let me know what you will prefer.

#1790587

My issue is now resolved. Thank you so much!

#1790619

This does work to display the video, however I loose the 16:9 aspect ratio. Is there a way to regain this? Thank you!

#1791217

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Currently, the field is an Embedded Media field, which means that the latest markup to generate on the frontend comes from the origin website, instead of the WordPress installation. Read more about the oEmbed protocol here https://wordpress.org/support/article/embeds/

The Toolset Youtube block allows you to choose the aspect ratio, but as we already experienced, it is not working well with the Embedded Media field. You may need to change the field type to a URL instead, and that will work smoothly without issues.
Check this test I run on a clean installation:
- Homepage: hidden link
- Backend: hidden link

The field is a URL field, check this screenshot hidden link

I wonder if it would be possible for you to change the field type to a URL? Let me know your feedback.

#1793565

Hello! I changed the field to URL and the video no longer displayed. Are you suggesting another plugin I am using on the site is preventing the video from displaying correctly?

Thank you!

#1794167

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Maybe, that's true. I, personally, suspect that the server has some kind of caching, such as Varnish or Memcached, that is still holding a cache of the page or the content template.

I'll suggest:
- First, update Toolset Blocks to the latest release 1.3.1.
- Check with the hosting provider to purge any server-level caching if available.
- Perform a compatibility check, by switching to a default theme such as TwentyTwenty and deactivating all plugins except Toolset ones.

If this does not help, I'll need to take a copy of your website to check this locally, let me know if I can install the Duplicator plugin and take a copy.

#1797151

I have removed all caching, deactivated all plugins except toolset, updated the toolset plugins, and switched themes with no success. You are free to install the duplicator plugin and take a copy.

Thank you!

#1798489

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you! I took a copy and worked on it locally. Then I started again on a clean install and I was able to reproduce the issue. I am not sure what have I missed the first time when I tried on the test site. This time, the issue was reproduced for the Youtube block with an Embedded Media field and a URL field.

I am escalating this issue to our 2nd Tier for a second analysis, and I'll get back to you as soon as possible.

#1801469

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Our 2nd Tier has worked on the test site that I prepared and wonders why would you like to use a content template for the homepage when you can use the videos directly on the page, without using a content template?
I run a small test on this page hidden link and the Youtube block was pulling the videos successfully from an Embedded Media field and a URL field.

So, we wonder, would it be possible for you to build the homepage without using a content template?
Or do you need to use a content template? If yes, can you explain your use case?

To login to our test site use this URL hidden link

#1802295

I will try to set up the blocks on the page directly and let you know if it works. Thank you!

#1802677

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your feedback. I'll set this ticket as waiting for your reply, it should be kept open for 3 weeks, and you will receive email notifications before it is closed.

The topic ‘[Closed] Youtube Video does not display’ is closed to new replies.