During deployment of T287215, we noticed that search results were not taking the user to Special:MediaSearch and were instead taking the user to Special:Search.
It does this by adding a hidden field <input type="hidden" name="title" value="Special:MediaSearch"> via this hook:
https://gerrit.wikimedia.org/g/mediawiki/extensions/MediaSearch/+/939b5861410f3528501604064ab536eed33d5c0e/src/MediaSearchHooks.php#51
The code in Vector doesn't seem to be passing this page title to the WVUI widget.
Developer notes
Use the urlGenerator property in https://doc.wikimedia.org/wvui/master/ui/?path=/story/components-typeaheadsearch--configurable to pass the title to the WVUI widget.
For testing purposes use the following hook:
$wgHooks['BeforePageDisplay'][] = function ( $out, $skin ) { $skin->setSearchPageTitle( Title::newFromText('Special:MediaSearch') ); };
- To fix this WVUI will need to accept a searchPageTitle parameter to allow us to customize Special:Search with Special:MediaSearch
- A patch in Vector will make use of it (which will be blocked on a release)
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T287540#7332720 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T287540#7332739 |