I have found the problem. You will see from the URL that I was using that I included (as I always did previously) the ‘index.php?’ as per the Suitecrm Manual instructions. In this situation it’s probably not important to include this maybe??
It works if I leave out the ‘index.php’ out of the URL.
Maybe to save confusion to others, the line in the function ‘isSelfRequest($endpoint)’ could be altered to;
Ok I updated the commit. The issue is if your site URL (in my case) has a trailing slash, the logic is looking for the site URL plus the next slash = // which is incorrect. So I sanitize out first slash if it exists.
I’ve come accross one other issue with this commit. If the siteURL has a trailing slash it ends up looking for a URL with two trailing slashes. I have to sanitize the URL to deal with a slash at the end of the site URL.
$siteUrl = rtrim($GLOBALS['sugar_config']['site_url'], '/'); // removes trailing slash if present