You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the default locale is automatic, but the client locale is not implemented (e.g. "cs"), client script fails and no page is displayed.
Deeper investigation: oui-ui-core/vue/src/App.vue calls rpc function oui.load_locales
For unknown locale, oui-httpd/files/rpc/oui.lua:load_locales returns empty Lua object {}
This object is later identified as an object and not as an array by oui-httpd/src/lua2json.c:lua_test_array, because it is empty.
RPC then returns JSON result {} instead of []
In oui-ui-core/vue/src/App.vue, on result, method forEach is called, which does not exists for object type, but exists for array type. This causes Uncaught (in promise) TypeError: t.forEach is not a function javascript exception and client side javascript completely terminates.
I would like to fix it myself, but I don't know the best place to do it.
Doing the similar trick like mpx/lua-cjson@3b1429f would be nice but my knowledge of Lua is limited to create a PR. Other solutions are probably easier, but ugly (test special case of {} in Vue, etc.)
The text was updated successfully, but these errors were encountered:
When the default locale is automatic, but the client locale is not implemented (e.g. "cs"), client script fails and no page is displayed.
Deeper investigation:
oui-ui-core/vue/src/App.vue
calls rpc functionoui.load_locales
For unknown locale,
oui-httpd/files/rpc/oui.lua:load_locales
returns empty Lua object{}
This object is later identified as an object and not as an array by
oui-httpd/src/lua2json.c:lua_test_array
, because it is empty.RPC then returns JSON result
{}
instead of[]
In
oui-ui-core/vue/src/App.vue
, on result, methodforEach
is called, which does not exists for object type, but exists for array type. This causesUncaught (in promise) TypeError: t.forEach is not a function
javascript exception and client side javascript completely terminates.I would like to fix it myself, but I don't know the best place to do it.
Doing the similar trick like mpx/lua-cjson@3b1429f would be nice but my knowledge of Lua is limited to create a PR. Other solutions are probably easier, but ugly (test special case of
{}
in Vue, etc.)The text was updated successfully, but these errors were encountered: