SergeyK SergeyK - 3 months ago 29
Javascript Question

Modx packet manager ext-all.js error

I have a problem with fresh installed modx site. Package manager stucks at "loading" status.

Sniffing some packets reveals that data exchange goes well, so there is no curl problem or something.

There is ext-all.js error in browser console says: "SyntaxError: expected expression, got '}' ext-all.js:1:41"

Searching modx github for similliar issues, resulted this https://github.com/modxcms/revolution/issues/12093
Is it timezone problem? Have no idea how to test if it is, or how to avoid it. (tried to change timezone and reinstall xampp, takes no effect)

Does anyone have such problems or has a solution?


  • win 8.1 sl, xampp local server

  • curl enabled

  • timezone UTC+3 Moscow RTZ2

  • modx version: 2.3.3-pl

  • compress_css = no

  • compress_js = no



js error fires in all browsers

Answer

Since the problem is still unsolved, i'll post some research on it.

The root of problem is the setLocale() php function can't set any utf8 compatible locales under such servers environments as windows 7 for example. So there are errors when converting to json output of locale-dependent functions such as strftime:

strftime('%b %d %Y', 1471864827)
"��� 22 2016"

So fixing this problem "for now" is about changing your server environment, sinсe thre is no solution to get setLocale() work properly with utf8 on windows.