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:
This is still an issue on 7.14.6 for any modules created in Module Builder,
Since removing “created by” from searchdefs, the list view in my modules started working again
I did import the module project from another CRM. That CRM is flattened now and I can’t remember what version of Suite it was running so it may be that the version of Suite that made the initial project was older. I’ll keep a look out to see if this happens again and I’ll try to keep notes of how it end up back here
Looks like this is still an issue. Just installed 7.14.6 and the leads module has this issue:
Wed Jun 18 14:08:39 2025 [2483703][1][FATAL] Exception in Controller: Syntax error in template "file:/home/xxxxxxxxxx/public_html/cache/themes/SuiteP/modules/Leads/SearchForm_basic.tpl" on line 298 "{php}$this->_tpl_vars['user_options'] = get_user_array(false);{/php}" unknown tag 'php'
I added the changes from the commit and it fixed the issue. So I don’t think this commit is included in 7.14.6.
They are merged into hotfix, which mean they will be in the upcoming maintenance release. If you want to see what is in the current release refer to the master branch on github.