Details
-
Bug
-
Resolution: Fixed
-
None
-
High
-
Solving the the following error coming from OpenTM2: ERROR in editor.languageresource.service.connector: E1315 - JSON decode error: Control character error, possibly incorrectly encoded
-
Empty show more show less
Description
problem
Some language resources (mainly OpenTM2) were returning a JSON which contains unescaped unicode characters. So if the raw content was containing a control character this was crashing the JSON decode with the following exception:
ERROR in editor.languageresource.service.connector: E1315 - JSON decode error: Control character error, possibly incorrectly encoded
Exception: | editor_Services_Exceptions_InvalidResponse |
Level: | ERROR |
Errorcode: | E1315 |
Message: | JSON decode error: Control character error, possibly incorrectly encoded |
Domain: | editor.languageresource.service.connector |
Version: | 5.0.15 |
File (Line): | [...]/application/modules/editor/Services/Connector/HttpApiAbstract.php (142) |
This is fixed now by catching the control character error, try to encode control characters and decode the whole JSON again.