Video embeds in Portfolio go to 404

I don’t know if it’s coincidence or not, but after updating X and cornerstone, I’ve noticed that all my Portfolio items set to ‘media type: video’, no longer display the embedded Vimeo videos at the top of the Portfolio item, or in the Portfolio parent page. Instead, my 404 page is showing in the area that the video should. Videos displayed perfectly until yesterday/today.

An example can be seen here:

The embed code I have set for that page is:

<iframe src="https://player.vimeo.com/video/260749071?title=0&byline=0&portrait=0" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>

Please advise because this looks really messy.
Thank you.

Hello Dan,

Thank you for the very detailed post information.

Please go over your portfolio items and make sure that the embed code is valid and correct. In most case, a broken iframe code may affect our portfolio page.

Meanwhile, the 404 error could be because of the portfolio slug conflict. Do you have any category, tag or a page that bear the “Article” slug? You might need to change the portfolio slug in X > Theme Options > Portfolio > Custom URL Slug.

If nothing else is working, we would love to check your settings. Please provide us access to your site. You can send us your WP credentials by adding it in a secure note when you reply to us. To know how to create a secure note, please check this out: https://theme.co/apex/forum/t/how-to-get-support/288

Best Regards.

Thanks for your reply. I’ve made a secure note for you.

The embed codes haven’t changed and has worked properly for a long time, until now. This affects every Portfolio item set as video - there are 4 or 5 of them on my site under ‘Portfolio’ in the menu. You will notice my 404 page now displays where the video should at the top of each video portfolio post and in the preview on the main portfolio page.

The portfolio slug also hasn’t changed and I haven’t created anything that would conflict with that. I did change it just now to check but the same problem remains.

Please be gentle with my site!

Hey Dan,

This issue is most probably in your database or WordPress character encoding setup. It somehow alters the double quotes so when the iframe code is outputted, the double quotes are doubled.

A quick solution would be to change all the double quotes to a single quote.

I tested that and your video worked.

Please note that this is not an issue with our theme. I pasted your iframe code in all my test sites and I didn’t get this issue since I use a standard WordPress install with UTF8 encoding. Since this is not an issue with our theme, you’ll need to contact either your web host or a third party developer to check why the double quotes in the iframe code stored in the Embedded Video Code field are altered.

Hope that helps.

Thanks for your response, Christian. That is strange. I haven’t changed or added anything except for updating X, wordpress itself and Cornerstone, so I can’t imagine what could suddenly cause this. Your fix works though so I will just do that on all video posts.

Thanks for your help.

You’re welcome, Dan. There might be some changes in WordPress that resulted to this in your site.Our theme or our products in generally don’t have connection to database encoding.

Hey Dan,

I’m sorry for the wrong information here. I investigated this further and found that this is indeed due to the change in our x_featured_video function. Previously, we use htmlspecialchars_decode to filter the embed code but now it was changed to wp_specialchars_decode. This has now been reported to our development team and a fix might be included in the succeeding updates.

The single quote fix still applies.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.