Data Hooks Not Working

So I have hooks that have worked for a while but now they are not working anymore. I have even adjusted the code to little to nothing with no results. The items are inserting but the hooks are not firing. Any thoughts? Below is the code I changed it to.

export function MailingListFooter_beforeInsert(item, context) {
    item.title = "testing";
    item.lastName = "insert";
 return item;
}

#hooks #datahooks #notworking

Hi Patrick,
The code you pasted seems to be fine so the problem might be due to another issue.
Please share the URL of your site or your editor so we can inspect your issue.

The url is https://www.stchurch.org and its the form in the footer. i have changed some things in the code to try and find a bug somewhere with no success but excuse the messy code lol. Thank you.

Hi,
I checked your site and it seems like your onClick event isn’t declared well, check out this article about creating events and let me know how it works out for you.

When the button is clicked, it adds to the database but the hooks never fire.

Hi,
Your hook refers to the “mailing list footer” but when I submitted information to the form in the footer it was saved in the “salesLead” collection, in that case, your hook isn’t referring to the right collection.

Yeah I know. I decided to change it since i needed it to work. The datahooks still arent working for the other database though.

Yes I have started to see this problem (of a hook not firing on _beforeInsert) just in the last few days. This must be a bug?

Here is the code in the data hook. Works fine in Preview; does not work on the live site.

export function TestDates_beforeInsert(item, context) {
    item.testDate = new Date()
 return item;
}

My Data Hooks are not working! Seems like many people have the same issue

I have spoken with Wix support. They say they cannot help because this is ‘not a simple issue’ and i must pay a ‘Wix Expert’ to look at the problem. Either the ‘Expert’ will tell me what I am doing wrong, or will agree there is a bug. If there is a bug, what do I do next?
BTW this issue has only appeared for me in the last couple of weeks i would say.

Having the same issue. It will work for some time, then if you make a change it will not working. It will keep showing the changes made previously. Even after you delete a hook, it will still work for some time!!.