I have a page that runs SC on load, the XHR request is made and I can see the data being returned in the network tab of Dev Tools but it is unavailable in dmx.app so can’t be used on the page:
I’ve never had any issues with DMX in JS over the years. It was always that I was on the wrong path looking at the wrong JSON.
If this is specific to 4.2.0, that would be really concerning.
Did you try printing just upto the data part and then expand and see what data is showing in the JSON?
I ran into this yesterday as well. Data was present in the data store when viewing in the application tab, but not present in dmx.app.data after I ran a flow that repeated over the data store. Luckily I could go around this, but I think we have a nasty bug here.
If I recall correctly, it was a flow that amongst other things had a repeat on a data store array. In that repeat I was doing a setValue on something (I think an input or select) that itself was also driven by the data store array.
The whole thing turned out to be a bad design, so I started over and went another route.
In javascript arrays and objects are passed by reference, we try to always clone the object first before passing it, this prevents source data from being modified. It is possible that there are some places where it is passed by reference and then the original is being modified. That’s why we need to find out where that data was being used on the page.
Hey @patrick,
I hate to press but I have an urgent update to a web app that I need to publish but if I do, the elements of the site that this relies on will break unless I roll my Wappler version back which would be a PITA. Rather than wait for Thursday, if you come up with a patch fix, could you post it to try?
You are a legend! That seems to have done the trick. I’ll do a bit more testing and let you know if I spot anything. I don’t know what @george pays you but, whatever it is, I’m sure it’s not enough! Thanks