Issue with iframe code that worked in joomla 3 but doesnt work in joomla 4 or 5

General questions relating to Joomla! 5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
danbr1
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed May 08, 2024 8:50 pm

Issue with iframe code that worked in joomla 3 but doesnt work in joomla 4 or 5

Post by danbr1 » Wed May 08, 2024 8:56 pm

Hi all,

I'm having a struggle and hoping for some help please.

I have this code which worked correctly in joomla 3 however, it isn't working in joomla 4 or 5. It throws up errors

"<iframe allowFullscreen="true" height="100%" width="100%" src="https://play.streamingvideoprovider.com ... "></iframe>"

Any ideas please?

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9874
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Issue with iframe code that worked in joomla 3 but doesnt work in joomla 4 or 5

Post by AMurray » Wed May 08, 2024 9:47 pm

Iframes are not ideal, (and are security risks), and you should probably use a more modern method to embed a video such as HTML5's <video> tag or use a plugin from the extension directory for inserting video.

However, the full-screen option should only be shown when the video plays, such as with You Tube, you can see its video size options along the bottom of the video screen.(full, cinema, mini or stream to TV etc).

Joomla is known for removing HTML like iframes, for security reasons. You can prevent that in the text filtering options (global configuration).

Can we see your site that should contain that video? Perhaps the video provider simply doesn't allow iFrame embedding? Or your browser is set to block iframes, or Joomla is removing that code from your page.

That said, here's an example of You Tube's 'embed' code:

Code: Select all

<iframe width="560" height="315" src="https://www.[youtube].com/embed/2p1AWvp2bx4?si=34TOjZ7DSbITcxdG" title="[youtube] video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
.

See if your code matches that, or that you're setting the things correctly. Note "allowfullscreen" doesn't have "=true" following it.

Sorry - long-winded reply for something that should be fairly simple 🤔
Regards - A Murray
General Support Moderator


Post Reply

Return to “General Questions/New to Joomla! 5.x”