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/mydomain.com/custom/modules/CustomExport_logic_hook.php:47 Stack trace: #0 /home/canutehe/mydomain.com/include/utils/LogicHook.php(263): CustomExport_logic_hook->addExportFieldButton(āafter_ui_frameā, NULL) #1 /home/canutehe/mydomain.com/include/utils/LogicHook.php(202): LogicHook->process_hooks(Array, āafter_ui_frameā, NULL) #2 /home/canutehe/mydomain.com/include/MVC/View/SugarView.php(213): LogicHook->call_custom_logic(āAccountsā, āafter_ui_frameā) #3 /home/user/mydomain.com/include/MVC/Controller/SugarController.php(432): SugarView->process() #4 /home/user/mydomain.com/include/MVC/Controller/SugarController.php(363): SugarController->processView() #5 /home/user/mydomain.com/include/MVC/SugarApplication.php(101): SugarController->execute() #6 /home/user/mydomain.com/index.php(52): SugarApplication->execute() #7 {main} in /home/user/mydomain.com/custom/modules/CustomExport_logic_hook.php on line 47
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)?
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/domain.com/custom/modules/CustomExport_logic_hook.php:47 Stack trace: #0 /home/user/domain.com/include/utils/LogicHook.php(263): CustomExport_logic_hook->addExportFieldButton() #1 /home/user/domain.com/include/utils/LogicHook.php(202): LogicHook->process_hooks() #2 /home/user/domain.com/include/MVC/View/SugarView.php(213): LogicHook->call_custom_logic() #3 /home/canutehe/domain.com/include/MVC/Controller/SugarController.php(432): SugarView->process() #4 /home/user/comain.com/include/MVC/Controller/SugarController.php(363): SugarController->processView() #5 /home/user/domain.com/include/MVC/SugarApplication.php(101): SugarController->execute() #6 /home/user/domain.com/index.php(52): SugarApplication->execute() #7 {main} thrown in /home/user/domain.com/custom/modules/CustomExport_logic_hook.php on line 47
and this in apache log
448#APVH_domain.com:443] [STDERR] PHP Warning: Class āGoogle_Modelā not found in /home/user/domain.com/vendor/google/apiclient-services/autoload.php on line 21\n
<?php
/**
*
*
* 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------------------------------
require_once('custom/biz_CE/classes/Exportutils.php');
$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>");
}
</script>
EOQ;
echo $auto_popup;
}
}
// }
}
}
}