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...
Comment | File | Size | Author |
---|---|---|---|
#2 | Drupal-translation_directory_permissions-2333293-2.patch | 751 bytes | ThomWilhelm |
Comments
Comment #1
ThomWilhelm CreditAttribution: ThomWilhelm commentedComment #2
ThomWilhelm CreditAttribution: ThomWilhelm commentedSuggested fix
Comment #3
ThomWilhelm CreditAttribution: ThomWilhelm commentedComment #4
ThomWilhelm CreditAttribution: ThomWilhelm commentedComment #5
keopxI 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
Comment #6
keopxComment #7
ThomWilhelm CreditAttribution: ThomWilhelm commentedHi 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.
Comment #8
keopxOk :)
Works fine!
Comment #9
alexpottNice find. Committed bae17d1 and pushed to 8.0.x. Thanks!
Comment #11
ThomWilhelm CreditAttribution: ThomWilhelm commentedNo 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
Comment #12
anavarre@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:
Hope that helps, and thanks for contributing!
Comment #13
ThomWilhelm CreditAttribution: ThomWilhelm commented@anavarre Yep that helps a lot, thanks :)