Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

update error winXP

Questions related to installing, updating, setting up and configuring
Post Reply
kknm
Posts: 313
Joined: Sat Apr 11, 2020 12:03 am
Contact:

update error winXP

Unread post 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.
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: update error winXP

Unread post by kev1n »

Set a breakpoint to inspect nuform.js:5549
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: update error winXP

Unread post 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);
kknm
Posts: 313
Joined: Sat Apr 11, 2020 12:03 am
Contact:

Re: update error winXP

Unread post by kknm »

Nothing happens after breakpoint and page refresh. breakpoint doesn't stop at nuform.js:5549
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: update error winXP

Unread post by kev1n »

Did you try my fix?
kknm
Posts: 313
Joined: Sat Apr 11, 2020 12:03 am
Contact:

Re: update error winXP

Unread post by kknm »

select2Options = Object.assign(select2UserOptions, objSelect2OptionsDefault.options);
It helped! Thanks!
kev1n
nuBuilder Team
Posts: 3801
Joined: Sun Oct 14, 2018 6:43 pm
nuBuilder Version: 4.5
Has thanked: 2 times
Been thanked: 9 times
Contact:

Re: update error winXP

Unread post by kev1n »

This change is now also on Github.
Post Reply