Page MenuHomePhabricator

Form field should override subpage in Special:PrefixIndex
Closed, ResolvedPublic

Description

Steps to reproduce:

Expected outcome: list pages that start with Bar
Actual outcome: list pages that start with Foo

Details

Related Gerrit Patches:

Event Timeline

Tgr created this task.May 5 2018, 9:46 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 5 2018, 9:46 AM

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

https://gerrit.wikimedia.org/r/431281

Jayprakash12345 added a comment.EditedMay 6 2018, 9:46 AM

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;
		}
   }
Volker_E added a comment.EditedMay 6 2018, 7:56 PM

@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.

@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.

Ok, will do

Jayprakash12345 triaged this task as Medium priority.May 7 2018, 3:30 AM
Jayprakash12345 raised the priority of this task from Medium to Needs Triage.May 8 2018, 3:13 PM
Jayprakash12345 added a project: patch-welcome.

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.

@Jayprakash12345 can I take up this issue, it will be my first contribution.

Jayprakash12345 added a comment.EditedMay 8 2018, 4:42 PM

@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 claimed this task.May 8 2018, 6:24 PM

Please guide me through to solve the issue.

matmarex removed amankh_99 as the assignee of this task.May 8 2018, 7:44 PM
matmarex added a subscriber: matmarex.

@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

https://gerrit.wikimedia.org/r/431281

Is it possible that the regression mentioned here is the cause of T194655?

Change 431281 merged by jenkins-bot:
[mediawiki/core@master] Special:PrefixIndex: Fix regression on prefix input value

https://gerrit.wikimedia.org/r/431281

matmarex closed this task as Resolved.May 16 2018, 7:59 AM
matmarex assigned this task to Volker_E.
matmarex removed a project: Patch-For-Review.
Od1n removed a subscriber: Od1n.May 17 2018, 9:56 AM
Vvjjkkii renamed this task from Form field should override subpage in Special:PrefixIndex to gkdaaaaaaa.Jul 1 2018, 1:11 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Volker_E as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from gkdaaaaaaa to Form field should override subpage in Special:PrefixIndex.Jul 2 2018, 4:26 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Volker_E.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.