CSV import doesn't work when hosting on multiple instances

Created on 7 July 2025, 8 days ago

Problem/Motivation

When Drupal is hosted on multiple instances, the CSV import doesn't work. The CSV file is saved in temporary storage of the instance the submit handler is processed on, but since temporary storage is not shared across multiple web heads, the file is missing on all other instances and cannot be processed.

Steps to reproduce

  1. Host Drupal on infrastructure that has multiple running instances.
  2. Import a CSV file containing Texts translations.

Result: the translations are not imported, or at best are partially imported.

Proposed resolution

Here is an example how Drupal core solves the same problem of importing translations in a batch process in the Locale module: locale_translation_batch_fetch_download().

Since we are dependent on the Locale module, we can use the same solution: instead of temporary storage we can use the translations:// stream wrapper to store the CSV file. This can be configured by site administrators to be on a path that is available across all instances, e.g. by using a network drive mount, or a cloud file storage host like AWS S3.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇧🇬Bulgaria pfrenssen Sofia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024