#822 Posted in ‘Route 66’

Latest post by Lefteris Kavadas on Monday, 21 March 2022 10:46 EET

herve D
 Hello
For some time, I have problems on some sites, with a (random) problem of displaying the thumbnail of videos (missing or double thumbnail ...).

I have now identified the problem (on a new test website).
It comes from the activation of "Replace iframes with facades".
You could tell me to disable this setting. I can't because it produces more damage and I have to keep Route 66.
Would it be possible to solve this problem?
Better yet, taking into account the now native use of video integration via the insertion of an iframe dasn the editing of an article from joomla 4! This produces a standard tag "iframe"

Regards

Lefteris Kavadas
Hi herve,

Can you please provide a link to the page with the issue? The iframe facades work only with Youtube and Vimeo videos at the moment. If you are not using those services you can safely disable that feature.

Regards

herve D
Hello Lefteris
Here is the link of the test site.
https://joom41test.88h.ovh/

Of course, I disabled it, but it produces problems elsewhere.
I think it is incompatible with the standard method (from joomla 4) or I integrate :
<p><iframe width="560" height="314" src="https://www.youtube.com/embed/8oSIq5mxhv8" allowfullscreen="allowfullscreen"></iframe></p>
or with the responsive part?
Regards

Lefteris Kavadas
What kind of problems does disabling this causes? The video should work fine even without Route 66 on your site.
In any case, this has nothing to do with the Joomla version. It has to do with the specific video which for some reason does not provide the standard definition thumbnail. I guess that if you use a different video it will display with no issues. Can you please try?

Regards

herve D
Hello
yes it works with some videos and not with others when route66 is installed.
If I don't put this parameter, I lose the responsive part (especially on blogs)
If I don't use route66, it works, but I don't have the responsive part

If I use another paid plugin, I don't have this problem but I have to use route66 for a special configuration of the urls

yes this is not related to joomla4. What I wanted to say (and suggest) is that if you took into account the format recognized natively now by joomla 4, of media / video with iframes, it could work better, because it works like that with the other plugin

Regards

Lefteris Kavadas
Hi,

I don't understand the difference between the Joomla 4 media/video iframes. I don't see any difference between Joomla 4 and Joomla 3. At the end it's just an iframe on your page.
Can you please clarify how it works with the other plugin?

Route 66 builds the thumbnail URL in file plugins/system/route66pagespeed/route66pagespeed.php on line 294:
$thumbnail = 'https://img.youtube.com/vi/' . $id . '/sddefault.jpg';

Try to change this line to the following code:
$thumbnail = 'https://img.youtube.com/vi/' . $id . '/hqdefault.jpg';


This should fix the issue and you should have thumbnails for all videos. If not please let me know.

Regards

herve D
Hello
Thanks for this code
It worked fine on the j4.1 site but not on the J!4.05 site
It's strange but I don't have too much time to keep spending a lot of time on this.
I'll have a look in 1 month after the migration of the production site to 4.1!
Regards

Lefteris Kavadas
Hi,

This has nothing to do with the version of Joomla. Youtube does not provide always all the sizes for images for all videos. It has to do with the videos.
I will try to find a solution. Thank you for reporting this.

Regards

herve D
Hello
Sorry but I didn't see the changelog in the documentation, download or presentation of the extension. Does version 1.9.4 improve this problem?
I just tested the new version because I got error notices but they are still there.
Probably not serious but is it possible to solve them?
Is this version compatible with php 8.1?
Regards

Lefteris Kavadas
Hi,

No unfortunately this change was not added in the release. The reason is that this worked for some videos but stopped others from working.
As I wrote in a previous answer not all videos have all the thumbnails size. So I have kept the sddefault.jpg which seems to be the size that most videos have.

Regards

herve D
Hi
Ok I hear even if I'm still annoyed.
Otherwise I was asking you if your new version is php 8.1 compatible ? and also if you could note the messages ?
Regards

Lefteris Kavadas
Hi,

Route 66 should work fine with PHP 8.1 If you face any issues please let me know.

I made some updates so lazyload works for all videos.
You can download the development version from https://www.dropbox.com/s/hjylj4tp8macclz/pkg_route66-master.zip?dl=1

Please let me know if that works for all videos now.

Regards

herve D
Hello
Unfortunately this did not solve anything. I even have the impression that it is a little slower with a red background displayed.
In fact there is a conflict with the plugin:
https://onlinecommunityhub.nl/documentation/ochfitvids-content-plugin
This one takes the iframe generated : <p><iframe width="560" height="314" src="https://xxxx" allowfullscreen="allowfullscreen"></iframe></p> natively by inserting a media under joomla 4.0+!
I tried to modify the "Restriction mode" of Defer offscreen iframes (Lazy loading) which seems to be the element that breaks everything
If you want, I can send the plugin ochFitvids
Regards

Lefteris Kavadas
I am not trying to solve the conflict with the other plugin.
The update I sent you should fix the blank thumbnails issue. Now all videos should have thumbnails.

Plugins like ochFitvids will never work with videos lazy load of Route 66.
The reason is that lazy load is replacing the iframe element with a div until user clicks on it.

You need to choose one of them.

Just see how the page you sent me performs in Google PageSpeed Insights: https://pagespeed.web.dev/report?url=https%3A%2F%2Fonlinecommunityhub.nl%2Fdocumentation%2Fochfitvids-content-plugin
And compare this to a page of our site which is using videos lazy load: https://pagespeed.web.dev/report?url=https%3A%2F%2Fwww.firecoders.com%2Fjoomla-extensions%2Fshowtime-image-gallery

The speed of the page is an SEO ranking factor. That's why we added lazy load to Route 66. And as you saw the results are great!

It's 2022 you don't need a plugin to make your videos responsive. You can do it with a bit of CSS in your template using the aspect-ratio rule:
iframe {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: none;
}


I hope this helps.

Regards

herve D
Hi
ok i hear what you say and your suggestion.
I'm thinking about it
Regards

Lefteris Kavadas
That's great. Please let me know if you need help.

Regards

Note: An active subscription is required in order to get support for our paid extensions. For our free extensions, if you don't have an account, register and then submit your support request.  In case you just want to ask a question, you can also use the contact form .

Firecoders
Are you using our extensions? Please post a review at the Joomla extensions directory!
Post a review