Skip to content

Nice error if the nominated page is already a redirect when applying …#150

Open
Trialpearswiki wants to merge 3 commits into
wikimedia-gadgets:masterfrom
Trialpearswiki:mergers
Open

Nice error if the nominated page is already a redirect when applying …#150
Trialpearswiki wants to merge 3 commits into
wikimedia-gadgets:masterfrom
Trialpearswiki:mergers

Conversation

@Trialpearswiki

Copy link
Copy Markdown
Contributor

Not much to say. Deals with one of the boxes at #135
image

@NovemLinguae

Copy link
Copy Markdown
Member

I assume this PR is about the following. Showing it here to make this ticket easier to review. If this is the wrong bullet, please correct me.

image

Comment thread xfdcloser-src/Controllers/TaskItemController.js Outdated
Comment thread xfdcloser-src/Controllers/Tasks/AddMergeTemplates.js
@FaviFake

Copy link
Copy Markdown

Noting that I've updated the original point in #135 to add that the Talk page of the source should also be checked, along with a second diff of what happens currently. Not sure if this is already handled by this patch?

I can't think of any other page that it would make sense to check.

@Trialpearswiki

Trialpearswiki commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Talk page of the source should also be checked

This is not handled but I'm also not sure how to handle it. At RfD the user is asked if the redirect should be replaced with Old RfD (or that's the intention it's bugged and not working with a pull request waiting to fix it). At MfD it "edit[s] the redirect's target page, using the altpage parameter" (copied from code comment) and at other venues except AfD it appends the Old XfD template to the redirect. I think appending probably makes sense but warning like you suggest is also fine by me but then it would need a different warning message like "Nominated article's talk page ${makeLink(title)} is currently a redirect. Old XfD template not placed."

I can easily implement any of the above solutions I just gotta know which to use.

@FaviFake

FaviFake commented Jun 21, 2026

Copy link
Copy Markdown

@Trialpearswiki @NovemLinguae Wait, I just realised that the article can become a redirect in two cases:

  • when the page has already been merged, but also
  • when it has been moved during the discussion without being merged

So, if the article was moved and the {{Afd-merge to}} template was not placed on the article because it's a redirect, the article will not be added to the backlog. We would still have the {{Being merged from}} template on the destination article, which is tracked as well, but maybe it's worth checking if there's something we can do to add the template somewhere.

Since moving or merging an article is supposed to always leave a redirect category, what do y'all think about this flow instead?

Edit: The new flow has been moved to the main issue

@NovemLinguae

Copy link
Copy Markdown
Member

No opinion from me. I'm trying to let you do the product manager type decisions and I'll just focus on code.

@FaviFake

FaviFake commented Jun 21, 2026

Copy link
Copy Markdown

Sure! Then, if this newer proposal isn't too hard to code, I think it's a much more solid way to handle this specific edge case. Sorry for not thinking about it earlier, I hope I didn't waste too much of Trialpear's time!

@Trialpearswiki

Copy link
Copy Markdown
Contributor Author

I have to admit that's quite an elegant solution. Should be doable to implement but will take some time. (I am slow and inexperienced) Am currently focusing on getting the merge template cleanup functions done.

@FaviFake

Copy link
Copy Markdown

Yes please! Definitely focus on that task first, if you can. This is just a rare edge case, and the merge templates still have to be updated manually for every merge closure. The sooner you manage to get that one working, the better. Thanks for helping improve XFDcloser!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants