Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error on dashboard
#1
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


Attached Files Thumbnail(s)
   
Ranieri
eCRM Web
Reply
#2
When I marked all to hide, works again ...
Ranieri
eCRM Web
Reply
#3
I need to see the query that the filter is creating.

If you can, upload a screen shot of the filter definitions and the query being generated by adding

PHP Code:
echo $query; die(); 


here: https://github.com/tsolucio/corebos/blob/master/include/home.php#L443

like this;


                $queryGenerator->setFields($newFields);
                $query = $queryGenerator->getQuery();
                echo $query; die();
                $count_result = $adb->query(mkCountWithFullQuery($query));
                $noofrows = $adb->query_result($count_result, 0, 'count');

Joe
TSolucio
Reply
#4
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


Attached Files Thumbnail(s)
   
Ranieri
eCRM Web
Reply
#5
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.
Joe
TSolucio
Reply
#6
Ok I will try this

And more strange because this error occurs only for new users ...

for older users dashboard works normally ...
Ranieri
eCRM Web
Reply
#7
try updating, I fixed an issue with the new user creation
Joe
TSolucio
Reply
#8
I will try,

I need make a new git pull for all updated right?
Ranieri
eCRM Web
Reply
#9
correct
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)