onAfterSave bug..

@wix

Hi Guys

There seems to be a bug with the onAfterSave function of a button that submits data to a db.

I have mine connected throught the UI, and have it set to deliver a success/failure message, and after that, redirect to another page on my website.

The data successfully uploads to my db, I get the success message, but no redirect occurs. When I refresh the page and then click on the same button again, it redirects to the requested page.

I’ve also tried coding it manually, but it doesn’t fix it…

Any help would be appreciated.
Thanks!

Hi, can you share your site so we can take a look?

Thanks, I’ve forwarded this case to our engineering team, they will take a look.

Many thanks Tomer

We have this bug too

Hi Kate, can you please share the site with the problem, or a simple reproduction?
I just tried it and for a simple form submission with a success message and onAfterSave code, the navigation works.

@tomer-wix Hi Tomer, it’s actually this: Previously, ie up until last week, you could do this:

$w(“#dataset1”).onAfterSave(() => {
$w(“#dataset2”).save();
)

But this no longer works. Instead, you have to write this.

async function() {

      await $w("#dataset1").save(); 
      $w("#dataset2").save(); 

}

Had to do a very annoying rearrange. When was this change made? Is there are changelog?

@kate-from-sydney Can you share the site where it doesn’t work? I couldn’t reproduce this.