Zen Cart Logo
Forums / Customization from the Admin / 406 Not Acceptable when adding YouTube video in admin on GoDaddy

406 Not Acceptable when adding YouTube video in admin on GoDaddy

Views: 10,148

Results 41 to 46 of 46
21 Nov 2014, 6:08 PM
#41
david_allen avatar

david_allen

Zen Follower

Join Date:
Feb 2008
Location:
Amersham, Buckinghamshire, United Kingdom
Posts:
141
Plugin Contributions:
1

406 Not Acceptable when adding YouTube video in admin on GoDaddy

Hi
I think the plugin does wrap the iframe in a div only if there is a video

<?php echo (($flag_show_product_info_youtube == 1 && $products_youtube !='') ? '<div id="productYouTube"><iframe width="420" height="315" src="http://www.youtube-nocookie.com/embed/' . $products_youtube . '?rel=0&showinfo=0&fs=0"  frameborder="0" allowfullscreen></iframe></div>' : '') . "\n"; ?>

so just apply the ccs-tricks bit to #productsYouTube ie

#productsYouTube {
position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 25px; height: 0;
} #productsYouTube iframe {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

Hope this helps

21 Nov 2014, 6:18 PM
#42
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: 406 Not Acceptable when adding YouTube video in admin on GoDaddy

RodG:

OK, so there is defintely something in that $_POST variable that is triggering the error.

Can you please confirm if the problem goes away (or not) if you remove
'youtube_vids' => zen_db_prepare_input($_POST['youtube_vids'*]) *

Cheers
RodG

OMG brilliant! This worked perfectly! Something I tried to fix for months and you solved it in minutes! Would love to send you a tip or something to say thanks!

22 Nov 2014, 7:44 AM
#43
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: 406 Not Acceptable when adding YouTube video in admin on GoDaddy

David Allen:

Hi
I think the plugin does wrap the iframe in a div only if there is a video

<?php echo (($flag_show_product_info_youtube == 1 && $products_youtube !='') ? '<div id="productYouTube"><iframe width="420" height="315" src="http://www.youtube-nocookie.com/embed/' . $products_youtube . '?rel=0&showinfo=0&fs=0" frameborder="0" allowfullscreen></iframe></div>' : '') . "\n"; ?>
> 
> so just apply the ccs-tricks bit to #productsYouTube ie
> 
> ```
#productsYouTube {
position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 25px; height: 0;
} #productsYouTube iframe {
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

Hope this helps

Quoted the wrong post earlier, don't know why. It was: "OMG brilliant! This worked perfectly! Something I tried to fix for months and you solved it in minutes! Would love to send you a tip or something to say thanks!"

Actually this works to get rid of the padding when no video code is present, however, it does not make the video responsive for some reason.

22 Nov 2014, 9:37 AM
#44
david_allen avatar

david_allen

Zen Follower

Join Date:
Feb 2008
Location:
Amersham, Buckinghamshire, United Kingdom
Posts:
141
Plugin Contributions:
1

Re: 406 Not Acceptable when adding YouTube video in admin on GoDaddy

Have you got a link to your site - maybe a new pair of eyes on the problem might help

22 Nov 2014, 9:42 PM
#45
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

Re: 406 Not Acceptable when adding YouTube video in admin on GoDaddy

David Allen:

Have you got a link to your site - maybe a new pair of eyes on the problem might help

Fixed it! The code in your post was productsYouTube with an s but I removed the s to productYouTube and now it works perfectly. I still want to tip you or do something in return, thank you so much for helping me solve this.

23 Nov 2014, 12:30 AM
#46
david_allen avatar

david_allen

Zen Follower

Join Date:
Feb 2008
Location:
Amersham, Buckinghamshire, United Kingdom
Posts:
141
Plugin Contributions:
1

Re: 406 Not Acceptable when adding YouTube video in admin on GoDaddy

Well spotted :)
No need for a tip - just check the forum every so often and see you you can help someone else.
Regards