[POSSIBLE BUG] Code runs twice on a page duplicated from the Menu

Hey guys,

This is the second time I am experiencing this. When you ‘Duplicate’ a page from the Menu Tab, the code on the page runs twice on the duplicated page. Which means if I’m submitting a form using wixData.insert the form is inserted 2 times into the database and a confirmation email is sent twice.

Last time (when I did not raise this issue) the page was charging a credit card twice via Stripe (Live Environment) and creating 2 orders, I did not report this because there was more than 1500 lines of code on the page and I thought it was my mistake somewhere but now I am pretty sure this is a bug.

Is someone from the team available to take a look at it?

Shan

This is interesting. Yeah - I will definitely escalate this for you.

Thank you & Happy Birthday Brett!!

Thank you sir :slight_smile:

This is an issue Shan, I’ve had it multiple times, you need to rename the function, so instead of onClick just use onClick_1

It’s a pain but it fixes the issue. Also along with it if you duplicate a element on that same page, especially datasets I find you then cannot reassign the after save, or any event on that as it runs the new assigned event and the old one.