When i am trying to Repackage some a project release on admin/l10n_server/packager i get an AJAX error:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=34&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'public://l10n_packager/7.x/simplenews/simplenews-7.x-1.0.de.po' for key 'uri': INSERT INTO {file_managed} (filename, uri, filemime, filesize, status, timestamp) 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); Array ( [:db_insert_placeholder_0] => simplenews-7.x-1.0.de.po [:db_insert_placeholder_1] => public://l10n_packager/7.x/simplenews/simplenews-7.x-1.0.de.po [:db_insert_placeholder_2] => text/plain [:db_insert_placeholder_3] => 1076 [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => 1373554236 ) in drupal_write_record() (line 7166 of /home/sle/www/moddev/d7/includes/common.inc).

I checked my file_managed table, deleted the row and tried it again, but it's still the same.

Comments

s_leu’s picture

Status: Active » Closed (works as designed)

Found the problem now. In my test environment i had unfortunately created two releases with the same title (which is currently possible) using the gettext connector.

The packager loops through the releases and creates a record in the file_managed table which has the unique uri field. The filename is dynamically set including based on the title. So what happens if you have two releases with the same name and try to repackage is that the packager will try to write a duplicate record with the same uri in the file_managed table.

I will create a minor followup that should validate the title by checking if the submitted release title already exists.

s_leu’s picture