403 error when embedding YouTube video

3 posts by 3 authors in: Forums > CMS Builder
Last Post: October 3, 2022   (RSS)

By CommonSenseDesign - October 3, 2022

Hi, All. I'm trying to embed a YouTube video in a blog post using the code that YT generates. Whenever I attempt to save the page, I get a 403 error message.

The field has been set up to accept MP4 and MPEG files.

Any suggestions for how to fix this, please?

By gkornbluth - October 3, 2022


Here's the code I use for embedding, which is very similar to yours, except that you're missing the ?rel=0&controls=1&showinfo=0" after the YouTube Short Code (everything after the /embed/).

I use the info 4 field in an image to hold the YouTube Short Code but you can use a separate text field as well

<iframe width="500" height="300" style="border:medium double #333333" src="https://www.youtube.com/embed/<?php foreach ($salon_e_blastsRecord['images'] as $index => $upload): ?><?php echo $upload['info4'] ?><?php endforeach ?>?rel=0&controls=1&showinfo=0" frameborder="0" allowfullscreen></iframe>

The only other differences that I see is the added switches like accelerometer encrypted, etc. I'd try adding the ?rel=0&controls=1&showinfo=0" and possibly eliminating all but the switches that I use and see what happens. Then add them back one at a  time.

Hope that helps

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php