Works in editor mode but wont save when site is live

My site is working great in editor mode. I use a .save(); command to save to a dataset but when I go to the live site I get this error:
Unhandled promise rejection DatasetError: Operation (save) not allowed during save
7 CONSOLE1810304: console.memory is not implemented and will return 0 for all attributes. Please use the memory profiler to monitor memory utilization.
SCRIPT5: Access is denied.

Any ideas?

A little background, this is on a page with stripe coded in and upon http response of chargeResponse.paid it is supposed to save everything to the dataset, otherwise its put up a message the card was declined. The charges are going fine and later on down the code when I have a wixLocation to command that works great but it won’t save the data to the database. I also have all the permissions set to wide open so anyone can view, save, modify, update, etc. Here is the code I have in that section of page:


$w.onReady(() => {
	$w("#html1").postMessage("");
	$w("#html1").onMessage( (event) => {
    let token = JSON.parse(event.data);
    console.log(token);
    $w("#html1").hide();
	$w("#processing").show();    
charge(token.id, ($w("#stallPurchaseTotal").value)*100, ($w("#stallTotalCount").value*200), ($w("#clientId").value))	
        .then((chargeResponse) =>{
        console.log("response:" + chargeResponse)
        if(chargeResponse.paid === true){
		  $w('#dataset1').save();
          $w('#dataset1').setFieldValue('chargeId', chargeResponse.id);
          $w('#dataset1').setFieldValue('horseShowId', $w('#input17').value);
          $w("#text64").hide(); 

Get same problem.

I’m having the same problem, but on just one of my pages

This is an old post you are commenting on. Please repost your question in a new post so more people will see it. Clearly explain what you are trying to do and what you want to accomplish.