- Issue created by @pfrenssen
- Merge request !10Store the CSV file temporarily in the key-value store → (Merged) created by pfrenssen
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.
Result: the translations are not imported, or at best are partially imported.
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.
Active
1.0
Code