Page MenuHomePhabricator

Script to track WikiProject renames and update WikiProjectCards
Closed, ResolvedPublic

Description

When a WikiProject is renamed, the WikiProjectCards (hosted in user space) are not updated. The members.py script *should* be tracking redirects, but the wikiproject parameter needs to be updated; otherwise, the "edit this profile" button does not work (points to the redirect instead of the actual page).

Event Timeline

Harej assigned this task to XZise.
Harej raised the priority of this task from to Medium.
Harej updated the task description. (Show Details)
Harej added a project: WikiProject-X.
Harej subscribed.

I'm not really sure what I can do here from the bot point's perspective. There is T113316 which talks about associating card pages which haven't been moved with the actual project name, but that won't fix the button target as you mentioned.

Now I don't know what exactly does support MediaWiki but for this to work at all, we would need to have some way to get the page title of the card itself. Now either there is a magic variable or we add another (which would need to be used in each card 😕) that contains the project the card's page is using.

Alternatively the bot could move the pages to the new name, but it would be in other user's space which is afaik discouraged.

I'm not really sure what I can do here from the bot point's perspective. There is T113316 which talks about associating card pages which haven't been moved with the actual project name, but that won't fix the button target as you mentioned.

Correct, hence the separate task to also update the template parameter.

Now I don't know what exactly does support MediaWiki but for this to work at all, we would need to have some way to get the page title of the card itself. Now either there is a magic variable or we add another (which would need to be used in each card 😕) that contains the project the card's page is using.

The standard page format is User:{0}/WikiProjectCards/{1} where {0} is the username and {1} is the WikiProject name (less namespace prefix). Bot can check {1} to see if it's a redirect, and if so, find the target and update the button accordingly.

The actual name of the page will not necessarily need to be updated if members.py knows to follow redirects.

The standard page format is User:{0}/WikiProjectCards/{1} where {0} is the username and {1} is the WikiProject name (less namespace prefix). Bot can check {1} to see if it's a redirect, and if so, find the target and update the button accordingly.

What redirect do you mean? The redirect of the members page or main page but not the card page I assume? In that case T113316 is handling that it detects that old names are recognized too.

And I don't see how the bot can update the button. The only ways are either that the card page is moved, or to add a new parameter which is passed through and it is used in the members page or that the new parameter is used in the card page and the bot updates/adds it.

So, for example, we have a page called "User:Harej/WikiProjectCards/WikiProject XX". A bot would check if "Wikipedia:WikiProject XX" is a redirect. If so, it would identify the target ("Wikipedia:WikiProject Women/Women in Red") and update the button in the template accordingly.

While T113316 is about deciding which /Members subpage to edit, this task is about updating the button on an individual page. But I gather they would probably be a part of the same change to the code. Would it make sense to combine the two tasks together?

Harej moved this task from Requests to In Progress on the Reports-bot board.
Harej removed XZise as the assignee of this task.Jun 9 2016, 8:32 PM
Harej added a subscriber: XZise.
Earwig claimed this task.
Earwig moved this task from Bugs/Improvements to Done on the Reports-bot board.
Earwig subscribed.

Implemented in 64aaa1d. Should work as expected, as long as the new project name is configured in wikiproject.json and the old one isn't (since that's how the bot determines which project names are valid).