Database failure

Hello,

I just encountered a database failure.

When I look at a lead, it display spart of the lead page, an then says databae error.

I have not done any thgin different, and nochanges or omodificatyisn have been done.

I am usign suitecrm 7.10.7

My suitecrm.logsays:

Fri Jul 20 16:12:40 2018 [5966][8a745afd-1546-8453-cdf0-5b1029a94981][FATAL] Mysqli_query failed.
Fri Jul 20 16:12:40 2018 [5966][8a745afd-1546-8453-cdf0-5b1029a94981][FATAL] Error running count query for Lead List: Query Failed: ( SELECT count(*) c FROM fp_events$

where fp_events.deleted=0 ): MySQL error 1054: Unknown column ‘leads.id’ in ‘on clause’
Fri Jul 20 16:12:40 2018 [5966][8a745afd-1546-8453-cdf0-5b1029a94981][FATAL] Exception handling in /var/www/clients/client2/web2/web/crm/include/MVC/Controller/SugarCo$
Fri Jul 20 16:12:40 2018 [5966][8a745afd-1546-8453-cdf0-5b1029a94981][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.
Fri Jul 20 16:12:40 2018 [5966][8a745afd-1546-8453-cdf0-5b1029a94981][FATAL] backtrace:
#0 /var/www/clients/client2/web2/web/crm/include/database/DBManager.php(353): sugar_die(‘Database failur…’)
#1 /var/www/clients/client2/web2/web/crm/include/database/DBManager.php(328): DBManager->registerError(‘Error running c…’, ‘Error running c…’, true)
#2 /var/www/clients/client2/web2/web/crm/include/database/MysqliManager.php(177): DBManager->checkError(‘Error running c…’, true)
#3 /var/www/clients/client2/web2/web/crm/data/SugarBean.php(1510): MysqliManager->query(’( SELECT count(…’, true, ‘Error running c…’)
#4 /var/www/clients/client2/web2/web/crm/data/SugarBean.php(1260): SugarBean->_get_num_rows_in_query(’( SELECT count(…’, false)
#5 /var/www/clients/client2/web2/web/crm/data/SugarBean.php(1018): SugarBean->process_union_list_query(Object(Lead), ‘(SELECT fp_even…’, 0, -1, 10, ‘’, Object(aSubPa$
#6 /var/www/clients/client2/web2/web/crm/include/ListView/ListView.php(1101): SugarBean::get_union_related_list(Object(Lead), ‘fp_events.id as…’, ‘asc’, ‘’, 0, -1, 1$
#7 /var/www/clients/client2/web2/web/crm/include/ListView/ListViewSubPanel.php(142): ListView->processUnionBeans(Object(Lead), Object(aSubPanel), ‘fp_events_leads…’)
#8 /var/www/clients/client2/web2/web/crm/include/SubPanel/SubPanel.php(220): ListViewSubPanel->process_dynamic_listview(‘Leads’, Object(Lead), Object(aSubPanel))
#9 /var/www/clients/client2/web2/web/crm/include/SubPanel/SubPanelTiles.php(366): SubPanel->ProcessSubPanelListView(‘include/SubPane…’, Array)
#10 /var/www/clients/client2/web2/web/crm/include/MVC/View/SugarView.php(1193): SubPanelTiles->display()
#11 /var/www/clients/client2/web2/web/crm/include/MVC/View/SugarView.php(235): SugarView->_displaySubPanels()
#12 /var/www/clients/client2/web2/web/crm/include/MVC/Controller/SugarController.php(432): SugarView->process()
#13 /var/www/clients/client2/web2/web/crm/include/MVC/Controller/SugarController.php(375): SugarController->processView()
#14 /var/www/clients/client2/web2/web/crm/include/MVC/SugarApplication.php(109): SugarController->execute()
#15 /var/www/clients/client2/web2/web/crm/index.php(52): SugarApplication->execute()
#16 {main}
Fri Jul 20 16:13:33 2018 [5966][8a745afd-1546-8453-cdf0-5b1029a94981][FATAL] Mysqli_query failed.
Fri Jul 20 16:13:33 2018 [5966][8a745afd-1546-8453-cdf0-5b1029a94981][FATAL] Error running count query for Lead List: Query Failed: ( SELECT count(*) c FROM fp_events$

where fp_events.deleted=0 ): MySQL error 1054: Unknown column ‘leads.id’ in ‘on clause’

I looked things over a little, and it oionly happens of leads. Not contacts or accunts.

I looked up calls and meetings , and they are all still there.

Can anyone give me an idea of what might have happened and how to fix it?

Thank

Joseph

Hello,

I remembered a fe wmore details that might help.

It asked me to turn off th eajaz if things persisted. I did turn itoff, and nothign changed.

I also noted that the lead itself is not lost. But, all the links to the other information abotu th eprofile:

calls, messages, meetings, etc… All these are not listed.

It is like all the suite crm works, except the the links/connection to other data linked to a lead.

Thanks

Joseph

I’ve seen this error, but it should be fixed in 7.10.7.

Please try this fix (and do a Quick Repair, and clear any caches)

https://github.com/PedroErnst/SuiteCRM/commit/2b3839c08511a65056d91c246d6aff5af96964e7#diff-8d01ca067f1bcc78f40e5067f8b18c5d

or tell me if your code already looks like the right-hand side of that screen.

Oh, and check if you have anything in custom/modules/FP_Events

If you do, you probably got a warning when upgrading, but ignored it (I do too, sometimes) and now…

1 Like

Hello,

have no custom modules.

I dodi quick repair, and cleared cache.

It worked.

I was wondering what went wrng:( Thansk for the quick fix!

Thanks!

Joseph