Page MenuHomePhabricator

Automatic page renaming if page name is based on template fields, which change
Open, Needs TriagePublic

Description

The Page Forms extension lets you automatically set the name of a page based on the values of one or more (actually zero or more) form fields - see here:

https://www.mediawiki.org/wiki/Extension:Page_Forms/Linking_to_forms#The_one-step_process

Unfortunately, after a page has already been created, the connection between these fields and its name can be broken. If one or more of these fields (i.e., template parameters) is changed, it may make sense for the page to be renamed as well, but right now that doesn't happen, at least not automatically.

It may be a possible to add a parser function to Page Forms that defines the page name formula for a page. If a page with such a formula is edited, the code can check whether the page's name still matches the formula - and if not, automatically rename the page accordingly.

If the parser function were called "#page_name_formula", a call to it might look like:

{{#page_name_formula:<Restaurant[Name]> in <Restaurant[City]> <unique number>}}

(This is the same syntax that Page Forms' current "page name=" value uses.)

It may make sense to have this parser function be called by the template instead - which for most cases would just mean moving the function from the <includeonly> section of the template to the <noinclude> section.

It may also potentially make sense to not have this in Page Forms - for instance, to create a new extension just for this parser function. This function doesn't actually do anything form-related. On the other hand, it would presumably almost always be used in conjunction with the "page name formula" in PF forms. So my inclination is to add it to PF.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 6 2017, 4:38 PM
Aklapper removed Yaron_Koren as the assignee of this task.Jun 19 2020, 4:14 PM

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see https://phabricator.wikimedia.org/T228575#6237124 for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptJun 19 2020, 4:14 PM