After installation I am getting this error:

    PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'civicrm_handler_field_custom_file-class' for key 'PRIMARY': INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); 
Array ( [:db_insert_placeholder_0] => civicrm_handler_field_custom_file [:db_insert_placeholder_1] => class [:db_insert_placeholder_2] => sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_custom_file.inc [:db_insert_placeholder_3] => civicrm [:db_insert_placeholder_4] => 0 ) in _registry_parse_file() (line 179 of /xxxx/drupal70/includes/registry.inc).

enter image description here


I resolved this by truncating all the caching tables using mysql query. I followed following steps:

1. Connect Sql server 
2. Truncate the all the cache tables and they are as follows:
truncate cache;
truncate cache_admin_menu;
truncate cache_block;
truncate cache_bootstrap;
truncate cache_field;
truncate cache_filter;
truncate cache_form;
truncate cache_image;
truncate cache_libraries;
truncate cache_media_xml;
truncate cache_menu;
truncate cache_page;
truncate cache_path;
truncate cache_token;
truncate cache_views;
truncate cache_views_data;

By doing this above steps I can able to resolve this issue.


The error message seems like you have two duplicate entries for civicrm_handler_filter_custom_file-class in registry table.

To fix, try deleting one of them, i.e, in registry table of drupal database

  • Search for civicrm_handler_filter_custom_file-class in name column.
  • Check if there are two entries found.
  • If yes, delete or rename one of them to see if it fixes the issue.

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.