Environment
OS: Linux
DB: MySQL 5.6
PHP: 7.x
SuiteCRM: 7.9.14
Browser: Chrome
Issue
After upgrading from 7.9.7 to 7.9.14, I am receiving the follow error from custom code Ive created:
Sat Feb 24 17:02:32 2018 [6314][1][ERROR] Invalid Referrer: expected the Save action to be called from the Userās Profile Edit View
Sat Feb 24 17:02:32 2018 [6314][1][ERROR] Email address save error
Itās not expecting to be called from custom PHP code. Maybe you can try just overriding that check? But itās there for some reason, so the less you change it, the better.
Maybe just tweak the condition inside the function
Itās new code that was added as I never received the error until I upgrade from 7.9.7 to 7.9.14.
Iāll post a question as to why it was added and if there any thoughts on supporting creating Users via custom PHP code.
The reason I was vague in my answer is because I donāt really know how to do this myself.
But if you try seeing what you have in $request in this part
if (!$this->isUserProfileEditViewPageSaveAction($request)) {
$GLOBALS['log']->error('Invalid Referrer: '.
'expected the Save action to be called from the User\'s Profile Edit View');
return false;
}
Try to see what is different when you call it from custom code, and adjust that condition to avoid stopping the function. Letās hope it doesnāt break further ahead in the function. If you want, you can simply skip this check altogether. Youāll have to evaluate what consequences this might have, but it probably just errors out in an uglier way when called from the userās profile Edit view.