Page 5 of 5 FirstFirst ... 345
Results 41 to 46 of 46
  1. #41
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: 406 Not Acceptable when adding YouTube video to new product

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

    Code:
    <?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

    Code:
    #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

  2. #42
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: 406 Not Acceptable when adding YouTube video to new product

    Quote Originally Posted by RodG View Post
    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!

  3. #43
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: 406 Not Acceptable when adding YouTube video to new product

    Quote Originally Posted by David Allen View Post
    Hi
    I think the plugin does wrap the iframe in a div only if there is a video

    Code:
    <?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

    Code:
    #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.

  4. #44
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: 406 Not Acceptable when adding YouTube video to new product

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

  5. #45
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

    Default Re: 406 Not Acceptable when adding YouTube video to new product

    Quote Originally Posted by David Allen View Post
    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.

  6. #46
    Join Date
    Feb 2008
    Location
    Amersham, Buckinghamshire, United Kingdom
    Posts
    141
    Plugin Contributions
    1

    Default Re: 406 Not Acceptable when adding YouTube video to new product

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

 

 
Page 5 of 5 FirstFirst ... 345

Similar Threads

  1. v151 HTTP 406 error (Not acceptable) when Submit Sitemap to goole
    By louisapple in forum General Questions
    Replies: 1
    Last Post: 13 Mar 2013, 10:48 AM
  2. 406 Not Acceptable when updating a product
    By Markjoe in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 Sep 2011, 04:16 PM
  3. 406 Not Acceptable
    By groovy-stuff in forum General Questions
    Replies: 5
    Last Post: 6 Jan 2008, 01:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg