Full Version: Activity update doesn't register changes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All!

Since this update in the file DART.php (specifically the cahges in line 115):
I can't see the resume with all the changes made during the day (also the e-mail is send but empty). The previous version works just fine.
we need to see the SQL and run it directly in MySQL to see what it is returning.

activate logging at FATAL level and add this line of code before line 115

PHP Code:
global $log;
$log->fatal("SELECT $selectcolumn, modifiedby as modifier, smownerid as owner, module, createdtime!=modifiedtime as haschanged
INNER JOIN vtiger_dart_recordchanges ON 
$table.$idcolumn = vtiger_dart_recordchanges.crmid AND modifiedon=?
INNER JOIN vtiger_crmentity on vtiger_crmentity.crmid=vtiger_dart_recordchanges.crmid"

that should write the SQL into the logs/corebosxxx.log file. Run it directly in MySQL and share the SQL and the result.
SELECT extintores_no as title, extintoresid as id, modifiedby as modifier, smownerid as owner, module, createdtime!=modifiedtime as haschanged
FROM vtiger_extintores
INNER JOIN vtiger_dart_recordchanges ON vtiger_extintores.extintoresid = vtiger_dart_recordchanges.crmid AND modifiedon='2021-12-09'
INNER JOIN vtiger_crmentity on vtiger_crmentity.crmid=vtiger_dart_recordchanges.crmid

Executing the previous code in MySQL gives the following errors:

#1052 - column: 'modifiedby' in field list is ambiguous 
#1052 - column: 'smownerid' in field list is ambiguous 

As suggested appending  "vtiger_crmentity." to both of them (vtiger_crmentity.modifiedby & vtiger_crmentity.smownerid) solved the error.