Steps to reproduce:
- visit https://en.wikipedia.org/wiki/Special:PrefixIndex/Foo
- type Bar into the form field and submit
Expected outcome: list pages that start with Bar
Actual outcome: list pages that start with Foo
Steps to reproduce:
Expected outcome: list pages that start with Bar
Actual outcome: list pages that start with Foo
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Special:PrefixIndex: Fix regression on prefix input value | mediawiki/core | master | +6 -2 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T193966 Form field should override subpage | |||
Resolved | Volker_E | T193927 Form field should override subpage in Special:PrefixIndex |
This is happening from https://gerrit.wikimedia.org/r/#/c/426842/. One minor thing that I noticed, The value of text field is missing where Original one has. There is need to add 'default' => str_replace( '_', ' ', $from ), in prefix array.
Change 431281 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/core@master] [WIP] Special:PrefixIndex: Override subpage in form field
Quick Hack, this originally comes from https://gerrit.wikimedia.org/r/#/c/305315/, I have tested it. It works for me as expected. This needs some minor improvements :)
function execute( $par ) { // Fetch the prefix term $prefix = str_replace( "\n", " ", $request->getText( 'prefix' ) ); if ( strlen( $par ) && !strlen( $prefix ) ) { $query = $request->getValues(); unset( $query['title'] ); // Strip underscores from title parameter; most of the time we'll want // text form here. But don't strip underscores from actual text params! $query['prefix'] = str_replace( '_', ' ', $par ); $this->getOutput()->redirect( $this->getPageTitle()->getFullURL( $query ), 301 ); return; } }
@Jayprakash12345 Would you amend my patch with your proposed solution or add a new patch? I'd remove the task reference in the regression patch.
Quick Hack, this originally comes from https://gerrit.wikimedia.org/r/#/c/305315/, I have tested it. It works for me as expected. This needs some minor improvements :)
This works, But it also breaks transclusion ( {{Special:Prefixindex/Xyzzyx}} ). So Someone need to workout.
@amankh_99 You're welcome. Just Claim the task by Add Action... → Assign / Claim and then Submit.
Also, See https://www.mediawiki.org/wiki/Category:New_contributors.
@amankh_99 Sorry, it seems someone is already working on this (https://gerrit.wikimedia.org/r/#/c/431281/). You could work on a similar issue with another special page, though: T193965: Form field should override subpage in Special:AllPages.
Change 431281 had a related patch set uploaded (by Bartosz Dziewoński; owner: VolkerE):
[mediawiki/core@master] Special:PrefixIndex: Fix regression on prefix input value
Change 431281 merged by jenkins-bot:
[mediawiki/core@master] Special:PrefixIndex: Fix regression on prefix input value