Drupal 7 and earlier used GET locale to specify the language code for the installer. Drupal 8 is changing to use GET langcode instead. We have a little compatibility layer in the patch, but would want to remove it before release. Please fix the testing system to pass on GET langcode instead of GET locale in the installer for Drupal 8, or if you want to make the system Drupal version independent, make it pass both langcode and locale. The installer can deal with extra unneeded arguments.

Not sure where to make the change, looking for help.

Comments

gábor hojtsy’s picture

The change is going to land in #1260716: Improve language onboarding user experience hopefully soon.

rfay’s picture

I see it just landed.

Hmm. I guess I have a couple of questions:
* Isn't it a simpletest change we're talking about?
* Why aren't there tests for this added with the patch?
* How does the patch pass testbot testing right now?
* How did it get committed without this being solved first?

gábor hojtsy’s picture

Damien Tournoud and @webchick suggested we put in a little 3-line compatibility layer in the patch to keep it work with the locale argument until we fix the testing system and the testbot rollouts of it. They suggested we get the patch land like this and make the testbots align later. This is documented on the original issue via an IRC log.

I'm not intricately familiar with the testing system, so I don't know if the installation of the system is entirely in the realm of simpletest, in which case, we could have fixed it in the same commit I guess, or if it is a d.o issue. Damien and Angie seemed to believe d.o changes are required.

I think the only remaining question is why we have no new tests with the patch, one you also asked on the issue and I've replied there. So where should we move this issue?

rfay’s picture

Project: Drupal.org Testbots » Project Issue File Review
Version: » 6.x-1.x-dev
Category: bug » feature

OK, I think I have it now.

The issue is that is an install-time issue. Simpletest is *not* used for the install, it's used for the test. A bit of a copy of simpletest is used for the install, if I remember right.

I am still confused about how this would be controlled. We don't currently have the capability to install in other languages, I don't think.

And there are a bazillion tests that probably won't work if a system is installed in another language, due to the silly use of t() in comparisons.

The change will be required in PIFR, so moving it there. Maybe @boombatower or @jthorson will do better at understanding this.

gábor hojtsy’s picture

No, all is changed in D8 is that the language is taken from 'langcode' in GET not 'locale'. The committed patch has these 5 lines so it still passes tests:

+  // @todo: remove this testbot compatibility layer once the testbot is fixed.
+  if (isset($_GET['locale'])) {
+    $install_state['parameters']['langcode'] = $_GET['locale'];
+  }
+

Until we fix the testing system on d.o, Drupal 8 needs to carry these five lines. Obviously we don't want Drupal 8 to be released with these 5 lines. The discussion of this 5 line compatibility layer is in the IRC thread pasted at http://drupal.org/node/1260716#comment-5226480.

If we just remove the compatibility layer, PIFT respondes with this: http://qa.drupal.org/pifr/test/191604 Quoting:

Installing: failed to arrive at database configuration page using install path http://drupaltestbot664-mysql/checkout/install.php?profile=standard&locale=en

Obviously the test system wants to avoid looking at the profile selector or language selector form. Since the GET argument name changed in D8, we need to change the testing system to pass langcode=en instead of locale=en, that is it. Depending on how you handle compatibility with testing for D6, D7 and D8, you might want to do 'locale=en&langcode=en' instead, the extra langcode should not bother D6/D7, the extra locale should not bother D8.

I hope this helps clean it up :)

gábor hojtsy’s picture

How can I help move this forward?

jthorson’s picture

Status: Active » Needs review
StatusFileSize
new984 bytes

Gabor,

If I am understanding your explanation, the only change from D7 to D8 is that the install path argument changes:

From: /install.php?profile=standard&locale=en
To: /install.php?profile=standard&langcode=en

Have I got this correct?

If so, the attached patch should do the trick.

jthorson’s picture

StatusFileSize
new805 bytes

And if I'm correct, this should be the core patch needed to test it.

jthorson’s picture

StatusFileSize
new805 bytes

Patch in #7 missed a 'locale' reference.

jthorson’s picture

Duh. Wrong patch.

jthorson’s picture

Ran a test with the above patches (pifr patch and remove compatibility patch) which resulted in two failures: BareUpgradePathTestCase and FilledUpgradePathTestCase.

Any chance that these test cases are still using locale?

Otherwise, the above looks good.

gábor hojtsy’s picture

The upgrade tests run with an imported DB copy, so no, they do not run install.php. I've checked quickly and could not find a reference to locale in those tests.

jthorson’s picture

Okay ... this ran clean on scratchtestbot ... not sure what's wrong with my local environment, but since there's no obvious tie between the failed tests and the patch, and it works on our qa environment, I'll commit this and re-confirm it's all working before rolling our 6.x-2.8 release.

jthorson’s picture

Status: Needs review » Fixed

Committed to 6.x-2.x (f3a0e6c).

Will be deployed when we roll a PIFR 6.x-2.8 release.

jthorson’s picture

PIFR 6.x-2.8-rc1 deployed to testbots ... we can test removal of the compatibility layer now.

gábor hojtsy’s picture

All right #1426954: Remove locale backward compatibility layer in installer submitted for the testbot! Thanks for rolling this out!

Status: Fixed » Closed (fixed)

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