Answers.Body: <p>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 <code>civicrm_navigation</code> menu.</p>
  
  <p>When you save your report, it's trying to update the menu item for this report.  However, your database doesn't have the <code>icon</code> field, hence the error.</p>
  
  <p>Most likely, this is because CiviCRM was upgraded in the file system, but the "database upgrade" script wasn't run.  Check <a href="https://docs.civicrm.org/sysadmin/en/latest/upgrade/drupal7/#upgrade-the-database" rel="nofollow noreferrer">this step of the upgrade instructions</a> to upgrade the database.</p>
  
  <h3>Troubleshooting</h3>
  
  <p>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.</p>
  
  <p><a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Upgrade/Incremental/php/FourSeven.php#L449" rel="nofollow noreferrer">Here is the code</a> 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).</p>
  
  <p><a href="https://i.sstatic.net/NGlyk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NGlyk.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-07T20:46:55.223Z
Answers.LastActivityDate: 2017-11-07T20:46:55.223Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>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:</p>
  
  <pre><code>    #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-&gt;__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-&gt;__construct(-19, 16, (Array:2), "INSERT INTO civicrm_navigation (domain_id , label , name , url , permission ,...")
  #5 [internal function](): PEAR-&gt;_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-&gt;__call("raiseError", (Array:7))
  #8 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR-&gt;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-&gt;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-&gt;mysqliRaiseError()
  #11 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli-&gt;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-&gt;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-&gt;_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-&gt;insert()
  #15 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/BAO/Navigation.php(98): CRM_Core_DAO-&gt;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-&gt;beginPostProcess()
  #20 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Report/Form/Contribute/Summary.php(757): CRM_Report_Form-&gt;postProcess()
  #21 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/Form.php(447): CRM_Report_Form_Contribute_Summary-&gt;postProcess()
  #22 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Submit.php(74): CRM_Core_Form-&gt;mainProcess()
  #23 /home/REDACTED/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Submit-&gt;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-&gt;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-&gt;handle("submit")
  #26 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller-&gt;run()
  #27 /home/REDACTED/www/www/sites/all/modules/civicrm/CRM/Report/Page/Instance.php(89): CRM_Utils_Wrapper-&gt;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-&gt;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}
  </code></pre>
  
  <p>I have no idea how to interpret this or what to do. Any help would be appreciated. Thanks.</p>
  
Tags: <civireport><error>
Title: Why am I getting 'DB Error: no such field' when editing a report?
ThreadText: # Why am I getting 'DB Error: no such field' when editing a report?
  
  (Asked by: username_0 on 2017-11-07)
  
  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.
  
  **Tags:** civireport, error
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-11-07. Score: 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](https://docs.civicrm.org/sysadmin/en/latest/upgrade/drupal7/#upgrade-the-database) 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](https://github.com/civicrm/civicrm-core/blob/master/CRM/Upgrade/Incremental/php/FourSeven.php#L449) 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](https://i.sstatic.net/NGlyk.png)](https://i.sstatic.net/NGlyk.png)
  
  
  ---
  
  