Jump to content

Error when saving after creating a popup


Recommended Posts

Hallo,

 

I want to create a simple popup window that appear with mouseover when the cursor is positioned over a specific word (i.e. I want an image showing a cart to appear when the cursor is positioned over the word "cart").

I created an help page with CMS in which I want to do that (obviously using TinyMCE as editor)

I an working in a test environment: win 7 with xampp running

 

This the way I proceed:

1. Select the word and then click on the create\edit link button

2. Select the "popup" tab and

3. From this tab I select the image to link, size, position, name, etc

4. On "event" tab onmouseover

5. Apply 

 

Until here eveything works fine, but when I try to save the page in PS BO an error comes up: 

[PrestaShopException]

Property CMS->content is not valid
at line 878 in file classes/ObjectModel.php

872.
873.                 $message = $this->validateField($field, $value, $id_lang);
874.                 if ($message !== true)
875.                 {
876.                     if ($die)
877.                         throw new PrestaShopException($message);
878.                     return $error_return ? $message : false;
879.                 }
880.             }
881.         }
882.

 

Thanks in advance

Link to comment
Share on other sites

you use markups that are not allowed in validation isCleanHtml function.

you have to modify it (classes/Validation.php - isCleanHtml function)

Thank you for the reply.

I looked for the classes/Validation.php file, but I only found a "validate.php" file in which there isn't any isCleanHtml function to modifiy.

I am using PS 1.5.6.

Can you pls provide more detailed info about this issue?

Thanks in advance 

Link to comment
Share on other sites

As you suggest on your tinyMCE tut, I just commented line 402 and 403 in validate.php as follows and it works!

 
//if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html))
// return false;
 
thanks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...