There is a problem in l10n_packager after D6 to D7 migration

  1. Open translate/downloads
  2. Select a project and press Show downloads

I figured out the root cause is that file_managed table is empty and therefore l10n_packager_show_downloads() returns nothing.

Why is this table empty? files table had all data in D6 and the Show downloads table worked well.

Comments

hass created an issue. See original summary.

hass’s picture

I do not think re-packaging all projects is the way I should go here. It works, but it looks wrong.

The real question is why the files table is not migrated properly from D6 to file_managed.

SebCorbin’s picture

From #2549799: Fix up D7 packaging:

D7 core migration does not take responsibility for moving rows from files to the files_managed table, that is up to the modules. This wasn't implemented for l10n_packager, so it is repackaging old releases.

l10n_packager D7 should indeed move the files, but I have no idea how :/

I lack data that would be identical to your current state.
Another solution is to wait for all releases to be repackaged, but it depends on how much data you have

SebCorbin’s picture

Status: Active » Needs work

Just talked to drumm, there was a hook_update_N added to the localizedrupalorg project to take care of that: http://cgit.drupalcode.org/localizedrupalorg/tree/localizedrupalorg/loca...

Need to

  • copy it to the l10n_server module
  • rename variables and function
  • add a killswitch so that it does't run twice on localize.drupal.org
  • set this killswitch in a hook_update_N in localizedrupalorg project
hass’s picture

Why copy it to the l10n_server module? I thought it is l10n_packager module? Do you think this is just a 1:1 copy?

hass’s picture

Assigned: Unassigned »

The killswitch for ldo can be just a simple SQL update on the system table schema field. This can be done with an update hook in localizedrupalorg module. Everything else is not really clean code for - 10n_server modules

hass’s picture

Title: Download translation is empty and has no releases » Migrate packaged translation files to D7 managed files
StatusFileSize
new5.31 KB

Changed variable names, removed commented debugs, reduced batch size from 60.000 to 5.000 as it looks really large.

hass’s picture

Status: Needs work » Needs review
hass’s picture

Tested it on my site and all 3 tables are in sync. All 3 tables (file_managed, file_usage and l10n_packager_file) have the same number of items. The downloads translation page is also working as before. Let's get this in, too. :-)

hass’s picture

SebCorbin’s picture

Status: Needs review » Fixed

Added a killswitch and committed

  • SebCorbin committed 1669a37 on 7.x-1.x authored by hass
    Issue #2574165 by hass, SebCorbin: Migrate packaged translation files to...
hass’s picture

What do you think about #2575231: Add killswitch so l10n_packager_update_7000 does not run "again" ? I think this is the better killswitch...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.