Sunday, June 14, 2015

[PrestaShop] A problem in ‘TECHNICAL ERROR: unable to load form. Details Error thrown:’ message

[PrestaShop] A problem in ‘TECHNICAL ERROR: unable to load form. Details Error thrown:’ message

As Using a prestashop in multilingual, we usually have a problem that loaded data to show from JavaScript with json format, moreover the prestashop called the load with its global function in class path ‘\classes\Tools.php’

An example function,
1.                  public static function jsonEncode($data)
2.           {
3.               if (function_exists('json_encode'))
4.                   return json_encode($data );
5.               else
6.               {
7.                   include_once(_PS_TOOL_DIR_.'json/json.php');
8.                   $pear_json = new Services_JSON();
9.                   return $pear_json->encode($data);
10.           }
11.       }

How to solved this, you ought to add command in line number 4 with;
            return json_encode($data, JSON_UNESCAPED_UNICODE );
You will have never found a message of problem anymore.


Congratulations, all of you for solved problem. 

No comments: