To reproduce, start a fresh Drupal 8 install and select a non-english language (eg. Deutsch)

During the installer, you receive the message:

"The translations directory does not exist.
The installer requires that you create a translations directory as part of the installation process. Create the directory sites/default/files/translations . More details about installing Drupal are available in INSTALL.txt."

So create a translations directory that is deliberately not writable...

mkdir ./sites/default/files/translations
chmod 555 ./sites/default/files/translations

Expected behaviour:

You receive the specific message "The installer requires write permissions to /sites/default/files/translations during the installation process. If you are unsure how to grant file permissions, consult the online handbook."

Actual behaviour:

The translations directory does not exist.

I've had a look at install.core.inc, and inside the install_check_translations function the flags $readable and $writable which are used to later populate the requirements messages are only properly tested if the directory has already passed as writable. If the directory isn't writable the $translations_directory_exists remains false, which isn't true in the above case.

Will submit a patch shortly...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ThomWilhelm’s picture

Title: /sites/default/files/translations directory requirements messages » /sites/default/files/translations directory requirements messages during install
ThomWilhelm’s picture

ThomWilhelm’s picture

Status: Active » Needs review
ThomWilhelm’s picture

Issue summary: View changes
keopx’s picture

Status: Needs review » Needs work

I don't replicate it. I start a fresh Drupal 8 install using spanish and I don't see it.

Probably you don't use correct permission for files directory.

Test it the next solution.

chmod -R 555 ./sites/default/files

-R recursively

keopx’s picture

Component: translation.module » install system
ThomWilhelm’s picture

Hi keopx, ok interesting, try this out:

1. Start a fresh install (ensure the translation directory does not exists already)
2. When prompted that the translations directory does not exists run these commands.

chmod -R 775 ./sites/default/files/
mkdir -p ./sites/default/files/translations/
chmod -R 555 ./sites/default/files/translations/

3. Refresh the page or click "try again"
4. You should now still receive the "The translations directory does not exist.", rather than the correct error message "The installer requires write permissions to /sites/default/files/translations during the installation process. If you are unsure how to grant file permissions, consult the online handbook."
5. Try applying my patch and you should see the specific error messages are correctly determined.

keopx’s picture

Status: Needs work » Reviewed & tested by the community

Ok :)

Works fine!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Nice find. Committed bae17d1 and pushed to 8.0.x. Thanks!

  • alexpott committed bae17d1 on
    Issue #2333293 by ThomWilhelm: Fixed /sites/default/files/translations...
ThomWilhelm’s picture

No worries thanks for commiting, glad to contribute.

Any chance I can get a credit as the commit author as per other tickets? https://www.drupal.org/node/2332059

anavarre’s picture

@ThomWilhelm contrib and core work differently. You can be credited in contrib and it's reflected on your d.o. profile, but in core, you only get the commit mention in the git repo.

If you run the below command, you'll get the list of all core contributors:

$ git log --pretty=format:'%an' | sort | uniq -c | sort -rn

Thus, only 111 core contributors from the early days to D8. When you see that D8 itself already has had more than 1000 contributors already, you get the point :-)

If you do need to see your own contributions, you can either visit http://ericduran.github.io/drupalcores/ (not always up-to-date) or run the below command from the Drupal git repo:

$ git log | grep ThomWilhelm
Issue #2333293 by ThomWilhelm: Fixed /sites/default/files/translations directory requirements messages during install.

Hope that helps, and thanks for contributing!

ThomWilhelm’s picture

@anavarre Yep that helps a lot, thanks :)

Status: Fixed » Closed (fixed)

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