Jump to content

Recommended Posts

I have a problem with a iframe tag.

 

I used a iframe tag on a CMS page and inside of the page i embed in the iframe tag there is a Link but when i click it load the page inside on the iframa and i want a normal page load, i mean a Complete page load.

 

Any help????

 

Cheers!

Share this post


Link to post
Share on other sites

try this

 

back office-->preferences-->general

 

set "allow iframes in html", to yes

 

it states it's no recommended..

 

I don't really know what it does specifically, but did notice it existed.

 

good luck

  • Like 3

Share this post


Link to post
Share on other sites

this option allows to use iframes in product descriptions /cms pages. I've notied that after upgrade to 1.5.5 this option is automatically switched to OFF, so merchants have got problems like this one

Share this post


Link to post
Share on other sites

Hello everybody !

 

i have the version 1.5.4 and i can not user this option.

how can i do without this to activate the iframe??

 

Thank you

Share this post


Link to post
Share on other sites

in this case you have to edit the validation object, there is a code where you can include / exclude accepted html tags.

it's a part of classes/validate.php file (isCleanHtml)

Share this post


Link to post
Share on other sites

Thank you !

 

Have i to change this 

('/<[ \t\n]*i?frame/ims'

With this : 

('/<[\s]*(i?frame|form|input|embed|object)/ims'

???

Share this post


Link to post
Share on other sites

hello
 
you use 1.5.4.1 ? 
there is a code:
 

6v6SWsJ.png

can you just remove the: 

&& !preg_match('/<[ \t\n]*i?frame/ims', $html)

Share this post


Link to post
Share on other sites

glad that i could help you a little, im so sorry for my late response here (2 weeks :|)

Share this post


Link to post
Share on other sites

im so confused that this code,  && !preg_match('/<[ \t\n]*i?frame/ims', $html) can you explain me step by step please, i use prestashop 1.5.5

Share this post


Link to post
Share on other sites

I'm sorry, may be i'm wrong but, if ENOK have 1.5.5, i think he have just to go in configuration of admin prestashop. no??

Share this post


Link to post
Share on other sites

<_<  i've seriously tried everything - for the last 3 days. and the answer was so easy! god damnit! 
but, Thank you El Patron!

 

try this

back office-->preferences-->general

set "allow iframes in html", to yes

it states it's no recommended..

I don't really know what it does specifically, but did notice it existed.

good luck

  • Like 1

Share this post


Link to post
Share on other sites

so merchants have got problems like this one 

 

hello

 

you've got full solution to this problem above, just read step by step whole thread and everytihng will work fine, believe me :)

Share this post


Link to post
Share on other sites

Vekia that part of code does not exist in my Valadation.php

 

Edit....dumb dumb user error. I found it

ok, you found it, so, after edit code that i suggested, does it work well ?

Share this post


Link to post
Share on other sites

Just for others, with this problem, to know. I had previously done modifications that allow to use full tinyMCE on CMS pages (vekia's tutorial) and I've enabled iframes through back office (using presta 1.5.5.) but still couldn't save a CMS page with iframes in it. I checked the classes/Validate.php file and found this on line 392 

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

Just changed it to true and everything's working great. I just wonder why that kind of code still exists after all the modifications and changes made  :ph34r:

Share this post


Link to post
Share on other sites

Just for others, with this problem, to know. I had previously done modifications that allow to use full tinyMCE on CMS pages (vekia's tutorial) and I've enabled iframes through back office (using presta 1.5.5.) but still couldn't save a CMS page with iframes in it. I checked the classes/Validate.php file and found this on line 392 

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

Just changed it to true and everything's working great. I just wonder why that kind of code still exists after all the modifications and changes made  :ph34r:

 

have you followed second part of my tutorial? i released little update for prestashop in version 1.5.5

  • Like 1

Share this post


Link to post
Share on other sites

I obviously have not, my mistake :) Thanks for the great tutorials vekia!

  • Like 1

Share this post


Link to post
Share on other sites

you're welcome B) im so glad that it works for you now as you expected.

im usually updating tutorials and modules when prestashop add some new features to the core

in this case was the same

 

with regards,

Milos

Share this post


Link to post
Share on other sites

Hey, what is the code for solving the iframe problem in 1.5.3 for cms pages? My iframes in product pages work perfectly, just not in cms pages. Thank you!

 

Edit: apologies, is it the same for 1.5.4? Just want to confirm.

Edited by justicejustine (see edit history)

Share this post


Link to post
Share on other sites

you will need to extend tinymce editor (it's necessary) and also modify Validate.php class file to accept iframes

  • Like 1

Share this post


Link to post
Share on other sites

So, will it all work if I just follow your tutorial here: http://mypresta.eu/en/art/developer/prestashop-product-page-full-rich-editor.html

 

Edit: so the tutorial will basically cover extending tinymce editor and modification of Validate.php and allow iFrame to work in cms? Just want to confirm.

 

you will need to extend tinymce editor (it's necessary) and also modify Validate.php class file to accept iframes

Edited by justicejustine (see edit history)

Share this post


Link to post
Share on other sites

So, will it all work if I just follow your tutorial here: http://mypresta.eu/en/art/developer/prestashop-product-page-full-rich-editor.html

 

Edit: so the tutorial will basically cover extending tinymce editor and modification of Validate.php and allow iFrame to work in cms? Just want to confirm.

that's correct. just follow steps there, and you will be able to add iframes

Share this post


Link to post
Share on other sites

Hi,

I hace some javascript code it is well executing in 1.4 but its is not executing in 1.5 .It is giving error as The content field (English (English)) is invalid.

Please let me know is java script works in Prestashop 1.5.If works how to use them

 

Thanks in advance

Share this post


Link to post
Share on other sites

Hi,

I hace some javascript code it is well executing in 1.4 but its is not executing in 1.5 .It is giving error as The content field (English (English)) is invalid.

Please let me know is java script works in Prestashop 1.5.If works how to use them

 

Thanks in advance

 

in this case it's necessary to modify tinymce object (extend features) and also modify validation class, more information (full guide) here: tinymce cms pages js support

Share this post


Link to post
Share on other sites

plz help

 

The content field (English (English)) is invalid.

 

<html>
<head>
<title></title>
</head>
<body>
<img onmouseover="(src='http://s14.directupload.net/images/131212/lt6vqtyu.png')" onmouseout="(src='http://s14.directupload.net/images/131212/bq8jcqt8.png')" src="http://s14.directupload.net/images/131212/bq8jcqt8.png" alt="" border="0">
</body>
</html>
 

Share this post


Link to post
Share on other sites

can you try to use code without:

<img onmouseover="(src='http://s14.directupl...12/lt6vqtyu.png')" onmouseout="(src='http://s14.directupload.net/images/131212/bq8jcqt8.png')" src="http://s14.directupl...12/bq8jcqt8.png" alt="" border="0">

will see what's goin on then

Share this post


Link to post
Share on other sites

maybe you could try this

 

classes/Validate.php

 

change

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

to

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

note this is 'untested'.  The proper way would be to modify cms controller to pass value as true.

Share this post


Link to post
Share on other sites

problem is related to script.

$events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange';
    $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend';
    $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove';
    $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel';
    $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart';
    $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange';
    $events .= '|onselectstart|onstart|onstop';

in validate.php use just this:

public static function isCleanHtml($html, $allow_iframe = false){
    return true;
}
  • Like 1

Share this post


Link to post
Share on other sites

How can I enable iframes on PrestaShop 1.4 ?

 

did you read the above posts before asking the same question?

Share this post


Link to post
Share on other sites

as far as i remember in prestashop 1.4 iframes are allowed by default... 

Share this post


Link to post
Share on other sites

as far as i remember in prestashop 1.4 iframes are allowed by default... 

Not from my experience - couldn't add them to my page until I implemented the tweak. Maybe they were disabled in 1.4.11

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More