There is a test trying to set locale to test a query here: https://qa.drupal.org/pifr/test/635308

It looks like setting the locale is not successful in the test, so I'm thinking that French is not installed on the test servers.

Is it possible to have one or two locales installed on the servers so they can be used from tests? I doesn't really matter much what they are, but at least one that uses the comma as a decimal separator:
http://en.wikipedia.org/wiki/Decimal_mark#Countries_using_Arabic_numeral...

Comments

jhodgdon’s picture

The issue came up because there is a Drupal Core search bug where people from certain locales were getting MySQL errors when doing searches:
#2016497: Search query extender should not use floats directly

At the moment, we're unable to test this automatically on the test bots (the only way to get the tests to fail is for people with these locales to run tests manually on their own servers). So... please? :)

rfay’s picture

I assume we're talking about Linux locales and not something else.

Please specify the exact locales you'd like to have.

jhodgdon’s picture

French would be a good choice. Specifically, 'fr_FR'.

And yes, it's Linux locales. See
http://php.net/manual/en/function.setlocale.php

This comment explains how someone got Finnish locales installed:
http://www.php.net/manual/en/function.setlocale.php#90919
And this other comment has another idea:
http://www.php.net/manual/en/function.setlocale.php#103627

So we probably either need to do something like

apt-get install language-pack-fr-base

or

locale-gen fr_FR

or possibly both.

After the correct operation this command

locale -a

at the Linux command line should show fr_FR in the list.

If this is done, we should be able to re-run the test for the patch on this comment:
#2016497-12: Search query extender should not use floats directly
and the test should pass on the line that says "Failed to set locale." (which is currently failing), and then fail on the line that says "No score calculated for search result", presumably with a MySQL exception being thrown.

Thanks!

rfay’s picture

Project: Drupal.org Testbots » drupaltestbot-puppet

Moving to drupaltestbot-puppet

rfay’s picture

Status: Active » Fixed

Just pushed http://drupalcode.org/project/drupaltestbot-puppet/commitdiff/6c6211e, which adds a couple of en_US and fr_FR locales. This will be deployed to all (72?) testbots within the next 30 minutes or so.

cat locale.gen
# This file lists locales that you wish to have built.

en_US.UTF-8 UTF-8
en_US ISO-8859-1
en_US.ISO-8859-15 ISO-8859-15
fr_FR.UTF-8 UTF-8
fr_FR ISO-8859-1
fr_FR@euro ISO-8859-15
jhodgdon’s picture

Thank you for the quick action! I'll hit retest on that patch in an hour or so and we can see if it worked out.

rfay’s picture

Looks to me like the problem over there in https://qa.drupal.org/pifr/test/635308 does not have to do with the testbot any more?

jhodgdon’s picture

Correct! That patch was attempting to test a bug that French and other users had seen. It is now successfully able to generate the exception that these users saw. Thanks rfay -- all is working as we hoped.

Status: Fixed » Closed (fixed)

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