2

I've created a module for a project that has several actions, all of which are called through AJAX. Each is a post request that sends over any required params plus the CSRF token using the method described here: https://craftcms.com/guides/enabling-csrf-protection#updating-your-javascript

On localhost, everything works correctly. On the staging server, some work correctly but others return a 404 error. Specifically, the response gives "Template not found: actions/module-name/location/geocode-inputs".

web.log doesn't look to be throwing any errors, and I'm not sure where else to look. Any ideas on what might be going wrong?

2

I figured this one out, it was bad error handling on my part.

If the service you're calling returns NULL, this will appear in the network tab as a 404.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.