Jump to content

Can not add configuration PS_CART_FOLLOWING


Recommended Posts

prestashop version 1.5.4.1

 

I went to preferences -> Customer -> and I have activated recording process type "Standard (account creation and address) once selected this I did save but I get this error

 

Can not add configuration PS_CART_FOLLOWING

 

also activating other method of recording

 


  1. Can not add configuration PS_REGISTRATION_PROCESS_TYPE
  2. Can not add configuration PS_CART_FOLLOWING

 

 

what happened?

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

Okkkkkkkkk, after a few hours spent cursing, i found the problem. In my case was function isCleanHtml() on file /class/validate.php modified following a guide finded on internet... and wrong.

 

Solution: File validate.php overwrited with original, and now everything work fine!

 

Best Regards,

Simone Giusti

Link to comment
Share on other sites

@Vekia: Hi Vekia, i have modified isCleanHtml() to remove control of <script> tag, following an online guide. Unfortunately, the guide was incorrect and caused an incorrect return() value, which in turn caused the error "Can not add configuration" during the settings update on back office.

 

@lui1969: with new istallation have you solved the problem?

Link to comment
Share on other sites

@pablog: here's how I did to solve the problem:

 

(after modification of admin theme...)

 

i have add in /classes/validate.php

public static function isCleanHtml2($html, $allow_iframe = false)
	{
		$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';
		return true;
	}

and i have modified /classes/product.php (about row 300)

'description' => 				array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'),

to

'description' => 				array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml2'),

Following Vekia guide i think that some hacker could inject malicious code in front office!

 

I hope that my modification will be of help.

 

Best Regards,

Simone Giusti

 

PS: i don't know if in funtion isCleanHtml2, $events could be removed...

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

×
×
  • Create New...