Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-editprotected when XfD-ing protected pages #176

Closed
atlight opened this issue Sep 7, 2013 · 7 comments · Fixed by #1091
Closed

Auto-editprotected when XfD-ing protected pages #176

atlight opened this issue Sep 7, 2013 · 7 comments · Fixed by #1091

Comments

@atlight
Copy link
Collaborator

atlight commented Sep 7, 2013

When we use Twinkle to TfD or TfM a protected template, it would be handy if an {{Editprotected}} section could be automatically added to the template's talk page.

For examples, see Template talk:Infobox member of the Knesset#TfD and Template talk:Infobox royalty#Merge propsal. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 12:53, 13 July 2013 (UTC)

The XfD module needs some thinking - perhaps unify some of the code paths if at all possible?

@atlight
Copy link
Collaborator Author

atlight commented Sep 7, 2013

== Edit request for XX Month 0000 ==
{{editprotected}} Please place
:<code>tfd template that Twinkle tried to place goes here</code>
at the top of this template. Thanks, ~~~~

@RhinosF1
Copy link

Is this going ahead?

@Amorymeltzer
Copy link
Collaborator

@RhinosF1 Yes. I've got some work on it, but I've been focusing on some other fixes to XfD, in particular #515, #521, and #527. I think it might need some hacking to morebits which means it'll take me a bit longer, but it's on the todolist regardless.

@Amorymeltzer Amorymeltzer changed the title Auto-editprotected for TFD on protected templates Auto-editprotected when XfD-ing protected pages Mar 27, 2019
@RhinosF1
Copy link

Thanks

@siddharthvp
Copy link
Member

@Amorymeltzer what's the status on this?

I think it might need some hacking to morebits

Indeed. It will be necessary for the failure callback to know what error occurred, and take action only if it was protectedpage. This will need #679 to go ahead first, as that changes the argument passed to the failure callback from pageobj to apiobj which does have the error code.

@Amorymeltzer
Copy link
Collaborator

@siddharthvp Short answer: focused on other things. I'd blame you and all your wonderful contributions that I worked on around this time (#485 and #581 come to mind), but this summer and the months after I was unexpectedly occupied; you may have noticed that most of my recent warn-related PRs were mostly written in June, and I was barely active.

If you want to work on it, by all means go ahead! I'm away for a couple weeks ahead of the end-of-year holidays, but I want to get most of the current slate of PRs from you and me (including #679) merged and pushed in January. This is on my "next up" list after that.

@Amorymeltzer
Copy link
Collaborator

Amorymeltzer commented Feb 21, 2020

FWIW, pageobj has the status element available, which could be used to get the error text and naively intuit the error itself?

That being said, I don't think it's unreasonable for fnSaveError to attach the code to pageobj; that's what I'd thought initially to do, which would make this simple I think, promises aside.

Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this issue Aug 7, 2020
Currently written with repetitive `if (pageobj.canEdit())` loop.  That's just because everyone but AfD has a distinct function on page load, but AfD is muddled within a bunch of other checks.  Those checks are good (and should maybe be added to the others...), so we wouild have to break out the actual tagging into a separate function that doesn't need more loading to cut down on the ifs while still handling the loading for everyone else.  PITA.

Should add to utils after wikimedia-gadgets#1030.

Would close wikimedia-gadgets#176
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this issue Aug 7, 2020
Currently written with repetitive `if (pageobj.canEdit())` loop.  That's just because everyone but AfD has a distinct function on page load, but AfD is muddled within a bunch of other checks.  Those checks are good (and should maybe be added to the others...), so we wouild have to break out the actual tagging into a separate function that doesn't need more loading to cut down on the ifs while still handling the loading for everyone else.  PITA.  Truth be told, promises probably simpler...

`toTLACase` moved out of the log and into `utils` (from wikimedia-gadgets#1030).

Would close wikimedia-gadgets#176
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this issue Oct 7, 2020
Currently written with repetitive `if (pageobj.canEdit())` loop.  That's just because everyone but AfD has a distinct function on page load, but AfD is muddled within a bunch of other checks.  Those checks are good (and should maybe be added to the others...), so we wouild have to break out the actual tagging into a separate function that doesn't need more loading to cut down on the ifs while still handling the loading for everyone else.  PITA.  Truth be told, promises probably simpler...

Would close wikimedia-gadgets#176
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this issue Oct 18, 2020
Currently written with repetitive `if (pageobj.canEdit())` loop.  That's just because everyone but AfD has a distinct function on page load, but AfD is muddled within a bunch of other checks.  Those checks are good (and should maybe be added to the others...), so we would have to break out the actual tagging into a separate function that doesn't need more loading to cut down on the ifs while still handling the loading for everyone else.  PITA.

Would close wikimedia-gadgets#176
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this issue Oct 19, 2020
Currently written with repetitive `if (pageobj.canEdit())` loop.  That's just because everyone but AfD has a distinct function on page load, but AfD is muddled within a bunch of other checks.  Those checks are good (and should maybe be added to the others...), so we would have to break out the actual tagging into a separate function that doesn't need more loading to cut down on the ifs while still handling the loading for everyone else.  PITA.

Would close wikimedia-gadgets#176
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this issue Nov 1, 2020
Currently written with repetitive `if (pageobj.canEdit())` loop.  That's just because everyone but AfD has a distinct function on page load, but AfD is muddled within a bunch of other checks.  Those checks are good (and should maybe be added to the others...), so we would have to break out the actual tagging into a separate function that doesn't need more loading to cut down on the ifs while still handling the loading for everyone else.  PITA.

Would close wikimedia-gadgets#176
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants