Proxy

I am using a webix.proxy.myProxy() to fetch data from the server. And I ude this proxy as a “dataFeed” for a suggest view like this [dataFeed: “myProxy->load.php”]. So everything worked fine. But recently I suddenly got this error “Uncaught TypeError: e.load(…).then is not a function”. I did not changed anything in my code. The code is the same.
Does anybody know what could be the problem? I use the pro version 6.4.2

Hello @Mohamad,

I did not changed anything in my code. The code is the same.

Does that mean that the version of Webix is also unchanged? Simply put,

But recently I suddenly got this error

means that you’ve got this error without updating anything on your end, is that correct? Either way, I’m afraid I don’t have enough information to go by here. Could you please provide a snippet of the code you are trying to run, as well as clarifying if anything was changed on your end, or not?

Hi @Dzmitry, I got this problem after I upgraded to 6.4.2 version. After I went back to the previously used version the problem was gone.
I see that webix 7 has been pushed. And I want to upgrade to 7 version.

Hi again @Mohamad, as I have previously mentioned,

I’m afraid I don’t have enough information to go by here. Could you please provide a snippet of the code you are trying to run?

Without seeing an example of your code first, I can only speculate about the origin of the issue. Judging from my limited testing, I couldn’t find any issues with using a proxy object inside of the dataFeed property on the 6.4.2 version.

So here is what I found. The previous version used in our app was 6.1.6. So the laod method of Proxy object had 3 argumentslike : load:function(view, callback, args). And that worked fine. When I upgraded to 6.4.2 version I got that error. But after I reduced the arguments of “load” method to load:function(view,args) things worked again. So the error is gon know.

That’s a breaking change in 6.2 as documented here
https://docs.webix.com/desktop__whats_new_6_2.html

The parameters of proxy methods load(), save(), and saveAll() do not include callback, their order has changed

Thank you @Jendrik, you are correct.

@Mohamad, in general, when transitioning to the newest version of Webix and there is a substantial gap between the versions, we recommend checking out our migration guide, which lists all of the breaking changes between the releases that you need to look out for.