Issue embedding youtube video in product description 2

Issue embedding youtube video in product description 2

Avatar image
Nov 22, 2013
Petete wrote
I'm having trouble replying the original post, so I'm doing it here. Not much point in looking back anyway.
I said there's a problem embedding youtube code in the product description, you said ok we have an editor and it's done that way, and here we are. So my reply:

Yes, I know. Problem seems to be that Youtube doesn't include "http:" in the embed code anymore. Source definition its as of now (you can check it yourself) like [src="//www.youtube.com/embed/..."] instead of [src="http://youtube.com/embed/..."] and that makes store manager freeze for a while, show browser's error page in product description preview and the window gets stuck even changing selected product on the grid. And you can also loose the whole description for that language. It's a mess.

And also if the shortened Youtube video share link has a dash in it (http://youtu.be/x-xxxxxxxxx) and you try to embed it with: [HTML editor]/[Insert/Edit Embedded Media]/[File/URL], the url translation gets cut off at the dash (http://www.youtube.com/embed/x), therefore not showing the video properly. I think both things need fixing.
Reply
9 Answers
Avatar image
Nov 22, 2013
Petete wrote
Can someone look into this to confirm this behaviour please?
Avatar image
Nov 25, 2013
Dmytro Grycelyak agent wrote
Hello Petete,

As we know, the embed video links for you tube contain http://, like http://youtu.be/6v2L2UGZJAM

And it should work fine in the HTML Editor used in the Store Manager.

Please specify the exact youtube link that doesn't work for you in the Store Manager.
Avatar image
Nov 25, 2013
Petete wrote
There are two ways to embed a youtube video in the product description. By copying the embed code (html code) provided by Youtube in the sharing options and by inserting the video link (the shortened url not the embed html code itself) through the store manager html editor.

The first one, inserting the html code provided by youtube directly into the description window using RAW html edit mode, with this particular video, would be (copy/paste from youtube sharing video options):

<iframe width="560" height="315" src="//www.youtube.com/embed/8-j0UC4smfM" frameborder="0"></iframe>

If you do that (paste the code, accept the changes and untick the raw mode box for a preview), you should start seeing (or at least we do) the weird behaviour I was talking about.
I have plenty of descriptions from months ago with embedded youtube video that don't pose any problem at all. Those were inserted using this method and they look like:

<iframe width="560" height="315" src="http://www.youtube.com/embed/8-j0UC4smfM" frameborder="0"></iframe>

As you can see, the only difference is the inclusion of "http:". Youtube must have changed something. That code though (without the "http:" works fine anywhere else). That shouldn't be a problem but whenever the product with such a description is selected in the store manager grid, the description window gets stuck, hangs or worse depending on the user's patience.

I'm not saying the store manager should be aware of every video platform update. That would be crazy, but at least prevent the description preview engine from causing problems whenever bad html code is presented. That is obviously, provided that someone else can reproduce this behaviour and there's nothing wrong with my software (tested on two machines). That's why I'm asking you to look into it.

The second way is to use the 'edit/insert embedded media' button in the HTML Editor and paste the video link (the actual shortened url) into 'file/url' field:

http://youtu.be/8-j0UC4smfM

This method works fine for any youtube url except for those with a dash in it. See what happens when you try it with the url above. It should be translated to the full url, but it gets cut off at the dash (at least mine does). So no video is shown.

So that makes two kind of bugs. Is it only me?
Avatar image
Nov 26, 2013
Dmytro Grycelyak agent wrote
The HTML Editor which is used in the Store Manager allows to use any youtube link (you can even paste a regular URL from browser address line, and it will be changed to the embed link), however the "http://" is required, please see a short video: http://www.youtube.com/watch?v=8-j0UC4smfM

Concerning the "http://". Find the attached html file containing the youtube embedded videos (one has a link with http:// and the second is with the link, copied from the youtube and pasted to the file).
Try to open both of the in any web browser.
Avatar image
Nov 26, 2013
Petete wrote
I think there is a misunderstanding. Yes, I know both codes (with and without "http:") work on any browser (any but the one used in Store Manager). I said just that.

Again, my concern is that in Store Manager, when you select a product on the grid that has a description with a youtube video embedded in it (pasting the code without "http:"), the product description window freezes (because Store Manager uses some kind of browser engine that doesn't tolerate the embed code without "http:").

It takes forever to load that description and if and when it does (sometimes shows the internal browser error page in the description window) it gets stuck even changing selection to another product on the grid. The program lets you navigate and select other products on the grid but it keeps showing the same frozen description for a while. Sometimes you end up losing that description (it becomes blank). And restarting the Store Manager program doesn't solve the problem.

Later on I will try to post a pic.

Regarding the Store Manager HTML Editor, I know how it works. What I'm saying is that when you paste a shortened url that has a dash in it:

http://youtu.be/8-j0UC4smfM

the outcome is like (maybe not exactly because I'm out of the office right now):

<iframe width="560" height="315" src="http://www.youtube.com/embed/8" frameborder="0"></iframe>

As you can see, the video url gets cut off at the dash. Just open Store Manager, create a new product, open the HTML Editor, click the 'insert/edit embedded media' button, and paste that shortened url below into the 'file/url' field. Accept and see what you get.
Avatar image
Nov 26, 2013
Petete wrote
I've made a video instead. So you can see what I mean.

BTW, this one also has a dash in it :) and also gets cut off

Check this out:

http://youtu.be/89Tg-9aOkDc
Avatar image
Nov 27, 2013
Dmytro Grycelyak agent wrote
Thank you for captured video.

You see, when you insert a video into the HTML editor implemented in PrestaShop you may use the full youtube link, which will be automatically converted into the appropriate one.

The Store Manager uses the same HTML editor then PrestaShop. You should try to paste this link into http://youtu.be/89Tg-9aOkDc the HTML editor used in the back-end and you will see that it will be cut off as well: http://screencast.com/t/8l6NUAIrm4y

And if you paste a full URL from browser, it will work fine.
Avatar image
Nov 27, 2013
Petete wrote
Ha ha. Ok, so if Prestashop falls of a cliff... I have Prestashop 1.4.6.2 and I can assure you that the backend html editor from that version does not cut off any url with a dash in it. Must be something from newer versions.

But still, the most important problem remains: Store Manager keeps freezing whenever embed code without "http:" is included directly through raw html editing descriptions. And also, Prestashop 1.4.6.2 backend editor does not do that. It handles raw html code copy/paste with or without "http:" flawlesly.

All I'm saying is that the whole program freezing and losing data (that's the worst part) over that simple thing is something really annoying to be considered. I think it's safe to say that this behaviour qualifies to be scheduled for fixing. Don't you think?
Avatar image
Nov 28, 2013
Dmytro Grycelyak agent wrote
Thank you for your repost.

Yes, we have just checked the it in the version you use 1.4.6.2 and the link is not getting cut off. However the Store Manager for PrestaShop works with the same HTML editor than the latest shopping cart version.

We recommend you to use full youtube links in the HTML editor of the Store Manager and it should fix the issue.