Yesterday I upgraded awssdk to 7.x-5.0. Now I'm seeing error messages pop up in various areas of my site. They occur in the admin section, and have to do with translations.
Any idea where this comes from?
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'amazons3' for key 'PRIMARY': INSERT INTO {l10n_update_project} (name, project_type, core, version, l10n_server, l10n_path, status) 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); Array ( [:db_insert_placeholder_0] => amazons3 [:db_insert_placeholder_1] => module [:db_insert_placeholder_2] => 7.x [:db_insert_placeholder_3] => 7.x-1.x-dev [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => http://ftp.drupal.org/files/translations/7.x/amazons3/amazons3-7.x-1.x-d... [:db_insert_placeholder_6] => 1 ) in drupal_write_record() (regel 6888 van /Users/joachim/Sites/veto.local/includes/common.inc).
Notice that the upgrade to 7.x-5.0 was a bit flaky for me. I had to remove the awssdk folder in sites/all/libraries completely and unzip a fresh 1.5 before it would work. With an overwritten copy of 1.4, I got a WSOD and after drush cc an error message. Since I couldn't get the database update to run in the browser, I had to use drush for that. Don't know if this could be related. Might be that all this left drupal in a messed up state.
Comment | File | Size | Author |
---|---|---|---|
#11 | pdoexception-1373758-11.patch | 1010 bytes | guillaumev |
Comments
Comment #1
jbeckers CreditAttribution: jbeckers commentedFix is to edit the database entry mentioned. It has "AmazonS3" which should be lowercase "amazons3".
Not sure why awssdk triggered this issue. Might have to be moved to amazons3 or l10n_update
Comment #2
boombatower CreditAttribution: boombatower commentedYea, I have no idea how awssdk would have triggered such a database issue. As for not detecting the 1.5 library you need to clear cache (as per libraries module).
Lets see what they say over in l10n_update.
Comment #3
Sutharsan CreditAttribution: Sutharsan commentedAt first glance it may be an l10n_update bug. Localization Updates keeps track of the update status of projects, that's what the
l10n_update_project
table is used for. For some reason it tries to add a second 'amazons3' record to the table.Comment #4
Sutharsan CreditAttribution: Sutharsan commentedI'm not sure how we can prevent this in the future. The immediate problem is caused by a mismatch between the cached state of 'modules to be updated' and the actual state. You should be able to get out of the situation by submitting the modules page.
Comment #5
jbeckers CreditAttribution: jbeckers commenteddoes it do so because it doesn't accept AmazonS3 to be the same as amazons3?
Comment #6
Sutharsan CreditAttribution: Sutharsan commentedI'm not sure. Try it and you know the answer.
Comment #7
Sutharsan CreditAttribution: Sutharsan commented@jbeckers, do you need more help? Otherwise, feel free to close the issue.
Comment #8
jbeckers CreditAttribution: jbeckers commented@sutharsan: no I'm fine.
Comment #9
jbeckers CreditAttribution: jbeckers commentedComment #10
guillaumev CreditAttribution: guillaumev commentedI'd like to reopen this issue.
Before upgrading l10n_update, my installation profile was working fine. After upgrading it and trying the installation of a new site, the installation fails with exactly this PDO Exception. Basically what's happening is the following:
I believe this is an issue in hook_modules_enabled of l10n_update. I will investigate further...
Comment #11
guillaumev CreditAttribution: guillaumev commentedHere is a patch which makes sure that the list of projects is really current when refreshing a project...
Comment #12
Sutharsan CreditAttribution: Sutharsan commentedThanks! Patch committed.
Comment #14
Garrett Albright CreditAttribution: Garrett Albright commentedI was running into a similar problem when trying to do a site install - though oddly it would only happen when using Drush, and not when doing it through the GUI. Wonder what that was about.
Checking out the most recent code from the repo instead of using the release code caused the problem to go away. Thanks, guillaumev.
Comment #15
Sutharsan CreditAttribution: Sutharsan commented@Garrett Albright, Do you use the latest dev release? #11 should fix this and was committed just after beta3. How do you install, using an install profile or drush si + drush en?
Comment #16
Garrett Albright CreditAttribution: Garrett Albright commentedSutharsan, no, I didn't try the dev release - just went the Git route out of force of habit. If you'd like, I could give it a try though the dev release, though.
I'm installing using an install profile which depends on a Features module which in turn depends on this module.