Custom Controller working in dev but not in stage and live
I have created a custom controller and custom model to create an incident and update a custom object I have created. I have this working in the dev environment but when I promote it to Stage and Prod it fails and I get a modal pop up with the text:
There was an error with the request and the action could not be completed.
I have plenty of logMessage() in my code and I used this to debug my dev version, but this does not put anything out in stage and live. I have double, triple and quadruple checked that all the files are in the right places. I based my controller on the code example in the Connect PHP API Developer manual where the procedure is create a new model object, assign the data and then save: