SQL Error since upgrading from 7.10.7 to 7.10.9:

Since upgrading to 7.10.9 i have lost a meetings subpanel in leads, and its replaced wit the error message “Database failure. Please refer to suitecrm.log for details.”

The following is shown in the log:

Tue Sep 25 02:23:29 2018 [12262][1][FATAL] Exception handling in /var/www/crm/include/MVC/Controller/SugarController.php:400
Tue Sep 25 02:23:29 2018 [12262][1][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.
Tue Sep 25 02:23:29 2018 [12262][1][FATAL] backtrace:
#0 /var/www/crm/include/database/DBManager.php(353): sugar_die(‘Database failur…’)
#1 /var/www/crm/include/database/DBManager.php(328): DBManager->registerError(‘Error retrievin…’, ‘Error retrievin…’, true)
#2 /var/www/crm/include/database/MysqliManager.php(179): DBManager->checkError(‘Error retrievin…’, true)
#3 /var/www/crm/include/database/MysqlManager.php(285): MysqliManager->query(’(SELECT meeting…’, true, ‘Error retrievin…’)
#4 /var/www/crm/data/SugarBean.php(1284): MysqlManager->limitQuery(’(SELECT meeting…’, 0, 21, true, ‘Error retrievin…’)
#5 /var/www/crm/data/SugarBean.php(1016): SugarBean->process_union_list_query(Object(Lead), ‘(SELECT meeting…’, 0, 21, 21, ‘’, Object(aSubPanel), ‘( SELECT count(…’, Array)
#6 /var/www/crm/include/ListView/ListView.php(1132): SugarBean::get_union_related_list(Object(Lead), ‘date_start desc’, ‘desc’, ‘’, ‘’, -1, 20, ‘’, Object(aSubPanel))
#7 /var/www/crm/include/ListView/ListViewSubPanel.php(142): ListView->processUnionBeans(Object(Lead), Object(aSubPanel), ‘activities_CELL’)
#8 /var/www/crm/include/SubPanel/SubPanel.php(220): ListViewSubPanel->process_dynamic_listview(‘Leads’, Object(Lead), Object(aSubPanel))
#9 /var/www/crm/include/SubPanel/SubPanelTiles.php(357): SubPanel->ProcessSubPanelListView(‘include/SubPane…’, Array)
#10 /var/www/crm/include/MVC/View/SugarView.php(1167): SubPanelTiles->display()
#11 /var/www/crm/include/MVC/View/SugarView.php(239): SugarView->_displaySubPanels()
#12 /var/www/crm/include/MVC/Controller/SugarController.php(435): SugarView->process()
#13 /var/www/crm/include/MVC/Controller/SugarController.php(375): SugarController->processView()
#14 /var/www/crm/include/MVC/SugarApplication.php(113): SugarController->execute()
#15 /var/www/crm/index.php(52): SugarApplication->execute()
#16 {main}

For the life of my i cant figure this one out. When upgrading there is always something that takes me a step back :confused:

I’ve run all of the repair processes but the issue remains?
It looks to me as though the error is occurring in step 5?

Sorry about that.

Is your PHP version 5.5.9?

Hi pgr,

Its PHP 7.0.32 - which was upgraded with ubuntu updates.

I just tried moving back to 7.10.7 (that has no errors) and upgrading to 7.10.8, and the error has come back.

The worry is that i my database is on a separate VM and I input lots of data before realising the issue with the update. I would have a nightmare trying to find which records were created since the upgrade - and then trying to re enter them and making sure synchronisation with exchange is not impacted. So im now using crm files 7.10.7 that are pointing to a database that was upgraded to 7.10.9.

(I know there are risks updating my production server - but i just cant find the time to thoroughly test every function after an upgrade, so take the risk and use backups of VM as a fallback - but data synchronisation introduces a another layer of complexity)

Is the issue with the PHP version?

No, your PHP version should be ok.

Do you have this error also coming up in your other log, the web server one (often called php_errors.log)?

I would like to get the full text of the SQL query that is failing.

In the Apache error.log i am getting

PHP Notice: Undefined property: Lead::$parent_id in /var/www/crm/data/SugarBean.php on line 4852
and also
Undefined property: Lead::$parent_id in /var/www/crm/data/SugarBean.php on line 4855

I’ve pasted part of the log file with the sql here https://pastebin.com/iXkzqDvR

It’s seems you’re getting this


but the fix seems incomplete, for some users. Are you using any custom modules here?

Please follow the issue on GitHub and post there explaining your case, we need to gather more info, and be able to reproduce, in order to fix this.

1 Like

Thank you so much - that was the problem!

Interestingly some of the modules listed in the fix were fine and already had ‘date_due’ instead of ‘date_start’.

On the downside, in trying to fix the problem i messed with too many files in the 7.10.9 instance so need to go back to 7.10.7 and upgrade again before applying the fixes - but for some reason the upgrade package is not being saved/applied after being uploaded - even with correct permissions :unsure:

Check (and maybe increase) max_upload_size and max_execution_time in php.ini

You can delete custom/upgrades/patch to clean up left-overs from previous installations.

Thank PGR, the php settings were ok, and despite deleting the patches folder i was still getting the error - however i removed c couple of entries in the version table using phpmyadmin and the install went ahead.

Thank you so much for your help.