| Project: | Localization update |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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.
Comments
#1
Fix 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
#2
Yea, 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.
#3
At 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_projecttable is used for. For some reason it tries to add a second 'amazons3' record to the table.#4
I'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.
#5
does it do so because it doesn't accept AmazonS3 to be the same as amazons3?
#6
I'm not sure. Try it and you know the answer.
#7
@jbeckers, do you need more help? Otherwise, feel free to close the issue.
#8
@sutharsan: no I'm fine.
#9
#10
I'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...
#11
Here is a patch which makes sure that the list of projects is really current when refreshing a project...
#12
Thanks! Patch committed.
#13
Automatically closed -- issue fixed for 2 weeks with no activity.
#14
I 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.
WD php: PDOException: SQLSTATE[23000]: Integrity constraint violation: 19 column name is not unique: INSERT INTO [error]{l10n_update_project} (name, project_type, core, version, l10n_server, l10n_path, status) VALUES (?, ?, ?, ?, ?, ?, ?);
Array
(
[0] => hboss_cs
[1] => module
[2] => 7.x
[3] => 7.x-1.2
[4] =>
[5] => http://ftp.drupal.org/files/translations/7.x/hboss_cs/hboss_cs-7.x-1.2.%... [6] => 1
)
in drupal_write_record() (line 6975 of /Users/garrett/Sites/hbosscs.test/www/includes/common.inc).
Cannot modify header information - headers already sent by (output started at /Users/garrett/Drupal [warning]
Checking out the most recent code from the repo instead of using the release code caused the problem to go away. Thanks, guillaumev.
#15
@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?
#16
Sutharsan, 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.