I recently updated to 7.14.5 and several of my users could not access the calls module.
I had these errors in my logs
Tue Sep 10 12:23:04 2024 [3004][6eded318-96fd-3d98-5c07-56b24937bd9f][FATAL] Exception handling in C:\website\Apps\Sugarcrm\htdocs\include\MVC\Controller\SugarController.php:397
Tue Sep 10 12:23:04 2024 [3004][6eded318-96fd-3d98-5c07-56b24937bd9f][FATAL] Exception in Controller: Syntax error in template “file:C:\website\Apps\Sugarcrm\htdocs\cache\themes\SuiteP\modules\Calls\SearchForm_advanced.tpl” on line 248 “{php}$this->_tpl_vars[‘user_options’] = get_user_array(false);{/php}” unknown tag ‘php’
I traced the problem to
\htdocs\include\SugarFields\Assigned_user_name\SearchView.tpl
It has this line
{php}$this->_tpl_vars[‘user_options’] = get_user_array(false);{/php}
After that a quick rebuild restored the users access.
I was affected by the smarty upgrade and the php problems.
I’m hoping someone can take this and get it applied to the main branch because the problematic {php} code is still in the tpl file from the 7.14.5 release zip as well as in the github.
Thanks for the troubleshooting step. I tried that but since it didn’t help I didn’t include it in my original post.
Only modify the file I listed above solved the problem for me.
Since this is a know issue about the smarty and {php} tag I’m hoping this last file in the official release will get updated so it isn’t a problem for anyone else.
I guess you have added created by or modified by in your search fields.
There is a bug in SuiteCRM due to the use of this php tag when the field type is “assigned_user_name”
You can fix that in custom/modules/Calls/metadata/searchdefs.php
Change the way the created_by field is defined with the following.
The proper fix is here (no php code running anymore in Smarty 3.1+ template). It’s approved and about to be added, probably will be in the next bugfix release: