05-17-2019, 05:51 PM (This post was last modified: 05-17-2019, 06:54 PM by rslemer.)
I have many users with same filter, in module at your dashboard
Recently I created two news users, but for this newers, when I created the same module in your dashboard system never finished all widgets
In log ( apache) I see
PHP Fatal error: Uncaught Exception: result is not an object in /usr/share/coreBOS/corebos-master/include/database/PearDatabase.php:825\nStack trace:\n#0 /usr/share/coreBOS/corebos-master/include/home.php(444): PearDatabase->query_result(false, 0, 'count')\n#1 /usr/share/coreBOS/corebos-master/include/home.php(260): Homestuff->getModuleFilters(3666)\n#2 /usr/share/coreBOS/corebos-master/modules/Home/HomeWidgetBlockList.php(51): Homestuff->getHomePageStuff(3666, 'Module')\n#3 /usr/share/coreBOS/corebos-master/include/Ajax/CommonAjax.php(22): require_once('/usr/share/core...')\n#4 /usr/share/coreBOS/corebos-master/modules/Home/HomeAjax.php(10): require_once('/usr/share/core...')\n#5 /usr/share/coreBOS/corebos-master/index.php(485): include_once('/usr/share/core...')\n#6 {main}\n thrown in /usr/share/coreBOS/corebos-master/include/database/PearDatabase.php on line 825, referer: http://xxxxx/index.php?action=index&module=Home
05-18-2019, 06:35 PM (This post was last modified: 05-18-2019, 06:37 PM by rslemer.)
Prazos Pendentes
SELECT vtiger_troubletickets.ticketid, vtiger_troubletickets.title, vtiger_troubletickets.parent_id, vtiger_crmentity.smownerid, vtiger_troubletickets.status, vtiger_ticketcf.cf_921, vtiger_ticketcf.cf_920 FROM vtiger_troubletickets INNER JOIN vtiger_crmentity ON vtiger_troubletickets.ticketid = vtiger_crmentity.crmid LEFT JOIN vtiger_users ON vtiger_crmentity.smownerid = vtiger_users.id LEFT JOIN vtiger_groups ON vtiger_crmentity.smownerid = vtiger_groups.groupid INNER JOIN vtiger_ticketcf ON vtiger_troubletickets.ticketid = vtiger_ticketcf.ticketid INNER JOIN vt_tmp_u209 vt_tmp_u209 ON vt_tmp_u209.id = vtiger_crmentity.smownerid WHERE vtiger_crmentity.deleted=0 AND ( (( vtiger_troubletickets.title IN ( select translation_key from vtiger_cbtranslation where locale="pt_br" and forpicklist="HelpDesk::ticket_title" and i18n <> 'Separado para Distribuir') AND vtiger_troubletickets.title <> 'Separado para Distribuir') and ( vtiger_troubletickets.status IN ( select translation_key from vtiger_cbtranslation where locale="pt_br" and forpicklist="HelpDesk::ticketstatus" and i18n = 'Aberto') OR vtiger_troubletickets.status = 'Aberto') or ( vtiger_troubletickets.status IN ( select translation_key from vtiger_cbtranslation where locale="pt_br" and forpicklist="HelpDesk::ticketstatus" and i18n = 'Notificado') OR vtiger_troubletickets.status = 'Notificado') )) AND vtiger_troubletickets.ticketid > 0
I dedicated some time to this. Created unit tests for the DatabaseUtil class and refactored the functions. I fixed some minor issues in one function which I doubt would affect the problem you are having but you can try updating just in case.
Next review the custom fields, make sure they haven't been deleted but the filter hasn't been updated. If that isn't the issue, delete this part of the SQL:
INNER JOIN vt_tmp_u209 vt_tmp_u209 ON vt_tmp_u209.id = vtiger_crmentity.smownerid
and execute the rest in mysql to see if you get any error.
if not, make the same modification as above but after the mkCountQuery() function to get the result of that function and execute that on in mysql to see if you can see the error.