When I add a node with a soundcloud field it works fine. But if I wanted to edit the node again I get an error.
The website encountered an unexpected error. Please try again later.
When I checked the logs it was an error of duplicate entry as below. Am currently working on Drupal 7.17.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'soundcloud://u/xxxxxx/a/xxxxxx' for key 'uri': INSERT INTO {file_managed} (uid, filename, uri, filemime, filesize, status, timestamp, type) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => xxxxxx [:db_insert_placeholder_2] => soundcloud://u/xxxxxx/a/xxxxxx [:db_insert_placeholder_3] => audio/soundcloud [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 1360038148 [:db_insert_placeholder_7] => audio ) in drupal_write_record() (line 7106 of /home/xxxxxx/public_html/xxxxxx/includes/common.inc).
Any solution to this?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 2013-02-12-152209_1440x900_scrot.png | 50.79 KB | korzh-nick |
| #8 | 2013-02-12-152246_1440x900_scrot.png | 37.65 KB | korzh-nick |
| #8 | 2013-02-12-152349_1440x900_scrot.png | 38.11 KB | korzh-nick |
| #8 | 2013-02-12-152918_1440x900_scrot.png | 69.65 KB | korzh-nick |
| #5 | Basic page | soundcloud.local_.png | 80.92 KB | victoriachan |
Comments
Comment #1
victoriachan commentedHi,
What version of Media and File Entity are you using?
Comment #2
karangi commentedHi Thanks for the quick response,
Am using Media 7.x-1.2 and File Entity 7.x-1.2.
Comment #3
victoriachan commentedHi Karangi,
I've just tested this on a new demo build using:
projects[drupal][version] = 7.19
projects[media][version] = 1.2 (In Media 1.x, File Entity is distributed as part of Media module)
projects[media_soundcloud][version] = 1.0-alpha2
I have configured my test soundcloud field as:
Is your field set up similarly?
How I tested:
And I couldn't replicate your problem. Can you spot the difference? I'm using a different version of core Drupal, but that shouldn't be a problem.
Comment #4
karangi commentedThanks Victoria,
I created a test version also and realized that the problem arises when you have:
Which is what I had all along.
Thanks so much again for you help!
Comment #5
victoriachan commentedHi karangi,
No problem.
Did you mean the Media File Selector widget? I didn't get any option for Embedded Media Type. Or is that from another module? If so, that could be the problem.
Otherwise, are you using revisioning or other modules which might be affecting this?
I'm attaching a screenshot of my field edit page, and also here is a list of modules I have installed:
I have tried with various media fields, and couldn't replicate the error.
Comment #6
karangi commentedHi, I think it comes with a module called emfield which I thought was part of this module.
Thanks anyway for the help, I really appreciate your good work. I'll mark this as fixed.
Comment #7
karangi commentedComment #8
korzh-nick commentedUPD:Sorry. edited post. Did not work because of the blockage in the browser