Page 1 of 1

update error winXP

Posted: Tue Feb 22, 2022 6:18 am
by kknm
After the last update, nubuilder stopped opening on winXP...
error:
nuform.js:5549 Uncaught SyntaxError: Unexpected token ...
report.lan/:294 Uncaught ReferenceError: nuMainForm is not defined
nuajax.js?ts=20220222081308:129 Uncaught ReferenceError: nuBuildForm is not definedsuccessCallback @ nuajax.js?ts=20220222081308:129$.ajax.success @ nuajax.js?ts=20220222081308:17c @ jquery.js?ts=20220222081308:2f.fireWith @ jquery.js?ts=20220222081308:2l @ jquery.js?ts=20220222081308:2(anonymous function) @ jquery.js?ts=20220222081308:2

I ask for help, because the site is in the local network and there are many winXP clients.WIN7-10 and Ubuntu - all ok.

Re: update error winXP

Posted: Tue Feb 22, 2022 6:39 am
by kev1n
Set a breakpoint to inspect nuform.js:5549

Re: update error winXP

Posted: Tue Feb 22, 2022 7:56 am
by kev1n
The error is not caused by windows XP but an old browser that doesn't support the spread operator that was introduced in ECMAScript 6.

Try this:

Replace

Code: Select all

select2Options = {...objSelect2OptionsDefault.options, ...select2UserOptions};
with

Code: Select all

select2Options = Object.assign(select2UserOptions, objSelect2OptionsDefault.options);

Re: update error winXP

Posted: Tue Feb 22, 2022 8:07 am
by kknm
Nothing happens after breakpoint and page refresh. breakpoint doesn't stop at nuform.js:5549

Re: update error winXP

Posted: Tue Feb 22, 2022 8:11 am
by kev1n
Did you try my fix?

Re: update error winXP

Posted: Tue Feb 22, 2022 8:16 am
by kknm
select2Options = Object.assign(select2UserOptions, objSelect2OptionsDefault.options);
It helped! Thanks!

Re: update error winXP

Posted: Tue Feb 22, 2022 4:01 pm
by kev1n
This change is now also on Github.