Hi all,
In Editor X, I think the dataset API has changed because $w(‘#dataset’).add() is now throwing an error .
I’ve checked many of my older versions in Site History when it worked and it’s broken there too.
If the API was actually changed, I will have to significantly redesign my business website. Here’s why:
On read & write datasets connected to Members Only collections, you used to be able to call add() even when logged out which would add a new blank item to the dataset and enable any connected form inputs so you could still use the inputs, but you just couldn’t “submit” the form due to Members Only write permissions.
With this, we could set up the same inputs to be used either when logged in or out, and if logged out, use a separate button to “submit” the form then manually send the input data to be validated server-side and stored, or whatever you wanted.
On the blank item, everything worked and it was set up exactly like in the Members Only collection, such as dropdown inputs connected to public collections fields.
I hope really this can be changed back as my business depends on it!
The new error is:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘total’)
at dr (datasetApiAssertions.js:111:58)
at R (datasetApi.js:138:5)