Coming from T213479 it seems like [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/master/includes/specials/SpecialAllMessages.php#95 | `default` value ]] of HTMLSelectField in SpecialAllMessage is ignoredt when the submitted value (from the URL query) is not present among the options.
For the following form, visit with the ?lang=zz
Expected: the 'default' value should be selected (en), rather than the first value (aa) if overridden by the URL query value (zz).
```
$formDescriptor = [
'lang' => [
'type' => 'select',
'name' => 'lang',
'options' => [
'aa' => 'arabic',
'en' => 'English',
'fr' => 'french',
],
'label-message' => 'allmessages-language',
'default' => 'en',
],
];
$htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() );
$htmlForm
->setMethod( 'get' )
->prepareForm()
->displayForm( false );
```
Expected: English is selected
actual: aa is always selected.
= Developer notes
> I will note that this behavior is the same for OOUI and non-OOUI HTMLForm, and that is has been the same basically forever. But maybe it would make sense to change it.
> If you want to change this, I think the way to do it would be to implement an override for HTMLSelectField::loadDataFromRequest() that pretends the value was not submitted if it is not one of the available options.