21492 Posts in 5783 Topics by 2621 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 179 Views |
-
SS3.0.3 / CMS: reload content

8 February 2013 at 9:27pm
Hi,
i am just testing SS3.0.3 and found an issue. If i switch between two menu items in the sitetree, tahn the content will not reload. you have to reload the whole window to show the new content. During the installation process i had to delete mb_regex_encoding('UTF-8'); in Core.php because of some error messages. Is that related to the problem? How to aktivate mb_regex_encoding in php.ini? My PHP version is 5.3.0
Hope that someone can help. Greetings, Carsten.
ERROR [Warning]: json_encode() [<a href='function.json-encode'>function.json-encode</a>]: Invalid UTF-8 sequence in argument
IN GET /silver_test/admin/pages/edit/show/2
Line 103 in /framework/core/Convert.phpSource
======
94: }
95:
96: /**
97: * Encode a value as a JSON encoded string.
98: *
99: * @param mixed $val Value to be encoded
100: * @return string JSON encoded string
101: */
102: public static function raw2json($val) {
* 103: return json_encode($val);
104: }
105:
106: /**
107: * Encode an array as a JSON encoded string.
108: * THis is an alias to {@link raw2json()}
109: *Trace
=====
json_encode(Array)
Convert.php:103Convert::raw2json(Array)
PjaxResponseNegotiator.php:87PjaxResponseNegotiator->respond(SS_HTTPRequest)
LeftAndMain.php:464LeftAndMain->show(SS_HTTPRequest)
Controller.php:205Controller->handleAction(SS_HTTPRequest)
RequestHandler.php:184RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
Controller.php:153Controller->handleRequest(SS_HTTPRequest,DataModel)
LeftAndMain.php:357LeftAndMain->handleRequest(SS_HTTPRequest,DataModel)
AdminRootController.php:89AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:307Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:119Director::direct(/admin/pages/edit/show/2,DataModel)
main.php:126{"Content":null}
-
Re: SS3.0.3 / CMS: reload content

8 February 2013 at 9:52pm
Hi, i think i have found the solution: I have Changed "framework/core/convert.php" from
public static function raw2json($val) {
return json_encode($val);
}to
public static function raw2json($val) {
array_walk_recursive($val, function (&$item, $key) {
if (is_string($item)) $item = mb_encode_numericentity($item, array (0x80, 0xffff, 0, 0xffff), 'UTF-8');
});
return mb_decode_numericentity(json_encode($val), array (0x80, 0xffff, 0, 0xffff), 'UTF-8');
//return json_encode($val);
}Now it seems to work. I think with this solution u can use SS3 without mb_regex_encoding('UTF-8');
Greetings, Carsten.
| 179 Views | ||
|
Page:
1
|
Go to Top |

