hi
when i want to update my translations via back office i get this error :
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=41&op=do StatusText: error ResponseText: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'uri' in 'field list': UPDATE {l10n_update_file} SET type=:db_update_placeholder_0, filename=:db_update_placeholder_1, fileurl=:db_update_placeholder_2, uri=:db_update_placeholder_3, timestamp=:db_update_placeholder_4, version=:db_update_placeholder_5, status=:db_update_placeholder_6, last_updated=:db_update_placeholder_7, import_date=:db_update_placeholder_8 WHERE (project = :db_condition_placeholder_0) AND (language = :db_condition_placeholder_1) ; Array ( [:db_update_placeholder_0] => download [:db_update_placeholder_1] => admin_menu-7.x-3.0-rc1.fr.po [:db_update_placeholder_2] => http://ftp.drupal.org/files/translations/7.x/admin_menu/admin_menu-7.x-3.0-rc1.fr.po [:db_update_placeholder_3] => /var/www/upgrade67/sites/all/temp/translation-FJu2WJ [:db_update_placeholder_4] => 1308898484 [:db_update_placeholder_5] => 7.x-3.0-rc1 [:db_update_placeholder_6] => 1 [:db_update_placeholder_7] => 1312265490 [:db_update_placeholder_8] => 1312265490 [:db_condition_placeholder_0] => admin_menu [:db_condition_placeholder_1] => fr ) in drupal_write_record() (line 6859 of /var/www/upgrade67/includes/common.inc).
so i try with drush and this is details:
$ drush l10n-update-refresh && drush l10n-update --languages=fr
Fetched information about available updates from the server [status]
Fetching update information for all projects / all languages. [status]
Found 21 projects to update. [status]
Updating translation. [status]
Downloading and importing files. [status]
WD php: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'uri' in 'field list': [error]
UPDATE {l10n_update_file} SET type=:db_update_placeholder_0, filename=:db_update_placeholder_1,
fileurl=:db_update_placeholder_2, uri=:db_update_placeholder_3, timestamp=:db_update_placeholder_4,
version=:db_update_placeholder_5, status=:db_update_placeholder_6,
last_updated=:db_update_placeholder_7, import_date=:db_update_placeholder_8
WHERE (project = :db_condition_placeholder_0) AND (language = :db_condition_placeholder_1) ; Array
(
[:db_update_placeholder_0] => download
[:db_update_placeholder_1] => admin_menu-7.x-3.0-rc1.fr.po
[:db_update_placeholder_2] =>
http://ftp.drupal.org/files/translations/7.x/admin_menu/admin_menu-7.x-3.0-rc1.fr.po
[:db_update_placeholder_3] => /var/www/upgrade67/sites/all/temp/translation-sVSvyg
[:db_update_placeholder_4] => 1308898484
[:db_update_placeholder_5] => 7.x-3.0-rc1
[:db_update_placeholder_6] => 1
[:db_update_placeholder_7] => 1312265881
[:db_update_placeholder_8] => 1312265881
[:db_condition_placeholder_0] => admin_menu
[:db_condition_placeholder_1] => fr
)
in drupal_write_record() (line 6861 of /var/www/upgrade67/includes/common.inc).
Drush command terminated abnormally due to an unrecoverable error. [error]
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'uri' in 'field list': UPDATE {l10n_update_file} SET type=:db_update_placeholder_0, filename=:db_update_placeholder_1, fileurl=:db_update_placeholder_2, uri=:db_update_placeholder_3, timestamp=:db_update_placeholder_4, version=:db_update_placeholder_5, status=:db_update_placeholder_6, last_updated=:db_update_placeholder_7, import_date=:db_update_placeholder_8
WHERE (project = :db_condition_placeholder_0) AND (language = :db_condition_placeholder_1) ; Array
(
[:db_update_placeholder_0] => download
[:db_update_placeholder_1] => admin_menu-7.x-3.0-rc1.fr.po
[:db_update_placeholder_2] => http://ftp.drupal.org/files/translations/7.x/admin_menu/admin_menu-7.x-3.0-rc1.fr.po
[:db_update_placeholder_3] => /var/www/upgrade67/sites/all/temp/translation-sVSvyg
[:db_update_placeholder_4] => 1308898484
[:db_update_placeholder_5] => 7.x-3.0-rc1
[:db_update_placeholder_6] => 1
[:db_update_placeholder_7] => 1312265881
[:db_update_placeholder_8] => 1312265881
[:db_condition_placeholder_0] => admin_menu
[:db_condition_placeholder_1] => fr
)
in drupal_write_record() (line 6861 of /var/www/upgrade67/includes/common.inc).
is it a file permission issue ?
thanks
Comments
Comment #1
gábor hojtsyNo, the error message says: Unknown column 'uri' in 'field list': ... UPDATE {l10n_update_file}. This is pretty strange because that column should be there in Drupal 7. I think you've updated this site from Drupal 6 and we forgot to provide an upgrade path for this column :|
Looking at http://drupalcode.org/project/l10n_update.git/commitdiff/3b43bb5c2a82286... and further history of the schema, I changed the column without providing an upgrade path. :| Retitling for this.
Comment #2
aiphesyes i done an upgrade from D6 for testing...so do you think i can add manually this column in my db ?
Comment #3
gábor hojtsyThe Drupal 6 filepath column became the uri column in Drupal 7, so if you can try renaming the column and provide feedback on how that worked that would be great. I think the data might need some changes as well, but not sure about that, so glad you can test, thank you!
Comment #4
aiphesso i modify the column name in l10n_update_file table from "filepath" to "uri" and do a drush update :
and check in BO , all translations are up to date ! just warning on html strings ...seem to be good not ?
Comment #5
gábor hojtsyWell, this looks good. The HTML warning is due to translations with tags disallowed in translations. That can happen, but its part of "normal" operation. It is to protect your site from cross site scripting attacks via translations.
Comment #6
aiphesi've this warning all the time on D6 or D7...no special setting from me, my hosting do that and my linux dev server too...i would think it was "normal" and come from the module itself...
Comment #7
gábor hojtsyYes, as said it is "normal", comes from the module and means it protected you from a potential cross site scripting attack (usually a honest but improperly used HTML tag in practice).
Comment #8
aiphesok i misunderstood #5, all is good now so
Comment #9
sutharsan commentedComment #10
ethnovode commentedI applied the patch, ran update.php and now it is working. Thanks !
Comment #11
eiriksmSutharsan: Thanks! Fixed it for me too.
although small patch, git patching > sql is what i say.
Comment #12
zeip commentedPatch in #9 worked for me on a site upgraded from D6 to D7. Thanks!
Comment #13
sutharsan commentedThanks for testing. Patch committed.
Comment #14
colanIf you've got a pure D7 site (that was never upgraded), you'll get the following error:
...that you can't get past. We should make sure that field actually exists before changing it. Here's another patch that does the proper checking.
Comment #15
sutharsan commentedThanks a lot!