0

We have moved our hosting to new hosting provided (CiviHosting). CiviHosting installed a fresh installation of CiviCRM 4.7. We then imported our previous sql dump from our old site which also had been upgraded to 4.7. The import was done via c-panel. After the import, we get this error when running CiviCRM:

CiviCRM_API3_Exception: "DB Constraint Violation - possibly dashboard_id should possibly be marked as mandatory for this API. If so, please raise a bug report."

#0 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Dashboard.php(125): civicrm_api3("DashboardContact", "get", (Array:5))
#1 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Dashboard.php(158): CRM_Core_BAO_Dashboard::getContactDashlets()
#2 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/DashBoard.php(47): CRM_Core_BAO_Dashboard::getContactDashletsForJS()
#3 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(312): CRM_Contact_Page_DashBoard->run((Array:2), NULL)
#4 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
#5 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:2))
#6 /home/iskcon/www/www/wp-content/plugins/civicrm/civicrm.php(1227): CRM_Core_Invoke::invoke((Array:2))
#7 [internal function](): CiviCRM_For_WordPress->invoke("")
#8 /home/iskcon/www/www/wp-includes/plugin.php(524): call_user_func_array((Array:2), (Array:1))
#9 /home/iskcon/www/www/wp-admin/admin.php(222): do_action("toplevel_page_CiviCRM")
#10 {main}

How do we go about importing our previous database to the new installation? I would appreciate a simplified explanation of the steps to resolve this.

2
  • Hi Sudesh, what is the exact version of CiviCRM? Maybe its there is a difference in the third part. Running the upgrade script can help. Nov 3, 2016 at 8:27
  • Hi Kainuk. Here are the CiviCRM versions: The old site used: 4.7.10. The new site has: 4.7.12 installed.
    – Sudesh
    Nov 3, 2016 at 8:56

3 Answers 3

7

Maybe you can try to run the upgrade script again to go from 4.7.10 to 4.7.12

http://<your_wordpress_home>/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1

Documented on the Wiki Upgrading CiviCRM for Wordpress .

2
  • Running the upgrade script resolved the issue. Thanks Kainuk.
    – Sudesh
    Nov 7, 2016 at 13:47
  • Yes - I ran into the same problem when creating a clone of the site, accidentally using a pre-upgrade MySQL backup with the current version of the codebase. Running the upgrade fixed the error. Jan 11, 2017 at 18:27
0

This wiki page https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location explains how to move to a new server.

You should use exactly the same version of civi on your old and new servers and then upgrade after you have completed all the steps in the above article.

0

As mentioned on another ticket this error can happen if you haven't run civicrm/upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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