Suitecrm Email Address book not working correctly after php upgrade to 7.1 or higher

Suitecrm Address book error when you click the To button it populates with all the contacts / users/ leads when it should only populate with the related ones.

This is because the code is throwing an illegal offset.

Community please correct me if im wrong but i believe the fix is change

$relatedBeanInfo = '';	

to

 $relatedBeanInfo = array();

inside the EmailUIAjax.php file

https://www.youtube.com/watch?v=zl-RQDurbCk

1 Like

Interesting, thanks. What is your version of SuiteCRM, 7.8.x? Do you know if this is also a problem in newer versions?

7.8.31

Its different in the newer version as they use a different pop up. HOWEVER… our sales agents liked it when you clicked on the email address in the opportunity and automatically had it relate it to the opp.

WE added this code to our \modules\Emails\EmailUI.php line# 426 to 432 and now when you click the email on a contact in an opp, it automatically relates the email to the opp.


if ($current_user->getEmailClient() == 'sugar') {
			if(isset($_REQUEST['module']) && isset($_REQUEST['record']) && $_REQUEST['module']=='Opportunities'){
				$opp = new Opportunity();
				$opp->retrieve($_REQUEST['record']);
				$module_name="Opportunities";
				$record_id=$opp->id;
				$name=$opp->name;
			}

https://www.youtube.com/watch?v=szcqXL5kZNs