Hello - my site has a dataset which takes an input and in a lightbox shows the total count of the records in the dataset. This works fine in preview mode, but in production the count is not showing in the lightbox. I get the “failed to load initial data” error.
I should mention that an onload function takes the count and updates a textblock in the Lightbox.
Code below:
wixData.query( “subscribers02” )
.count()
.then( (num) => {
let numberOfItems = num;
$w( ‘#waitlistcount’ ).text = num.toString();
} )
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );
Please help.
Thanks!