Why does toNumber() work on production but not on dev?

Current set-up : SPA Pages, Windows 10, MySQL, PHP

On my Production machine I have to use toNumber() but on my Dev machine if I use it I get an error. It works on my Dev machine if I exclude toNumber()

My error…

Formatter toNumber in expression [arr1.items.contains(sc_ad_job_q.data.sa_ad_job_q.job_type.toNumber()))] doesn't exist for type number

Maybe dmxFormatter.js is not up to date?
Or maybe some other files are not up to date.

How do I ensure the latest Wappler files are on both my local Dev machine and my Production machine WITHOUT using Publish?

Maybe you are using different PHP or MySQL versions?

Thanks Teodor, I’ll check.

I think using a program like Beyond Compare is very helpful. Eg I can just run a predefined session in a couple of seconds and see the differences between local and remote files. (In this case, the contents of grey folders are equal, red contain one or more different files and purple contain files missing on one side or the other.)

I had the same issue using toNumber(), where the numbers disappeared completely after a Wappler update. It was a while ago, but I think it was due to different versions of dmxFormatter.js.

@TomD thanks for that. Didn’t know about Beyond Compare so will take a look. I’ve had a couple of errors with dmxFormatter.js and wondered if the files on the server are up-to-date.

This was the case for me when I encountered same issue, about an year ago.

hi… i also have this on my dev and production server…

on dev it works… no issues… query.offset.default(0).toNumber()

but on production server… i get query.offset.default(0).toNumber() – doesn’t exist for type number

weird,., how did you get around it…


im sure i have just done something stupid again :),

… turned out… i had to delete the formatter on the server and reload it… :slight_smile:

1 Like