isleshocky77 / ninja-forms-suite-crm

GNU General Public License v3.0
0 stars 1 forks source link

suitecrm bug affecting api call #1

Open earwickerh opened 3 years ago

earwickerh commented 3 years ago

Thanks for building this and for publishing it!

After entering the key & secret key, I click to refresh objects but I'm getting the following error: "_Error connecting to API:Client error: POST my-crm-url.com/Api/access_token resulted in a 404 Not Found response: File not found._" I've updated to the latest SuiteCRM version so I am using V8. ( I checked the actual API directory and files to confirm this just in case). When calling the links directly with the suffixes /Api/access_token and /api/v8/modules/ I get "file not found". The 404 is due to a bug in suitecrm for which I may make a pull request in your plugin until Suitecrm merges the following branch which addresses an .htaccess oversight in Suitecrm that improperly rewrites the API url. I tried Changing the suffixes and adding "index.php", so /Api/index.php/access_token and /api/index.php/v8/modules/. In such cases, I get 500 error (so it's being found, but not working).

This helps with the 404, but now I'm getting a 500 error... I would greatly appreciate any insights you have as to why I would be getting a 500 error (I'm using nginx). In any case, thanks again for creating this plugin and making it available. Hope to hear back.

earwickerh commented 3 years ago

Specifically I'm getting: Error connecting to API:Server error: POST my-crm-url.com/Api/index.php/access_token resulted in a 500 Internal Server Error response: {"error":"unknown_error","message":"OAuth2Clients module with id "my-consumer-key" is not found"} ("my-consumer-key" contains my actual consumer key... Any hint you can provide I'd be really grateful for

earwickerh commented 3 years ago

My issue was build-specific, got it resolved.Thanks!

isleshocky77 commented 3 years ago

Was going to reply to tell you that I've had the same issue and it has to do with your nginx file compared to the generated .htaccess file. But I was waiting to be able to give you a full example of the nginx config file as an example. I don't have the ability to do that yet, but will try to post it.