Jump to content

[SOLVED]Cant put Youtube video on Long Descrption


Recommended Posts

Hi, I need help on putting youtube videos on my long description products page.

 

What happened is whenever im trying to Embeded youtube video, the error:

 

The description field (English (United States)) is invalid.

 

So how i solve this matter, can anyone help me? 

 

Thanks

Edited by khairulaizat92 (see edit history)
Link to comment
Share on other sites

I suppose you can embed YouTube video with <iframe> tag like this one:

<iframe width="480" height="360" src="//www.youtube.com/embed/bnmAoHiAHJQ?rel=0" frameborder="0" allowfullscreen></iframe>

These links can help:

 

http://www.prestashop.com/forums/topic/104066-tinymce-iframe-element/

http://www.prestashop.com/forums/topic/159125-adding-iframe-into-product-description-using-prestashop-1441/

http://www.tinymce.com/forum/viewtopic.php?id=6332

Link to comment
Share on other sites

I suppose you can embed YouTube video with <iframe> tag like this one:

<iframe width="480" height="360" src="//www.youtube.com/embed/bnmAoHiAHJQ?rel=0" frameborder="0" allowfullscreen></iframe>

These links can help:

 

http://www.prestashop.com/forums/topic/104066-tinymce-iframe-element/

http://www.prestashop.com/forums/topic/159125-adding-iframe-into-product-description-using-prestashop-1441/

http://www.tinymce.com/forum/viewtopic.php?id=6332

 

Thanks but is seems thats not the problem.

go to preferences > general and switch this option:

s3Ppb6f.png

Thank God You showed up, yes this is what im looking for, im keep wondering why i can post a video, for the start its the magicquote problem, after fixing the PHP.ini, than this problem suddenly occured, thanks :D

 

I will mark this as solved

Link to comment
Share on other sites

glad to hear that another problem is solved today :)

may i know what ps version you use? as far as i know magic quotes will be deprecated in new php

Yes, i thought it supposed to be like that to, Im using 1.5.5.0, its quite surprises me when this problem occured while on the update report, the Magic quote aren't supposed to disturb presta. 

 

But i manage to solve it by refering to this site, the guide are quite old but yet still can be use

 

http://www.prestatraining.com/12-tips-to-optimise-your-php-ini-file-for-prestashop/

Link to comment
Share on other sites

  • 2 weeks later...

go to preferences > general and switch this option:

s3Ppb6f.png

Hi Vekia,

 

I'm having a problem wiht embedded Youtube videos. The product page keeps loading and you can't do anything on the page.

I was looking for this setting you showed, but it's not appearing on preferences > general.

 

Do you know how I can make this work or at least find this setting ;)

 

I'm using v1.5.3.1

Link to comment
Share on other sites

really weird that you haven't got this option in preferneces > general tab...

so, there is another method to fix it, try to change this:

 

 


In prestashop\classes\Validate.php

line 392  At 

public static function isCleanHtml($html, $allow_iframe = false)
 

comment out this code

/*
        if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html))
            return false;

        if (!$allow_iframe && preg_match('/<[\s]*(i?frame|form|input|embed|object)/ims', $html))
            return false;
*/
 
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...