Page MenuHomePhabricator

Making destination URL of a page save action configurable
Closed, ResolvedPublic

Description

For the development of an essential and popular tool on Persian Wikipedia, we need a capability to be able to control the address would be brought by browser after the save of a page so we can hook extra needed thing which are only possible after the save of a page, like adding language link of the page to the correspond Wikidata item which is impossible before save of a page.

So I propuse addition of a new hidden input, named "extraQueryRedirect" which its values would be considered for the save of pages and the page user would be redirected to. For example if a user script adds <input type="hidden" name="extraQueryRedirect" value="withJS=MediaWiki:AddToWikidata.js"> to the main form an edit page, the value of this hidden input wouldn't be vanished after the save of the page and the redirect happens. I also have written a patch for this that I hope with some help it goes to be OK to be merged.

Event Timeline

Ebrahim claimed this task.
Ebrahim raised the priority of this task from to Needs Triage.
Ebrahim updated the task description. (Show Details)
Ebrahim added subscribers: Ebrahim, Ladsgroup, matmarex.
This comment was removed by Ebrahim.
Ebrahim renamed this task from Add support for a configurable extra query to Add support for a configurable redirect destination address after save of a page.Jan 27 2016, 10:44 PM
Ebrahim updated the task description. (Show Details)
Ebrahim set Security to None.
Ebrahim renamed this task from Add support for a configurable redirect destination address after save of a page to Making destination URL of a page save action configurable.Jan 27 2016, 10:48 PM
Ebrahim updated the task description. (Show Details)

Hi @Ebraminio. Please associate at least one project with this task, otherwise nobody can find this task when searching in the corresponding project(s). Thanks.

Change 266943 had a related patch set uploaded (by Ebrahim):
Make destination URL of a page save configurable

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

BTW we can discuss about the title of proposed parameter, "extraQueryRedirect", as we didn't use it now but going to after the merge.

As for the name, looking at some of the existing ones at https://www.mediawiki.org/wiki/Manual:Parameters_to_index.php – it looks like the convention is 'wpFooBar' (leading 'wp' and CamelCase) for POST parameters, and 'foobar' (all lowercase) for GET parameters. So I guess that makes it 'wpExtraQueryRedirect'?

Various special pages accept 'returnto' and 'returntoquery' parameters (most prominent is probably Special:UserLogin), but this looks sufficiently different to use a different tag name.

I just changed it to "wpExtraQueryRedirect" and am open to change to anything you wish.

Change 266943 merged by jenkins-bot:
Make destination URL of a page save configurable

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