Exception in Controller: Syntax error in template "file:/var/www/html/cache/themes/SuiteP/modules/Contacts/DetailView.tpl" on line 332 "{php}" unknown tag 'php'
I have php7.4 and composer2 also i deleted cache file like /var/www/hml/cache/ and …/custom/cache but issue persists. any idea hoy can I fix this?
I found this post because I was doing web searches for the same problem.
I’m migrating a company’s SuiteCRM 7.12 (PHP 7.4) to a new VM with PHP 8.2 and then upgrading that SuiteCRM copy to 7.14.2 . There were several blank pages when testing. The log file had:
[602][1][FATAL] Exception in Controller: Syntax error in template "file:/var/www/html/cache/themes/SuiteP/modules/Contacts/SearchForm_advanced.tpl" on line 565 "{php}$this->_tpl_vars['user_options'] = get_user_array(false);{/php}" unknown tag 'php'
It turns out that “php” can no longer be used as a tag in a Smarty template. The upgrade to SCRM 7.14 fixes most of these occurrences except one in our case. The Smarty template tags “{php} … {/php}” need to be changed to the standard PHP tags “<?php ... ?>”. Then, of course, run Quick Repair and Rebuild.
On that Debian VM I ran this command in the SuiteCRM directory to find the source of the error.
The first one SugarFieldCstmfile.php is an Outfitters module license checker code, please contact the developer tech support or Outfitters tech support for update.
2 and 3 are commented out, should not be running/crashing.
4 looks strange, it has double curly braces {{php}} …?