Saving Contact email addresses leads to logfile error messages

We are using SuiteCRM 7.9.8.

Editing an email address in a Contact results in these error messages in the log file

  • Invalid Referrer: expected the Save action to be called from the User’s Profile Edit View
  • Email address save error

The cause seems to be this code from include/SugarObjects/templates/person/Person.php around line 215:

       // User Profile specific save for Email addresses

        if(!$this->emailAddress->saveAtUserProfile($_REQUEST)) {
            $GLOBALS['log']->error('Email address save error');
            return false;
        }

It was introduced in: https://github.com/salesagility/SuiteCRM/commit/af6b06ab54ccbecdffbbc2a240e5cc40498f776d?diff=split#diff-233e182bbbf734430ac48a36d78bddfb

But it looks like it should only be called when editing a User’s email address, not a Contact’s address.

Kevn

I would say this is a bug. Can you please open an Issue for it in GitHub?

You have done all the hard work of finding where the bug is coming from, so it should be easy to fix.

Thanks and merry Christmas!

Thanks, pgr. I’ve opened this Issue in Github: https://github.com/salesagility/SuiteCRM/issues/4780

Kevn

1 Like