salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.26k stars 2.03k forks source link

Email from Address on compose view may fail to load for new users #10452

Closed JackBuchanan closed 2 weeks ago

JackBuchanan commented 2 weeks ago

Issue

If a new user/user that has not yet had their "signature_prepend" User preference set yet may not see their From Addresses load on compose view when using legacy email behaviour

[16-Jun-2024 14:40:42 UTC] PHP Fatal error: Uncaught TypeError: EmailsControllerActionGetFromFields::addOutboundEmailAccounts(): Argument #2 ($prependSignature) must be of type bool, null given, called in /var/www/crm/modules/Emails/EmailsControllerActionGetFromFields.php on line 105 and defined in /var/www/crm/modules/Emails/EmailsControllerActionGetFromFields.php:182 Stack trace:

0 /var/www/crm/modules/Emails/EmailsControllerActionGetFromFields.php(105): EmailsControllerActionGetFromFields->addOutboundEmailAccounts()

1 /var/www/crm/modules/Emails/EmailsController.php(467): EmailsControllerActionGetFromFields->handleActionGetFromFields()

2 /var/www/crm/include/MVC/Controller/SugarController.php(522): EmailsController->action_getFromFields()

3 /var/www/crm/include/MVC/Controller/SugarController.php(491): SugarController->do_action()

4 /var/www/crm/include/MVC/Controller/SugarController.php(465): SugarController->handle_action()

5 /var/www/crm/include/MVC/Controller/SugarController.php(361): SugarController->process()

6 /var/www/crm/include/MVC/SugarApplication.php(101): SugarController->execute()

7 /var/www/crm/index.php(52): SugarApplication->execute()

8 {main}

Possible Fix

Set user preference signature_prepend on creation of user

Steps to Reproduce the Issue

1. Create user
2. Allow access to emails module
3. Configure emails to use legacy behaviour
4. Go to emails compose view 
5. See from addresses not load

Context

No response

Version

7.24.2

What browser are you currently using?

Chrome

Browser Version

No response

Environment Information

PHP 8.2

Operating System and Version

Ubuntu 22