I get this error after importing a cvs text file (had to increase execution time prior due to timeout errors- used to import fast, not anymore)
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'temporary://hp-d-sal-pib235.jpg' for key 'uri'
Unable to add file http://www.hairproducts.com/images/hp-d-acc-kim100 .jpg
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'temporary://hp-bea-gab114.jpg' for key 'uri'
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'temporary://hp-col-jer126.jpg' for key 'uri'

How can this be resolved?

Comments

Pocketpain’s picture

Sub!

epawel’s picture

sub

chilligroup’s picture

Component: Feeds Import » Code
Issue summary: View changes

subscribe

megachriz’s picture

Category: Bug report » Support request
Status: Active » Fixed

It sounds like that the original file where the file_managed table points to had been removed meanwhile. Then the Drupal file system created a file with the same name and tried to create a record for it in the file_managed table.

To fix it temporary, delete the records from the file_managed table pointing to files which URI starts with 'temporary://'.
For a more permanent fix, it might be a good idea to figure out why managed files are written to 'temporary://' in the first place. Files that exist in 'temporary://' are expected to be removed after a while without Drupal noticing.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.