I'm getting redirect loop, when I try to pick other installation language than the default english.
PHP 7.4.8 (cli) (built: Jul 7 2020 16:20:28) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v2.9.6, Copyright (c) 2002-2020, by Derick Rethans
When I change the language to english, it redirects normally to another step as normal, however installation through the CLI, (drush, php core/scripts/drupal) works as expected.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | installation_redirect_loop-3158071-17.patch | 1.18 KB | bbu23 |
Comments
Comment #2
sargath commentedComment #3
sargath commentedComment #4
cilefen commentedThat is odd.
Comment #5
sargath commentedyup, drupal8 and symfony have been working without any issues ...
Here's my vhost.
I also tried to uncomment this in .htaccess but without success. Problem reoccur when I switch "langcode" to different value than "en"
PS:
Server didn't log any suspicious. Only group of `302` mentioned redirections
Comment #6
appleaday commentedI'm facing the same problem with version 9.0.2 and Italian language. No problem if I leave the default "English". I wonder how can I debug this further...
Comment #7
cilefen commented@AppLEaDaY
?
The next step is to get a platform config that someone else can reproduce, then use a debugger.
I cannot reproduce this (Apache and PHP from Homebrew on a Mac).
Comment #8
appleaday commented@cilefen
Yes, the Italian translation is successfully downloaded.
I have to say, for the sake of correctness, the loop in not "endless" in my case. For some reason it stops after twenty GET calls like the following.
/core/install.php?rewrite=ok&langcode=it
Response code is 302.
Not sure what you mean with "a platform config than someone else can reproduce".
As for me, I installed with composer and got a document root served by apache on an ubuntu 18.04 with php 7.4 added.
Andrea
Comment #9
cilefen commented@AppLEaDaY
The twenty times thing is probably your browser giving up.
Yes, that's a bit what I mean. Absent any logs, someone will have to reproduce it. If php.ini and the Apache Web Server configurations are changed from the defaults, we will need them too.
Comment #10
appleaday commented@cilefen
I struggled in order to reproduce the problem elsewhere, but I couldn't.
Tried both with php 7.3 and php 7.4.
I noticed, though, when everything is OK the query string does not include the
rewrite=okpair, but justlanguage=it. I see that pair is set in the .htaccess. I wonder why it disappears in case of success and instead stays there in case of failure.I examined the main apache configuration file: no relevant changes if I compare it to the file shipped with the package and anyway no effect if I replace it with an untouched version. As for the virtual host configuration, there I did nothing different from what I usually do with an ordinary drupal installation.
I also tried to figure out what the code is doing at the moment of the failure, but with no luck so far. To be honest I didn't even understand what is triggering the retry sequence that leads to The page isn’t redirecting properly.
A.
Comment #11
jura12 commentedI have this problem on ubuntu 20.04, apache, php 7.3, drupal 9.0.3, ru language. but it installs well with englisch.
I tried install in virtualbox on fresh ubuntu 20.04, apache, php 7.4, drupal 9.0.3, ru language system so no bug was detected.
Comment #12
cilefen commentedComment #13
hoemmawelt commentedI have the same problem on Ubuntu 18.04, PHP 7.4.9, Apache 2.4.46 and Drupal 9.0.5.
I use a standard vhost and setup that has always worked so far.
I can't find anything suspicious in the server logs.
Comment #14
JayBeeDutch commentedI filed a duplicate issue.
Catalina, Safari/Firefox/Google Chrome (browsers all up-to-date 2020-09-05), MariaDB 10.5.5, httpd/apache 2.4.46 and php 7.4.9, all installed with Home-brew, latest versions.
A work-around that works for me: install with default "English", activate multilingual and add desired language.
It seems not to be a Drupal thing but a (universal) browser-thing. Anyone successfully installed Drupal with a non-English language? What specs?
Edit:
tried to install on my host (WIMP: Windows, IIS, PHP, MariaDB) with non-English (Dutch in my case) and it works seamlessly.
Configuration:
PHP 7.4.8
Server Windows NT IIS-328 10.0 build 17763 (Windows Server 2016) AMD64.
MariaDB 10.4.14
Uploaded screenshot with specs JBProductions,png
Comment #15
JayBeeDutch commentedComment #16
manuvelasco commentedI have the same problem with new installation of 9.0.5 in ubuntu 18.04, nginx and Php7.3. Only I can see a 302 response of /core/install.php file.
Comment #17
bbu23I've debugged this and found out that for the download translations task, there is a redirect to the same url for reloading the page in the new language. But the problem is that this redirect would happen for future tasks also, as drupal goes through each previous task again till the active step. I removed the redirect because the steps are redirected correctly after they are finished and the language is displayed correctly, so no need for this one. Also, the installation of the new language returns NULL if the file already exists, but this value is used further in the
install_display_requirementsfunction, which will throw a warning if it's not array. For this, I added a check and if it's null, we set an empty array for the requirements variable.I tested with both EN and other language, but I am really not sure if the redirect should be removed as it's been there for a long time..
Comment #18
bbu23Comment #19
lukasss commentedI also have this problem with russian language
Comment #20
andypostIt looks like duplicate of already fixed
Most probably
.ht.router.phpis not used for build-in PHP serverUsed to install core 8.9.2 in Russian without any issue
Comment #21
andypostwe should not hide errors when some broken code using API in a wrong way
Comment #22
lukasss commented#17 working for me
Comment #23
andypostSince 8.5 core docs are https://www.drupal.org/node/2913019
Also there's
php core/scripts/drupal server --helpto use out of boxComment #24
cilefen commentedThe fifth comment included an Apache Web Server configuration and IIS has been mentioned. I don't understand how this is now
"Closed (cannot reproduce)" as if the only context is the built-in PHP webserver.
Comment #25
lukasss commentedI only get this error if I am using an alternative version of php 7.4 in my OS Mint 19.
If I am using native version 7.2 then I do not have this error
Comment #26
andypostOk, I see difference in
rewrite=okhandling and build-in server also throws fatal but recoveringSo probably needs more debug (still guess mod rewrite is a cause, or missing rewrite for IIS)
Comment #27
bbu23I could reproduce it on Ubuntu Desktop 16.04 LTS, Apache server 2.4.18, PHP 7.3.
Comment #28
hoemmawelt commentedThe problem also occurs with drupal 8.8.9.
But the error only occurs under php7.4 and php7.3. When I switch to php7.2 the installation process works like designed.
Comment #29
Zsuffa Dávid commented#17 works for me.
arch linux
Apache/2.4.46
PHP/7.4.10
Drupal 8.9.7 hungarian installation
Comment #30
tstoecklerI was able to reproduce this wlth an interactive installation where the translation directory is set to a non-standard location in settings.php, i.e.
The problem occurs when
install_download_translations()downloads a file (viainstall_check_translations()andinstall_retrieve_file(), respectively) that is then not found byinstall_find_translations()(which is called frominstall_select_language()) in the redirected request.I assume it's also possible to reproduce this without a custom translation directory due to #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave, so people should try whether setting the
pcre.jitPHP setting to0fixes the issue (for now).I came across this over in #2950407: Make translations directory configurable during install so people can also try if the merge request there solves the issue. I.e. whether adding
https://git.drupalcode.org/project/drupal/-/merge_requests/37.patchas a core patch in composer.json helps.Comment #31
thijsv commentedSetting the PHP setting pcre.jit to 0 works for me as suggested in #30.
pcre.jit=0Comment #32
boris_tim commented#31
Thanks! It works good on Ubuntu 18.04 \ Apache2 \ php7.4-fpm \ Drupal 9.0.7
Comment #33
didier misson commentedInstall new Drupal 9.1.0 on Ubuntu 20.04 with PHP 8.0 FPM ... always LOOP in French...
Ok, I can bypass : install English Drupal, and add French after...
but... it's not user friendly ;-)
Thanks
Didier
Comment #34
apolitsin commentedConfirm Loop Drupal 9.1.0, Ru lang
Ubuntu 20.04, php-fpm 7.4
* patch helps me
* drush install also helps
Comment #35
apolitsin commentedI think if users can not install Drupal - it's a critical problem
#3187634
Comment #36
cilefen commentedIs everyone on this issue in fact affected by the PCRE just-in-time compiler as in #30? If yes, this a duplicate of #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave.
Comment #37
didier misson commentedAgree with APolitsin !
If users can not install Drupal - it's a critical problem.
I can bypass because I use Drupal several years ago.
But a new "non english" user will be BLOCK...
This bug is not new...
Thanks.
Comment #38
cilefen commentedIs this a duplicate of #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave? Whether this is critical is another matter.
Comment #40
florianmuellerchI agree that this is an absolutely critical issue. And I would not consider this issue a duplicate of #3158071 just because I found this one after more than two hours struggling with my installation.
Working on Drupal for four years now this is a mindblowingly urgent issue, especially when Drupal strives to achieve a simpler and easier way for new users to install. This must be resolved very quickly otherwise we risk losing potential users!
Comment #41
cilefen commentedThe project has a policy on duplicate issues to help the community in cases like this. Duplicate issues hinder progress by attenuating efforts. The fact that this issue jumped two priority levels eleven days ago makes it crucial to acknowledge that a solution exists in another issue that has code to evaluate if, in fact, the other issue solves it.
#3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave has actual code to test. If #3181644 fixes this issue—I haven't tried #3181644, I am only triaging this critical issue from a process perspective—then this issue really must be marked a duplicate. Any community member can put a large notice in the description of this issue to go over there in that case.
That said, if #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave does not solve this, continue here.
Comment #42
cilefen commentedI just realized that this issue has code too. I missed that somehow.
@APolitsin Did #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave fix this for you? You made it (and this one) critical. But I am not sure which fixed it. Perhaps both fix it. #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave has test coverage and is closer to being merged than this issue is as of today.
Comment #43
NitinLama commented#31 thanks.
Comment #44
tstoeckler@cilefen see #30 for more information. This issue can be caused by #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave - and I assume that for many people here the fix there (or the temporary workaround) - solves the issue. It is also possible, though, to trigger this via #2950407: Make translations directory configurable during install however. There may be other cases, as well, but to my knowledge (which may very well be incomplete) this is "duplicated" by those two issues.
So I'm not really sure what that means for this issue (and its priority) myself, but maybe that can help you make an assessment.
Comment #45
alexpottLet's postpone this on #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave. Reading this issue I'm pretty sure it is a duplicate but just in case it is not.
Comment #46
cilefen commented#30 is a good comment. Thank you @tstoeckler, @alexpott. What I want to avoid of course is all the site owners that could test this being here whilst fixes are elsewhere!
Comment #47
tstoecklerNow that #2625820: install_check_translations() sometimes incorrectly returns NULL instead of array was committed to 9.1.x I assume a lot more people will be hitting this as that basically masked this in certain configurations, see also #30. It depends on a whole bunch of factors, but basically anyone with a multilingual site that is setting the translations directory to a non-standard location (for example, outside of the webroot) is at risk of hitting this.
The fix for that will come with #2950407: Make translations directory configurable during install so would be nice to get that in before the next 9.1 release.
Comment #48
cilefen commented#3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave is merged.
Comment #49
apolitsin commentedComment #50
cilefen commented@APolitsin and others:
If #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave fixes this for all cases, then this would be more properly a duplicate. Is this totally fixed?
Comment #52
stephencamilo commentedComment #53
andypostComment #56
quietone commentedThere haven't been new reports of this problem in about 2 years, which is after #3181644: PCRE library version 10.35 with pcre.jit=1 makes \Drupal\Core\StringTranslation\Translator\FileTranslation::getTranslationFilesPattern() regex misbehave was committed. It would appear that this is fixed, and is a duplicate of that issue as suggested in #45.
Therefore, I am closing this as a duplicate and moving credit over there.
If you are experience this problem and have changed the default translation directory that is being fixed in #2950407: Make translations directory configurable during install.
If you are experiencing this problem on a supported version of Drupal reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!