Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
jhodgdonThe 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? :)
Comment #2
rfayI assume we're talking about Linux locales and not something else.
Please specify the exact locales you'd like to have.
Comment #3
jhodgdonFrench 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
or
or possibly both.
After the correct operation this command
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!
Comment #4
rfayMoving to drupaltestbot-puppet
Comment #5
rfayJust 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.
Comment #6
jhodgdonThank 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.
Comment #7
rfayLooks 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?
Comment #8
jhodgdonCorrect! 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.