1

I just upgraded to 4.7.27 under Drupal 7. Now, when I try to edit a report, I get 'DB Error: no such field' when trying to save the report. Changes are not saved. Here is the backtrace:

    #0 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/Error.php(187): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/PEAR.php(921): call_user_func((Array:2), Object(DB_Error))
#3 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "INSERT INTO civicrm_navigation (domain_id , label , name , url , permission ,...")
#4 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "INSERT INTO civicrm_navigation (domain_id , label , name , url , permission ,...")
#5 [internal function](): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, NULL, NULL, "INSERT INTO civicrm_navigation (domain_id , label , name , url , permission ,...", "DB_Error", TRUE)
#6 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/PEAR.php(224): call_user_func_array((Array:2), (Array:8))
#7 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
#8 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -19, NULL, NULL, "INSERT INTO civicrm_navigation (domain_id , label , name , url , permission ,...", "DB_Error", TRUE)
#9 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, NULL, "1054 ** Unknown column 'icon' in 'field list'")
#10 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#11 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("INSERT INTO civicrm_navigation (domain_id , label , name , url , permission ,...")
#12 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB/DataObject.php(2446): DB_common->query("INSERT INTO civicrm_navigation (domain_id , label , name , url , permission ,...")
#13 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB/DataObject.php(1068): DB_DataObject->_query("INSERT INTO civicrm_navigation (domain_id , label , name , url , permission ,...")
#14 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/DAO.php(495): DB_DataObject->insert()
#15 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/BAO/Navigation.php(98): CRM_Core_DAO->save()
#16 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Report/BAO/ReportInstance.php(196): CRM_Core_BAO_Navigation::add((Array:9))
#17 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Report/Form/Instance.php(381): CRM_Report_BAO_ReportInstance::create((Array:97))
#18 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Report/Form.php(2589): CRM_Report_Form_Instance::postProcess(Object(CRM_Report_Form_Contribute_Summary))
#19 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Report/Form.php(3242): CRM_Report_Form->beginPostProcess()
#20 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Report/Form/Contribute/Summary.php(757): CRM_Report_Form->postProcess()
#21 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/Form.php(447): CRM_Report_Form_Contribute_Summary->postProcess()
#22 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Submit.php(74): CRM_Core_Form->mainProcess()
#23 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Submit->perform(Object(CRM_Report_Form_Contribute_Summary), "submit")
#24 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Report_Form_Contribute_Summary), "submit")
#25 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("submit")
#26 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
#27 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Report/Page/Instance.php(89): CRM_Utils_Wrapper->run("CRM_Report_Form_Contribute_Summary", NULL, NULL)
#28 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(309): CRM_Report_Page_Instance->run((Array:4), NULL)
#29 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:14))
#30 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#31 /home/REDACTED/www/www/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#32 [internal function](): civicrm_invoke("report", "instance", "61")
#33 /home/REDACTED/www/www/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:3))
#34 /home/REDACTED/www/www/index.php(21): menu_execute_active_handler()
#35 {main}

I have no idea how to interpret this or what to do. Any help would be appreciated. Thanks.

1

CiviCRM 4.7.27 introduced the ability to add icons next to menu items (see screenshot below). This requires a new field called "icon" in the database on the civicrm_navigation menu.

When you save your report, it's trying to update the menu item for this report. However, your database doesn't have the icon field, hence the error.

Most likely, this is because CiviCRM was upgraded in the file system, but the "database upgrade" script wasn't run. Check this step of the upgrade instructions to upgrade the database.

Troubleshooting

If this says the upgrade has already run, that's more concerning. It means that the upgrade skipped a step and/or didn't finish. This could be because of a timeout issue if you're on a slow server, or you don't have the permission to alter tables.

Here is the code that shows all the database changes in Civi 4.7.27. If the upgrade has already run, you'll need to figure out which of these steps ran and which didn't, and use that to try to figure out why (ideally by manually making these database changes).

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.