Hi PKP community! I have a strange problem that I’m trying to figure out the source of. I have a bunch of 3.3.0.10 instances running on the same server and they all work great except for one. None of the ajax calls on the admin / backend side work. Everything is just stuck in “loading”.
The browser console log shows errors like this:
Uncaught SyntaxError: ‘’ string literal contains unescaped line break
And in the generate template code there are message like this where the js template data should be:
Notice: escape: unsupported type: js - returning unmodified string in /lib/pkp/lib/vendor/smarty/smarty/libs/plugins/modifier.escape.php on line 258
I managed to fix the problem by adding a case for “js” in /lib/pkp/classes/template/PKPTemplateManager.inc.php at line 1783 in the smartyEscape function like so:
case 'js':
$result = smarty_modifier_escape($string, 'javascript', $char_set);
$result = preg_replace($pattern, $replacement, $result);
return $result;
This forces any instances of esc_type = ‘js’ to be treated as ‘javascript’ by the smarty modifier.escape.php file, but I still have no idea why this is happening with just the one instance. I do see the “unsupported type: js - returning unmodified string” notice show up in my error log for other instances that are working.