SuiteCRM error after update to 7.14 from 7.11

Hello, after update I’m facing this error on account details:

Fatal error: Uncaught Error: Object of class Sugar_Smarty could not be converted to string in /home/canutehe/ Stack trace: #0 /home/canutehe/ CustomExport_logic_hook->addExportFieldButton(‘after_ui_frame’, NULL) #1 /home/canutehe/ LogicHook->process_hooks(Array, ‘after_ui_frame’, NULL) #2 /home/canutehe/ LogicHook->call_custom_logic(‘Accounts’, ‘after_ui_frame’) #3 /home/user/ SugarView->process() #4 /home/user/ SugarController->processView() #5 /home/user/ SugarController->execute() #6 /home/user/ SugarApplication->execute() #7 {main} in /home/user/ on line 47

It should look like this:

PHP is 7.4.
On php 8 account overview not working at all, so I set php 7.4

Repair tool not helps, this only one error I see, suitecrm.log is empty :frowning:

Please, someone…

Version 7.14.1 is supposed to compatible only with PHP 8.1 or 8.2. Can you run with PHP 8.1 or 8.2 and post back your results (suitecrm.log and php_error.log if any)?

ITs same on php 8.1 and 8.2

This is one error from suitecrm.log:

Tue Oct 31 09:28:53 2023 [3119585][-none-][SECURITY] OutboundEmail::checkSavePermissions - not logged in- skipping check

php_errors is empty

this what i see when display_errors is active:

Fatal error : Uncaught Error: Object of class Sugar_Smarty could not be converted to string in /home/user/ Stack trace: #0 /home/user/ CustomExport_logic_hook->addExportFieldButton() #1 /home/user/ LogicHook->process_hooks() #2 /home/user/ LogicHook->call_custom_logic() #3 /home/canutehe/ SugarView->process() #4 /home/user/ SugarController->processView() #5 /home/user/ SugarController->execute() #6 /home/user/ SugarApplication->execute() #7 {main} thrown in /home/user/ on line 47

and this in apache log] [STDERR] PHP Warning: Class “Google_Model” not found in /home/user/ on line 21\n

What is the code you have in /home/user/ ?

 * LICENSE: The contents of this file are subject to the license agreement ("License") which is included
 * in the installation package (LICENSE.txt). By installing or using this file, you have unconditionally
 * agreed to the terms and conditions of the License, and you may not use this file except in compliance
 * with the License.
 * @author     Biztech Consultancy
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.

class CustomExport_logic_hook {

    public function addExportFieldButton($event, $arguments = '') {

        global $db, $current_user;
        $action = $_REQUEST['action'];
        $module = $_REQUEST['module'];
        $restrictedActions = array('vCard','QuickEdit');
        $restrictedModules = array('Import', 'ModuleBuilder');
        $saved_module_array = array();
        if (!in_array($action, $restrictedActions) && !in_array($module, $restrictedModules)) {
        //------------------------checking license configuration status------------------------------

        $checkExportSubscription = Exportutils::validateExportSubscription();
        if ($checkExportSubscription['success']) {
            //if ($action == 'index' || $action == 'Listview') {
            $template = new Sugar_Smarty();
            $is_export = false;
            $select_query = "SELECT module FROM custom_export_modules_tbl";
            $saved_module_result = $db->query($select_query);
            while ($saved_module_row = $db->fetchByAssoc($saved_module_result)) {
                $saved_module_array[] = $saved_module_row['module'];
            if (in_array($module, $saved_module_array)) {
                $is_export = true;
            $current_subTheme = $current_user->getPreference('subtheme');
            if ($is_export == true) {
                    echo $template->assign('current_subTheme', $current_subTheme);
                    echo $template->assign('module', $module);
                echo $template->fetch('custom/include/Listview/ListViewColumnsExportDialog.tpl');
                $auto_popup = <<<EOQ
<script type="text/javascript" language="javascript">
        var l = $('.listViewLinkButton_Id').length;
        if(l < 2){
        $('.searchLink').before("<ul class='clickMenu selectmenu SugarActionMenu columnsFilterLink listViewLinkButton listViewLinkButton_Id' style='margin-left:10px; !important;' onclick='columnsExport.onExportOpen();'><li class='sugar_action_button'><a href='#' title='Export Fields Chooser'><img style='vertical-align: inherit !important;' height='15' width='15' src='custom/include/images/export.gif'></img></a></li></ul>");

                echo $auto_popup;
       // }


looks like this is module cause it
Advanced Export For SuiteCRM

I’ve disabled it - and all good

What if you remove ‘echo’ and replace code lines as below?

$template->assign(‘current_subTheme’, $current_subTheme);

$template->assign(‘module’, $module);

Tried, not working (chatgpt suggested same lol)