Problem/Motivation

Every packaged translation file on Drupal 7 is a file_managed row referenced from l10n_packager_file. The public files migration deliberately leaves out .po files, because the packaged files are synced to the new server rather than copied, but the packager file migration still copies their fid. After the migration every packaged file row points at a file entity that does not exist. The downloads page, the top downloads block and the per language download tables join the file table, so they show nothing at all, and the packager cannot update a file in place until each release has been repackaged for every language, which is millions of files on localize.drupal.org.

Proposed resolution

Migrate the .po rows of file_managed as file entities without copying anything: same id, name, uri, mime type, size, status and dates. The files themselves arrive by syncing the packager directory before the cutover. Make the packager file migration depend on it so the references resolve.

Tests: a fixture based kernel test for the new migration (a .po row arrives, an image row does not), and the packager file migration test now runs both migrations and checks that the file reference loads.

LLM disclosure

LLM was used to find, diagnose explain and fix this issue. With human review.

Comments

gábor hojtsy created an issue. See original summary.

  • 88a9431b committed on 3.0.x
    fix #3621512: Packaged translation files lose their file records in the...
gábor hojtsy’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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