Fatal error: Uncaught Error: Class 'Smarty' not found - Upgrading Suitecrm from 7.11.10 to 7.12.8

Hi @pgr , @crmspace,

We are upgrading our Suitecrm from 7.11.10 to 7.12.8 version , After uploading the Upgrade package at Upgrade Wizard below error popped up

Fatal error: Uncaught Error: Class ‘Smarty’ not found in /var/www/crm/include/Sugar_Smarty.php:49 Stack trace: #0 /var/www/crm/include/utils/autoloader.php(67): require_once() #1 [internal function]: SugarAutoLoader::autoload() #2 /var/www/crm/include/MVC/View/SugarView.php(150): spl_autoload_call() #3 /var/www/crm/include/MVC/View/SugarView.php(145): SugarView->_initSmarty() #4 /var/www/crm/include/MVC/View/ViewFactory.php(269): SugarView->init() #5 /var/www/crm/include/MVC/View/ViewFactory.php(242): ViewFactory::_buildClass() #6 /var/www/crm/include/MVC/View/ViewFactory.php(106): ViewFactory::_buildFromFile() #7 /var/www/crm/include/MVC/Controller/SugarController.php(362): ViewFactory::loadView() #8 /var/www/crm/include/MVC/Controller/SugarController.php(318): SugarController->processView() #9 /var/www/crm/include/MVC/SugarApplicatio in /var/www/crm/include/Sugar_Smarty.php on line 49

Can you please help out to fix this?

Thanks ,
Sravani

Check that you’re inside the Matrix for both the original version and the final version

Hey @pgr , Yes we met the compatibility Matrix

Is that the only error you have?

Is your PHP upload limit enough to take in the entire upgrade package?

Yes thats the only error ,

Yes I was able to upload the package , It passed below three steps
1: System Check
2: Upload Upgrade Package
3: Preflight Check

Then clicked on 4: Commit Upgrade the fatal error popped up

Can anyone help please? Stuck so long with this error with no clue

Thanks very much in advance

Hey @pgr / @crmspace

When you can , Kindly please suggest on this error , We are not able to upgrade our CRM because of this error

Thanks in advance

The error you provided is strange. That class can’t be missing, otherwise nothing in SuiteCRM will work. I can’t make much from it, and you don’t seem to have any further clues…

I can’t think of any more troubleshooting except things that need to be done locally like debugging…

@pgr , I understand . When I go include require_once(‘vendor/smarty/smarty/libs/Smarty.class.php’); this line at include/Sugar_Smarty.php , the error has gone and I can see below error in the console

index.php?module=UpgradeWizard&action=index&step=4&additional_step=true:10 Uncaught ReferenceError: SUGAR is not defined

Permissions are setup correctly

That is still strange. It’s like the basic autoloading isn’t working, SuiteCRM can’t find the parts that it’s made of.

@pgr , We configured server fresh with compatible matrix & was able to upgrade suitecrm to 7.13 version successfully.

We also upgraded our PHP to “8.0” version , as soon as we upgraded our PHP below error popped up
can you please help to fix it out
Fatal error : Declaration of Timesheet::create_new_list_query($order_by, $where, $filter, $params, $show_deleted, $join_type, $return_array, $parentbean, $singleSelect = false) must be compatible with SugarBean::create_new_list_query($order_by, $where, $filter = [], $params = [], $show_deleted = 0, $join_type = ‘’, $return_array = false, $parentbean = null, $singleSelect = false, $ifListForExport = false) in /var/www/html/modules/Timesheet/Timesheet.php on line 210

What is that “timesheet” module? An add-on you bought, or your own custom module?

There’s a function in that module that needs to be updated to reflect the argument list in core code.

@pgr Yep this is a custom module , thank you figured out and updated as per the core code.
however I m facing below error now
Fatal error : Uncaught TypeError: Illegal offset type in /var/www/html/custom/application/Ext/JSGroupings/jsgroups.ext.php:11 Stack trace: #0 /var/www/html/jssource/JSGroupings.php(219): require() #1 /var/www/html/jssource/minify_utils.php(95): require(‘/var/www/html/j…’) #2 /var/www/html/include/MVC/View/SugarView.php(937): ConcatenateFiles(‘.’) #3 /var/www/html/include/MVC/View/SugarView.php(1246): SugarView->_displayJavascript() #4 /var/www/html/include/MVC/View/SugarView.php(414): SugarView->renderJavascript() #5 /var/www/html/include/MVC/View/SugarView.php(202): SugarView->displayHeader() #6 /var/www/html/include/MVC/Controller/SugarController.php(432): SugarView->process() #7 /var/www/html/include/MVC/Controller/SugarController.php(363): SugarController->processView() #8 /var/www/html/include/MVC/SugarApplication.php(101): SugarController->execute() #9 /var/www/html/index.php(53): SugarApplication->execute() #10 {main} thrown in /var/www/html/custom/application/Ext/JSGroupings/jsgroups.ext.php on line 11

@pgr I m able to fix all the errors , but admin page went blank after php8.0 upgrade with no error

I have updated all the files from parent::Basic() to parent::__construct(), not sure whats going wrong

Am I missing anything else?

Thanks for your help in advance

You need to go check the errors one by one, but if you get crashes without errors it’s much more difficult…

Try a QR&R if you can get there. And other JS repairs as well.

@pgr I have done QR&R by running the link something like below

http://crmurl/index.php?module=Administration&action=repair

I can see below fatal errors at the suitecrm.log

createRelationshipMeta: Metadata for table does not exist

I fear that your installation might be broken. If you have a backup from before the upgrade attempt, consider going back to it.I hope you’re doing this on a test instance, not on your main server…

I can’t help much with just that bit of information, you’ll have to do some more diagnostic yourself. Ideally, connect a debugger and step through the code.

Thanks for your help here @pgr
We were using Security Suite from the SuiteCRM store I had to install 7.13 version of Security Suite to fix the error

1 Like