0

Using Civi 5.20.3 Contacts are getting an error (DB error: Already Exists) when filling out a profile form. This is what I saw on the Drupal Watchdog. What does it mean?

$Fatal Error Details = Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => handle ) [code] => -5 [message] => DB Error: already exists [mode] => 16 [debug_info] => UPDATE civicrm_cache SET data = .....

created_date = FROM_UNIXTIME(1581961411), expired_date = FROM_UNIXTIME(1581983012) WHERE group_name = "contact-20fields" AND path = "exportableFields All_0_0_0_" [nativecode=1062 ** Duplicate entry 'contact-20fields-exportableFields All_0_0_0_-2020-02-17 11:43:31' for key 'UI_group_path_date'] [type] => DB_Error [user_info] => UPDATE civicrm_cache SET data

2
  • For what it's worth, this still happens: [code] => -5 [message] => DB Error: already exists [mode] => 16 [debug_info] => UPDATE civicrm_cache SET data = '[SOME DATA HERE]', created_date = FROM_UNIXTIME(1612723665), expired_date = FROM_UNIXTIME(1612745265) WHERE group_name = "contact-20fields" AND path = "custom importableFields 49f393f8cc6aed05fdb0b39c686d1d28" [nativecode=1062 ** Duplicate entry 'contact-20fields-custom importableFields 49f393f8cc6aed05fdb0...' for key 'UI_group_path_date'] This bricked the whole system until cache clear. Commented Feb 8, 2021 at 15:31
  • Got burned by this today :) Commented Feb 3, 2023 at 11:16

2 Answers 2

1

While it's hard to tell without the entire error message it looks like given that the query appears to be an update to a cache table I'd recommend clearing your caches.

drush cc all or via /civicrm/admin/setting/updateConfigBackend?reset=1

1

It happened to me on a website with Drupal and CiviCRM. I had no access to drush. I have done a truncate of the civicrm_cache table, and it has been enough to solve the problem.

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.