Fresh Install and modified dropdown choices leads to sql errors

So I have just done a fresh install of 7.10.5 and everything seems to be working ok that is until I edit some of the module dropdown choices. After that I end up getting SQL errors which leads being unable to view lead details without throwing errors. I tried a rebuild and that just ends up leading to more errors. So I have done a fresh install yet again and modified some of the fields again so that I can migrate away from Salesforce but I keep throwing this error. See the log below. and Attached is a screenshot of what I get when I attempt to open a lead to see it’s details.

Fri Jun 1 18:05:57 2018 [20872][1][FATAL] Mysqli_query failed.
Fri Jun 1 18:05:57 2018 [20872][1][FATAL] Error running count query for Lead List: Query Failed: ( SELECT count(*) c FROM fp_events INNER JOIN fp_events_leads_1_c ON AND fp_events_leads_1_c.fp_events_leads_1fp_events_ida=‘344f3e79-da83-f365-6b68-5b117b62ee10’ AND fp_events_leads_1_c.deleted=0

where fp_events.deleted=0 ): MySQL error 1054: Unknown column ‘’ in ‘on clause’
Fri Jun 1 18:05:57 2018 [20872][1][FATAL] Exception handling in /var/www/clients/client0/web13/web/include/MVC/Controller/SugarController.php:402
Fri Jun 1 18:05:57 2018 [20872][1][FATAL] Exception in Controller: Database failure. Please refer to suitecrm.log for details.
Fri Jun 1 18:05:57 2018 [20872][1][FATAL] backtrace:
#0 /var/www/clients/client0/web13/web/include/database/DBManager.php(353): sugar_die(‘Database failur…’)
#1 /var/www/clients/client0/web13/web/include/database/DBManager.php(328): DBManager->registerError(‘Error running c…’, ‘Error running c…’, true)
#2 /var/www/clients/client0/web13/web/include/database/MysqliManager.php(177): DBManager->checkError(‘Error running c…’, true)
#3 /var/www/clients/client0/web13/web/data/SugarBean.php(1510): MysqliManager->query(’( SELECT count(…’, true, ‘Error running c…’)
#4 /var/www/clients/client0/web13/web/data/SugarBean.php(1260): SugarBean->_get_num_rows_in_query(’( SELECT count(…’, false)
#5 /var/www/clients/client0/web13/web/data/SugarBean.php(1018): SugarBean->process_union_list_query(Object(Lead), ‘(SELECT fp_even…’, ‘’, -1, 10, ‘’, Object(aSubPanel), ‘( SELECT count(…’, Array)
#6 /var/www/clients/client0/web13/web/include/ListView/ListView.php(1101): SugarBean::get_union_related_list(Object(Lead), ‘ as…’, ‘asc’, ‘’, ‘’, -1, 10, ‘’, Object(aSubPanel))
#7 /var/www/clients/client0/web13/web/include/ListView/ListViewSubPanel.php(142): ListView->processUnionBeans(Object(Lead), Object(aSubPanel), ‘fp_events_leads…’)
#8 /var/www/clients/client0/web13/web/include/SubPanel/SubPanel.php(220): ListViewSubPanel->process_dynamic_listview(‘Leads’, Object(Lead), Object(aSubPanel))
#9 /var/www/clients/client0/web13/web/include/SubPanel/SubPanel.php(231): SubPanel->ProcessSubPanelListView(‘include/SubPane…’, Array)
#10 /var/www/clients/client0/web13/web/include/SubPanel/SubPanelViewer.php(95): SubPanel->display()
#11 /var/www/clients/client0/web13/web/include/MVC/Controller/SugarController.php(1081): require_once(’/var/www/client…’)
#12 /var/www/clients/client0/web13/web/include/MVC/Controller/SugarController.php(465): SugarController->handleActionMaps()
#13 /var/www/clients/client0/web13/web/include/MVC/Controller/SugarController.php(373): SugarController->process()
#14 /var/www/clients/client0/web13/web/include/MVC/SugarApplication.php(109): SugarController->execute()
#15 /var/www/clients/client0/web13/web/index.php(52): SugarApplication->execute()
#16 {main}

Hosted on Centos 7
Running PHP 7.1
Database is Mariadb 5.5.52

If anyone could help me out I would greatly appreciate it.

Was going through other topics and found one that seems to have the answer.

apparently data/Link2.php needs to be modified a bit. a link to the solution is below.

1 Like