Page MenuHomePhabricator

Flow's usage of the page name magic words is different from wikitext talk pages
Open, NormalPublic

Description

The {{welcome}} template at Commons and several other user message templates are using the magic word {{BASEPAGENAME}} to replace the username, at the end of the title. E.g. for User_talk:Foo it would show: "Welcome to Wikimedia Commons, Foo!"
But in a test at https://commons.wikimedia.org/wiki/Topic:Sn6grtdjn70cisb7 it is displaying "Welcome to Wikimedia Commons, Sn6grtdjn70cisb7!"

I think we'd just want to use the name of the primary Flow board, that the topic is attached to, instead.
Are there any examples that would contraindicate this solution, and is it technically feasible?


This also affects GENDER (when posting on a user talk page in some languages, it's important to know the user's gender, which you can get from the username/page title).

Possible solutions (see comments):

  • Change certain derivative magic words (those that refer to another page, not the current one), e.g. BASEPAGENAME.
  • Add an {{OWNERPAGENAME}} magic word.

Event Timeline

Quiddity created this task.Aug 17 2015, 9:26 PM
Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a subscriber: Quiddity.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptAug 17 2015, 9:26 PM
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript

I think we decided to use the topic name here for consistency (see T75409: Flow: magic words for page name in a post render as Topic:UUID but preview as Flow_board_name, including https://gerrit.wikimedia.org/r/#/c/188253/2 .

When we do T75409: Flow: magic words for page name in a post render as Topic:UUID but preview as Flow_board_name, this will be a friendly page name.

However, we would still need to figure out a different way to get the user name. A user script could do it easily. Not sure if most welcomers use scripts. I know Twinkle has welcome support.

Afaik, most welcomers paste a template, or use a script to paste a template. The templates almost all (?) use BASEPAGENAME.
I checked ~15 interwikis linked at https://en.wikipedia.org/wiki/Template:Welcome and variants linked at https://en.wikipedia.org/wiki/Wikipedia:Welcoming_committee/Welcome_templates
and all used BASEPAGENAME or PAGENAME.

Some, also use it in slightly different ways, in addition to just getting the pagename, E.g. Itwp uses Benvenut{{safesubst:GENDER:{{safesubst:PAGENAME}}|o|a|o/a}}

El_Grafo updated the task description. (Show Details)Aug 18 2015, 7:42 AM
El_Grafo set Security to None.
El_Grafo added a subscriber: El_Grafo.EditedAug 18 2015, 7:56 AM

Hi, this is not restricted to "Welcome" templates. There are several other user message templates that adress the user by his/her name. Some random examples from Commons (I'm sure there'l be similar ones on other projects):

Most of these templates are placed manually by users (usually subst:ed), so while scripts may help for automated welcomers I don't think they would work as a general solution. Looks like we may need a new magic word like FLOWBOARDNAME?

Most of these templates are placed manually by users (usually subst:ed), so while scripts may help for automated welcomers I don't think they would work as a general solution. Looks like we may need a new magic word like FLOWBOARDNAME?

Yeah, it's worth discussing. Or, to make it more general so it worked on wikitext, OWNERPAGENAME or something. We could also discuss changing the BASEPAGENAME behavior, but there are related things that have to be taken into account.

Catrope triaged this task as Normal priority.Aug 19 2015, 11:29 PM
Catrope added a subscriber: Catrope.
Tgr added a comment.Apr 14 2016, 7:23 PM

A new magic word makes life complicated for cross-wiki messaging, unless the magic word has a sane default in MediaWiki core, since Flow is not enabled on all wikis. Also, you would probably need several magic words, e.g. to address the page that hosts the flow board, the subject-space page belonging to it, the root pagename (for e.g. usernames)...

IMO changing the behavior of BASEPAGENAME &co. makes more sense as there isn't really any use case to use them for topic/summary pages which do not come in talk/subject pairs and have no subpages.

Mattflaschen-WMF renamed this task from Flow's usage of the magic word {{BASEPAGENAME}} to Flow's usage of the page name magic words.Apr 25 2016, 4:26 AM
Mattflaschen-WMF renamed this task from Flow's usage of the page name magic words to Flow's usage of the page name magic words is different from wikitext.
Mattflaschen-WMF renamed this task from Flow's usage of the page name magic words is different from wikitext to Flow's usage of the page name magic words is different from wikitext talk pages.

I think also that {{ARTICLEPAGENAME}} should return user's page name, and not just a topic name, as now. Meaning, call this function not for the topic, but for the talk page it belongs to.

New report of that problem, on zh.wp.

El_Grafo removed a subscriber: El_Grafo.Apr 7 2017, 2:24 PM