See attached image to see how these errors are hammering my watchdog logs on every cron run.

These are the descriptions of each of the errors I'm getting:

Warning: fopen(translations://i18n-7.x-1.13.es.po): failed to open stream: "TranslationsStreamWrapper::stream_open" call failed in PoStreamReader->open() (line 162 of /.../profiles/l10n_install/modules/l10n_update/includes/gettext/PoStreamReader.php).

Warning: ftell() expects parameter 1 to be resource, boolean given in PoStreamReader->open() (line 163 of /.../profiles/l10n_install/modules/l10n_update/includes/gettext/PoStreamReader.php).

Warning: fgets() expects parameter 1 to be resource, boolean given in PoStreamReader->readLine() (line 257 of /.../profiles/l10n_install/modules/l10n_update/includes/gettext/PoStreamReader.php).

I have tried applying this patch but id did nothing to resolve the issue:
https://www.drupal.org/files/issues/l10n_update-unable-to-download-trans...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thePanz’s picture

I got the same issues when I manually deleted the downloaded .po files between the "translation update check" and the "translation update install". I guess the module is keeping a list of available (and already downloaded translations) and the errors are raised when such files 'disappears'.
Could you try to re-run the "translation update" check?

Cheers

Sutharsan’s picture

Status: Active » Closed (works as designed)

You should not removed files after downloading and before importing their content.

techypaul’s picture

I am also getting this. I've not deleted anything. What else can cause this to occur?

Thanks,
Paul.

danyg’s picture

@techypaul: Maybe you should set the directory of translations at /admin/config/regional/language/update.
You need 2 writable directory: temporary directory (eg. sites/default/temporary) and a translations directory.

Anybody’s picture

Funny, I just ran into the same issue in Drupal 9. For me it was a folder permission issue for the translation folder configured at /admin/config/media/file-system

The site was moved to a different server and the permissions were wrong.