I had a working 8.6 version using for API V4_1 and it worked great.
Upgraded to 8.7.1 and now getting a 500 error on login request.
To test, I installed a fresh 8.7.1 (well actually it was 8.6 from installatron which did work and then I upgraded to 8.7.1) Same issue, 500 error on the /service/v4_1/rest.php
The error is:
[22-Jan-2025 16:49:13 UTC] PHP Fatal error: Cannot declare class LanguageManager, because the name is already in use in /home/xxxxxxxxxx/public_html/xxxxxxxxxxxxxxxx.com/public/legacy/include/SugarObjects/LanguageManager.php on line 50
I tried wrapping it in a “if not already loaded” which got me by this error, then another error similar with another class in the same directory, did the same got by that error, then another the same… etc.
That’s a different problem. You likely don’t have your .htaccess setup properly to redirect. This should either resolve or in my case get an error.
@pgr that’s all it gives me. It would be wonderful I got where it was originally declared! It would make problem resolution so much easier! I tried to look for in the code wherever the class was declared. In most cases every time it’s declared its wrapped in an “if ! already declared” statement. I was trying to see if any files changed recently that called the class. I just struggle navigating around Github to find that answer.
Anyway for future reference here is my advice to investigate the redeclaration errors: just before the line where you get the FATAL, add a bit of code using PHP reflection and ask PHP to tell you about it:
Does anyone know how to redirect this properly. There are apps that depend on the URL (mautic). I’ve tried adding to .htaccess in the root and the /public/
Yes to all but you have to code it or use a third party like make.com or something. Almost anything is possible with API.
For instance I push all my form data in from WordPress and then that triggers and automated follow up campaign.
I’m also usining to build the WordPress portal. I don’t have to store any info inWP, just API and get it from SuiteCRM. Then case updates in the portal update SuiteCRM.