In a Drupal 7 multisite I've updated l10n_update from 7.x-2.2 to 7.x-2.3 and now I get the warning in status report that translation directory is not fully protected.
Translation directory is set to sites/all/translations and .htaccess file is present and its content is correct.
Having a look at the code (l10n_update.install, line 262) the htaccess file checked is

$htaccess_file = 'translations://.htaccess';

Apparently on my system, translations:// stream is not resolved (file_stream_wrapper_get_instance_by_uri API returns false on that stream, the same is true for drupal_realpath).

As a test I've set $htaccess_file as $directory.'/.htaccess', where directory is

$directory = variable_get('l10n_update_download_store', L10N_UPDATE_DEFAULT_TRANSLATION_PATH);

and the check is passed.

Comments

gabrimonfa created an issue. See original summary.

gabrimonfa’s picture

Title: Translation directory not fully protected warning is wrong » Translation directory not fully protected warning is wrong (translations:// stream not resolved correctly)
Issue summary: View changes
sutharsan’s picture

Status: Active » Postponed (maintainer needs more info)

I can not reproduce this error. Steps to reproduce and a patch is welcome.
Postponed the issue for now.

gisle’s picture

I am also experienced this warning.

It looks as if this warning is the real cause.

Warning: file_exists(): Unable to find the wrapper "translations" - did you forget to enable it when you configured PHP? in file_create_htaccess() (line 488 of /var/www/pvn-do-e.roztr.com/html/includes/file.inc).

The warnings appeared after I've migrated the site to a new server. Disabling and uninstalling the core Locale module and then re-enabling it cured both warnings for me.