Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 46
  1. #31
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

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

    Quote Originally Posted by pricediscrimination View Post
    I wish but it isn't yet. Before moving to C-PAnel hosting (the onset of this iframe debacle) there were already hundreds of products listed with the iframe code. Now those are not editable unless the videos are removed and code readded to the database manually (or using the old object code).
    Are you familiar with phpmyadmin at all? It wouldn't be difficult to do a SQL search/replace to update all the iframes to objects or embeds.

    Quote Originally Posted by pricediscrimination View Post
    Also, I'd like to keep it all the same ie: hundreds with iframe,
    The thing is, since GoDaddy are disallowing the iframe in the custom $_POST variable you really don't have much choice in the matter. It has nothing to do with cPanel. It is something that Godaddy has explicitly disallowed, and to be perfectly honest I don't dissaprove of this particular restriction. It is possibly one of the few good things they've done.

    Quote Originally Posted by pricediscrimination View Post
    keep it all iframe especially since that seems to be what youtube is supporting most moving forward.
    Did you not read all of my previous message?... Youtube aren't moving *forward* to using iframes, they are taking a step *backwards*.

    There is no need for you to follow their idiocy. If *you* want to move forward rather than backwards you should ignore their code examples and do things the more modern way.

    Quote Originally Posted by pricediscrimination View Post
    I could try the idea of just adding the URL as a variable
    Or better yet... just the video IDs (as per lhungil's suggestion/method)

    Quote Originally Posted by pricediscrimination View Post
    and making the code use that variable within a set iframe code
    Please don't. You aren't doing yourself any favours at all by using iframes, even if that is what youtube provide for their cut n paste code.

    Ask yourself.... Why have godaddy placed a restriction on the iframe, but not the other methods? Who has it 'wrong' GoDaddy or Youtube?

    Although not something you'll hear every day, but in this case its Godaddy that are doing it 'right' and youtube that have got it 'wrong'.

    Quote Originally Posted by pricediscrimination View Post
    but frankly I don't even know where to start.
    This is a little tough because you have 3 options available to you.

    1) Find another host that isn't as 'protective' as Godaddy so you can carry on as you have been.
    2) Using phpmyadmin (or similar SQL tool) and globally replace all of the iframes with the object or embed methods
    3) Using phpmyadmin and globally deleting everything *except* the VideoID's and adding the iframe/object/embed into the relevant places in your template file(s).

    Quote Originally Posted by pricediscrimination View Post
    I was able to get the custom field working with posts from here, but I don't know how to make the input of that field into a variable used by a code to display the videos. Also this would mean going back and redoing all of the existing iframes...
    Other than changing hosts, you have no other option but to redo all of the existing iframes (using options #2 or #3) above.

    Although your best solution (IMO) would be option#3 I think your *easiest* solution (assuming you wish to stay with GD) would be option#2

    Cheers
    RodG

  2. #32
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

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

    PS. I've just been doing a little research on the differences between the iframe/embed/object methods and it appears that my knowledge is a little outdated and the standardised HTML5 iframe method no longer has many of the shortcomings of the earlier implementations.

    Alas, this doesn't help with your problem though because you still can't use them due to GD's mod_security rules.

    Cheers
    RodG

  3. #33
    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 - There is a plugin http://www.zen-cart.com/downloads.php?do=file&id=1340 'YouTube Video on Product Info Page' which does exactly what you want and wouldn't fall foul of GoDaddy's restrictions.
    In a nutshell what the plugin does is store the YouTube identifier (the bit in red www.youtube.com/embed/qpgTC9MDx1o) in a custom field in the products table, and then uses code in the product_info template to add the iframe.
    I've just this week added it to one of the shops I look after and it works well. One downside though is that because it is stored in the products table the same video gets displayed for every language (this may or may not be a problem, in my case it wasn't)
    Might be worth a look.

    Regards

  4. #34
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

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

    RodG and David Allen thank you very much for the replies!

    I will try the plugin, but still this doesn't resolve or explain why they main product field can accept and save iframe code perfectly fine while the custom field cannot. Surely there is a way to recode that custom field to handle the iframe input as flawlessly as the product description field.

  5. #35
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

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

    Quote Originally Posted by pricediscrimination View Post
    RodG and David Allen thank you very much for the replies!

    I will try the plugin, but still this doesn't resolve or explain why they main product field can accept and save iframe code perfectly fine while the custom field cannot. Surely there is a way to recode that custom field to handle the iframe input as flawlessly as the product description field.
    From my reply in post#29

    "I'm still at bit a loss why it would work in the product descriptions though - Perhaps its because it is embedded deep within another $_POST variable rather than being a variable unto itself. It's about the only thing that would be different (and would certainly explain things)"

    Cheers
    RodG

  6. #36
    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
    From my reply in post#29

    "I'm still at bit a loss why it would work in the product descriptions though - Perhaps its because it is embedded deep within another $_POST variable rather than being a variable unto itself. It's about the only thing that would be different (and would certainly explain things)"

    Cheers
    RodG
    I got that part, but how can I apply the same thing to the custom field? Seems that if it works for product description there must be a way to make it work for another field. Also there is more than one language installed so technically two instances of the product field (essentially same code I know) saves the iframe in the database without being blocked by godaddy's mod_security.

  7. #37
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

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

    Just tried to put the iframe in the products url field and it even works there. Of course it doesn't display on the front end, but it saves the iframe code to the database and lets me proceed to the preview.

  8. #38
    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 tried saving the iframe in the custom field wrapped in a div - eg
    Code:
    <div><iframe width="853" height="480" src="//www.youtube.com/embed/qpgTC9MDx1o" frameborder="0" allowfullscreen></iframe></div>
    These mod security rules can be very pernickety. I once had a situation where I found (after much effort) that they rejected any field that started with a four letter word ending in h - bizarre. For that I was able to get the hosting company to change the rules (lucky I wasn't with GoDaddy).

    Even if this does work I would still look at the plugin's method of storing the data (ie just the qpgTC9MDx1o) and using the product_info template to provide the <iframe... bit
    Regards

  9. #39
    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 tried saving the iframe in the custom field wrapped in a div - eg
    Code:
    <div><iframe width="853" height="480" src="//www.youtube.com/embed/qpgTC9MDx1o" frameborder="0" allowfullscreen></iframe></div>
    Just tried this, it didn't work.

  10. #40
    Join Date
    May 2008
    Posts
    402
    Plugin Contributions
    0

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

    Hi guys, just wanted to update this thread and say thanks for the help. I installed the youtube plugin and it works great using just the video ID instead of the full iframe code in the admin. This means every old page needed to be updated, but well worth it since all the videos can now be formatted easily from the tpl_product_info_display.

    An issue I am now facing is that for a responsive site, the only way to make the videos responsive as well seems to be to put the code within a wrapper (http://css-tricks.com/NetMag/FluidWi...WidthVideo.php) but the issue is that for product pages without a video, the extra padding-bottom (56.25% to be exact) creates a HUGE empty white space. Wish there was a way to tell the code to only display this div when there is a video ID entered in the input box in the admin.

 

 
Page 4 of 5 FirstFirst ... 2345 LastLast

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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR