Drupal 8 comes with the feature that a language can be selected and automatically downloaded on installation without any manual actions required.
Unfortunately this does not seem to work on simplytest.me
Following requirement error message is shown after selecting any other language than english:
The translations directory is not executable.
The installer requires execute permissions to sites/default/files/translations during the installation process. If you are unsure how to grant file permissions, consult the online handbook.The sites/default/files/translations directory exists and is and acually also executable:
$ www/sites/default/files # ls -la
total 16
drwxrwxrwx 4 user nogroup 4096 Jan 11 14:51 .
dr-xr-xr-x 3 user nogroup 4096 Jan 11 14:51 ..
drwxrwxrwx 2 user nogroup 4096 Jan 11 14:51 translations
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | drupal-executable_requirements_notice-1886164-9.patch | 1.08 KB | yesct |
| #11 | interdiff-6-9.txt | 756 bytes | yesct |
| #7 | drupal-executable_requirements_notice-1886164-6.patch | 894 bytes | yesct |
Comments
Comment #1
sutharsan commentedRunning on windows? Have a look at https://drupal.org/node/1885510.
Comment #2
patrickd commenteddefinitely NOT ;-)
(see command line output in summary)
Comment #3
yesct commentedComment #4
patrickd commentedThe server:
ubuntu 12.04
apache2 with fcgi, suExec
php5 with safe_mode=On
Configuration is a bit "exotic", but most secure for the needs of simplytest.me
Comment #5
yesct commentedthe tests for executable are done only if drupal_verify_install_file returns true.
perhaps your directory exists (and is executable) even though that did not return true?
Comment #6
patrickd commentedFile permissions are still "drwxrwxrwx"
Comment #7
yesct commentedif you want, also try the patch in #1885510-5: Can't install on some systems (like windows) due to folder permissions (executable check not needed) that removes all the executable checks.
For this more specific problem, here is a patch that gets the values for the requirements errors if the directory exists.
Also changed the order to move the TRUE it exists to the first part of the if, which makes more sense with the new if condition.
Comment #8
yesct commentedhmm. re #6
http://php.net/manual/en/function.is-executable.php
says:
Hmm. well. the check works on my 'nix (Mac) but seems will not work on all. So..
Comment #9
patrickd commentedPatch of #7 does not help.
Patch of #1885510: Can't install on some systems (like windows) due to folder permissions (executable check not needed) works.
So it must be an issue with is_executable()
Comment #10
yesct commentedTrying that.
I'm guessing this is not exclusive to simplytest.me. So moving to core.
Comment #11
yesct commentedforgot patch.
Comment #12
yesct commentedJust a note in case this helps someone, when retesting installs...
sudo rm -r sites
git checkout sites
drush -y sql-drop --db-url="mysql://root:root@localhost/d8-git"
To fake what might happen on my system having a translations file that is not executable I:
We dont want people to do this... we want them to test on their system :)
mkdir sites/default/files
mkdir sites/default/files/translations
chmod a-x sites/default/files/translations
Comment #13
yesct commentedComment #14
eigentor commentedAh! Applying this patch helped to install on Windows 7 for me. I had already made files and files/translations made world executable, so if you need a test if it works even without that, I can try again.
So great to install Drupal localized right from the start... awesomeness.
Comment #15
yesct commented@eigentor yes, please
Actually...
1) try installing again with files and translations executable, but without this patch.
then
2) try installing again with this patch, but without making files and files/translations executable.
Thanks so much!
Comment #16
sutharsan commentedI can't remember why I added the is_executable() for the directory. The code which creates/checks the settings.php file does not use it either. That is my first argument for not using. And secondly, I expect @file_exists() to return FALSE if it fails to check (as some people are experiencing now). The '@' only suppresses the error. Read more about the '@' here: http://php.net/manual/en/language.operators.errorcontrol.php
Comment #17
yesct commentedI think the @ allows us to give our own error in the requirements.
We could take out the check for the directory being executable, if that condition is super rare (to have the directory exist, be readable and not executable, and if the system never checks if files is executable, that might be a hint that someone has already been through this, and decided checking for executable does not make sense. See the second half of (second image in) #1885510-7: Can't install on some systems (like windows) due to folder permissions (executable check not needed). That issue removes all checks of executable, and the concern I had there was that the error message then just said to try another language (which would not help).
Comment #18
sutharsan commentedBut
@file_exists($translations_directory . '/.') == FALSEmeans it is not executable OR php failed to test. we need add an custom error handler to catch the error. But is it really worth it?The read bit allows the affected user to list the files within the directory, The execute bit allows the affected user to enter it and access files and directories inside (source: unix.stackexhange.com). Not all file systems support the execution permission on directories, among which a number of windows OS (source: wikipedia.org).
Comment #19
gábor hojtsySo looks like best would be to remove he executability check :) Is this a duplicate of #1885510: Can't install on some systems (like windows) due to folder permissions (executable check not needed)?
Comment #20
yesct commentedI'm ok with that. Lets decide to go with that solution since my concern about the situation where a directory actually not being executable and that causing a problem might be super rare.