Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal 7.7 latest dev of Feeds XPath Parser
Following error appears every time trying to flush the caches.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'FeedsXPathParserHTML-class' for key 1: 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] => FeedsXPathParserHTML [:db_insert_placeholder_1] => class [:db_insert_placeholder_2] => sites/all/modules/feeds_xpathparser/FeedsXPathParserHTML.inc [:db_insert_placeholder_3] => feeds_xpathparser [:db_insert_placeholder_4] => 0 ) in _registry_parse_file() (line 179 of /home/timeweav/public_html/includes/registry.inc).
The website encountered an unexpected error. Please try again later.
Comments
Comment #1
twistor CreditAttribution: twistor commentedCan you try refreshing the cache?
Comment #2
cutmedia CreditAttribution: cutmedia commentedThe error above occurs every time the cache is refreshed. It will only refresh it the reference is manually removed from the db.
Comment #3
mathieuhelie CreditAttribution: mathieuhelie commentedThis seems to be related to class autoloading. A few modules have these problems in D7. I'll investigate.
Comment #4
mathieuhelie CreditAttribution: mathieuhelie commentedDoing a registry rebuild failed. I'm going to open a ticket about this in their issue queue to see if they have any insights in the problem.
#1324000: Failed to rebuild registry on PDO Exception: duplicate entry
Comment #5
mathieuhelie CreditAttribution: mathieuhelie commentedI didn't find a real fix for this issue, but this is what took place to cause the error.
This is likely a bug in the Drupal registry process auto-loading classes from the cache table before running a cache clear, then auto-loading them again after the cache clear.
Comment #6
mathieuhelie CreditAttribution: mathieuhelie commentedComment #7
juampynr CreditAttribution: juampynr commentedRelated issue: #1347894: Clear cache causes integrity constraint violation
The patch for Feeds module in the above issue fixes the error.
Comment #8
twistor CreditAttribution: twistor commentedI just committed a fix for this to 7.x-dev. Can someone test it?
Comment #9
twistor CreditAttribution: twistor commentedhttp://drupalcode.org/project/feeds_xpathparser.git/commit/d629b26
Comment #10
twistor CreditAttribution: twistor commentedThis was fixes in ctools a long time ago.