I have two sites running with the same github repository and env variables. One of them has a custom domain, which I configured last Friday. Now here’s the issue:
I have a Netlify form on both sites, that trigger a submission-created.js function. It works fine on the site without a custom domain. The function isn’t being triggered on the site that has a custom domain (which is password protected using Netlify’s in built password auth). It fails to trigger from both the site-name.com and the site-name.netlify.app urls. The form submissions do come through (on both sites)
The site id without triggering submission-created: f1517f9c-3e53-4d3b-b4ea-3a912babc2c8
The site id with triggering submission-created: a52e3e8e-8724-415a-81fc-215ef3c17723
It’s meant to go live tomorrow so I’d appreciate a quick response
The password protection seems to be the problem. After I’ve deleted the access control settings, the function triggers again on form submission. I’m glad I worked that out, but I don’t think this is what you’d typically call ‘expected behavior’. Consider this a bug report, I’d be happy to share more information if requested.
Yup, I came here to suggest that our system just accesses the function without any authentication, so this wouldn’t be expected (by us) to work if you have site-wide protection on. You could of course consider using basic auth to protect only the parts of the site that you want and not the functions; this should allow the functionality to work as you’re expecting:
Absolutely. Or even better: a notification (or at least explanation) in the settings where you set the password, just like the one that you’d get on a deploy deletion, basically.
I just wanted to follow up and thank you for sharing your feedback in this thread. Our Docs team have updated the docs to include limitations in our trigger functions section.
Feedback is what makes our product better, and we appreciate you taking the time to surface what your obstacle was here!