Discussion about Event Handlers not working after connecting to own data in Sanity/Nuxt/Snipcart template

20 replies
Last updated: Aug 25, 2021
Hello everyone! Hope y’all doin’ great. I’m new to Sanity and I have a question. I’ve installed the Nuxt / Sanity / Snipcart template and it seems like when I connect to my own data the Event Handlers stop working… Any ideas what could do this ?
Aug 23, 2021, 3:08 PM
Hello! No. No errors. It feels like all the Event handlers (@) have been hijacked by something else. There is no response from it. When I load the CMS with the default products, everything is working great but as soon as I enter my {projectId} key the handlers stop working. Very strange.
Aug 23, 2021, 6:41 PM
Hello! No. No errors. It feels like all the Event handlers (@) have been hijacked by something else. There is no response from it. When I load the CMS with the default products, everything is working great but as soon as I enter my {projectId} key the handlers stop working. Very strange.
Aug 23, 2021, 6:41 PM
Aug 23, 2021, 6:43 PM
Hello! No. No errors. It feels like all the Event handlers (@) have been hijacked by something else. There is no response from it. When I load the CMS with the default products, everything is working great but as soon as I enter my {projectId} key the handlers stop working. Very strange.
Aug 23, 2021, 6:41 PM
Aug 23, 2021, 6:43 PM
The Grid / List button is … well not working :-)
Aug 23, 2021, 6:43 PM
Aug 23, 2021, 6:43 PM
Ah, I see! Just to confirm, did you perform all of the steps mentioned for setup in the readme ?
Aug 23, 2021, 7:38 PM
Yes I did.
Aug 24, 2021, 3:07 AM
Yes I did.
Aug 24, 2021, 3:07 AM
It looks like you haven’t added your CORS origins, which may be contributing to your issues.
Aug 24, 2021, 4:54 PM
Oh damm!! Right in my face 🤦‍♂️😅. Hope it will fix the problem. Huge thanx for your help !!
Aug 24, 2021, 5:00 PM
I’m not 100% sure it’ll fix it, but it’s a good place to start!
Aug 24, 2021, 5:01 PM
👍😁. I'll let you know.
Aug 24, 2021, 5:01 PM
🔥 It worked!! You're the best!
Aug 24, 2021, 5:48 PM
Awesome! Glad we got it working!
Aug 24, 2021, 5:50 PM
👍 I'll come back with more problems soon ( almost a promise... 🤣 )
Aug 24, 2021, 5:52 PM
I’ll hold you to it!
Aug 24, 2021, 5:52 PM
user B
if you're interested, I've upgraded that template: https://github.com/sanity-io/example-ecommerce-snipcart-vue/pull/17
Aug 24, 2021, 6:46 PM
Thanks Jérôme! I'll definitely use this again. Such a great stacks. I'm new to Sanity but I already love it!
Aug 25, 2021, 3:44 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?