Jump to content

Wikipedia:WikiProject Articles for creation/Helper script/Development page

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nathan2055 (talk | contribs) at 19:39, 21 June 2013 (!earwigbot Everything goes to GitHub.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Main pageTalk pageSubmissions
Category, Sorting, Feed
ShowcaseParticipants
Apply, By subject
Reviewing instructions
Help deskBacklog
drives

June 2025

WARNING: DO NOT PLACE NEW REPORTS ON THIS PAGE! ALL REPORTS AND FEATURE REQUESTS GO ON GITHUB. IF YOU DO NOT HAVE GITHUB ACCESS, MAKE A REQUEST ON WT:AFC.

Welcome to the development page for the AfC helper script.

Bug and feature list

Recently moved to stable

This discussion has been closed. Please do not modify it.
The following discussion has been closed. Please do not modify it.

1.18

Pending update

User:Nathan2055/afc.js (v4.1.18i1)
Implementation of measures proposed on talk page while v4.1.19 is frozen
  • Readded custom decline reason
  • Modified BLP decline reason to no longer speedy automatically
  • Minor interface changes
  • Bug fixes
User:Mabdul/afc beta.js (v4.1.19)
Will be published on July 1st, is frozen (only critical bug fixes allowed to go into this one)
  • Integration of WP:AutoEd
  • Cleanup removes more HTML comments
  • Fix three bugs in the reflist check (thanks to Anne Delong (talk · contribs), Nathan2055 (talk · contribs), and FoCuSandLeArN (talk · contribs))
  • Requesting a token before every page edit as a test: this may fix the "stuck in editing" bug. Feedback is welcomed.
  • Checking if a stub tag is already placed on the page, see diff (thanks to Deadbeef (talk · contribs))
  • Improve disambiguation template check, see diff
  • Ref tag correction part #2 introduced: move :;.,!? before ref tags
  • Fixed a Regex for the ref cleanup
  • Rolledback to Tim's AfC/R stuff, something completely borked it and I have no idea what
User:Mabdul/afc alpha.js (v4.1.20)
Early stage alpha build, all new code that doesn't fix critical bugs should go here
Upcoming features
Features that are either prepared to be written or are in progress of being written go here
  • Redirect checker for renamed users (e.g. if user Foo was renamed to user Bar, the messages would be left on Bar's talk page)(commented out until I find a solution on the JQuery problem I have)
  • "Exporting" AfC/R and AfC stuff into two functions on other pages
  • Categories for decline reasons (consensus at WT:AFC)

To be coded

High priority
  • AFC/R stuff; needs a simple restart of developing. (@Nathan2055 would you overtake the part of merging back the reasons?)
Normal priority
Low priority

Feedback

Please feel free to comment and add your ideas and improvements requests here.

Feedback and observations related to following parts are highly needed as they are mostly not reproducible. Error logs, JavaScript developer console outputs, etc. are mostly helpful.

  • "stuck in editing" bug: Requesting a token before every page edit as a test.
  • Potential crashes and freezing when using IE10(maybe this is a Win8 problem) and (Mobile) Chrome (see WT:AFC and this thread)

multiple declination articles

Editable DEFAULTSORT, etc.

  • Make the DEFAULTSORT, PERSONDATA, and LISTAS name be reviewer-editable during submission, and provide a link to Wikipedia:NAMESORT to cut down on mistakes. davidwr/(talk)/(contribs)/(e-mail) 18:10, 13 April 2013 (UTC)[reply]
    • Can you explain that more? I don't understand... if you hit accept, you simply need to edit two pages... mabdul 18:18, 13 April 2013 (UTC)[reply]
      • In the same way that you allow us to add text that goes before and after the page and to the top of the talk page, provide a fill-in field on biography pages called "Sort this page as" or some such, and pre-fill it with Lastname, Firstname. When I click accept, put this in the defaultsort, persondata, and listas information instead of just pulling the information from the page name as you do now. Yes, I know I can do it manually, but by having it be part of the script it makes it a lot less likely to be overlooked. If you provide a link to WP:NAMESORT then it makes it less likely that I'll blindly accept the default of Lastname, Firstname if I'm working with someone from another country or a page that is a stage name (in which case I will have to edit the persondata manually to add the alternative names). davidwr/(talk)/(contribs)/(e-mail) 18:31, 13 April 2013 (UTC)[reply]

order of templates

Beta can't decline certain articles

When I try to use the beta to decline Wikipedia talk:Articles for creation/Worldventures I get

  • Got token
  • Getting User_talk:Uberlibrarian

then it stalls. I have "notify author" checked but not "send a teahouse invitation." There is already a teahouse invite on the page, supplied by a bot.

I just re-did it with the "teahouse invite" checked, it stalled in the same place.

davidwr/(talk)/(contribs)/(e-mail) 01:34, 9 May 2013 (UTC)[reply]

  • Yet the article seems to have declined properly. There is a notification on the creators talk page... Did you do it all manually, or did the script do it and just not tell you it did it all? Technical 13 (talk) 11:50, 9 May 2013 (UTC)[reply]

Beta auto ed

The new "auto ed" feature in the beta is a bit annoying - it doesn't show up until you click on one of the existing 3 items, then it ignores the click you just did. You wind up having to make 2 clicks in the drop-down menu to get anything done. davidwr/(talk)/(contribs)/(e-mail) 01:34, 9 May 2013 (UTC)[reply]

AutoEd is run automatically while cleaning up the page. No need for extra /manual run. mabdul 17:34, 9 May 2013 (UTC)[reply]
I don't understand. What is Auto Ed anyways? In any case, clicking on the pull down menu, seeing the usual 3 items, clicking on one of the 3 and nothing appearing to happen except AutoEd suddenly appearing at the top of the menu, and having to click "review" is annoying. This is from memory, as I uninstalled the beta yesterday. davidwr/(talk)/(contribs)/(e-mail) 04:16, 10 May 2013 (UTC)[reply]
AutoEd is an user script that does many cleanup tasks automatically. mabdul 16:06, 24 May 2013 (UTC)[reply]

Do we want to go a step further as WP:AWB does and replace [[Example|Examplefoo]] with [[Example]]foo ( ExamplefooExamplefoo )?

Comment added by Technical 13 (talk · contribs)

We actually do now in the beta test (not really tested by me) as this is done by AutoEd. mabdul 14:46, 21 May 2013 (UTC)[reply]
Feel free to point me to more corrections as these could be integrated into AutoEd. mabdul 16:06, 24 May 2013 (UTC)[reply]
@Technical 13 doe you have a list of rules which is supported by MediaWiki? I would check (and add) the missing stuff to AutoEd. mabdul 21:57, 25 May 2013 (UTC)[reply]
@Mabdul: I use the rules listed at Wikipedia:Piped link && Help:Pipe trick. Technical 13 (talk) 22:18, 25 May 2013 (UTC)[reply]

Single stub append

Resolved

Hi. When you accept a page for creation, it asks for an article classification. If you choose "stub" it appends a generic "stub" tag at the bottom of the article. However, sometimes I ask the program to append a specific stub tag. When I do this, it appends both, which, as was politely pointed out to me on my talk page, wastes serious editors' serious time, apparently. Really, it is a bit more of a nuance, as I can accept the article and then just replace the generic tag with the more specific one; however, it would be nice if the program parsed the "append" section for stub tags before automatically applying the generic one. Thanks, Deadbeef 02:27, 22 May 2013 (UTC)[reply]

I've had the same issue with talk pages. Before I realized {{talkpageheader}} was being added, I would put that in, resulting in two-two-two talkpageheaders in one talk page. davidwr/(talk)/(contribs)/(e-mail) 02:56, 22 May 2013 (UTC)[reply]
Generally most user miss to add any tags and thus if the page was assessed as 'stub' the script either ad {{stub}} or {{bio-stub}}. I should add another check for other stub tags in the page content / "append to the article text" box.
The talkpageheader is always added. Although I do think that this is mostly not necessary. That was added a long time ago by the original author of the script.
mabdul 05:08, 22 May 2013 (UTC)[reply]
Simple fix, just have it search for "stub" in the append box and suppress the auto-stub if there is. --Nathan2055talk - contribs 17:45, 22 May 2013 (UTC)[reply]
Feel free to do it... mabdul 20:21, 23 May 2013 (UTC)[reply]
Check added and tested at test.wikipedia. mabdul 19:25, 24 May 2013 (UTC)[reply]

Creating over a redirect

Another problem I've had. When I try to approve a submission that currently exists as a redirect, it gives me an error message of creating a page that exists as a redirect that doesn't redirect to the source article. I took that to mean "redirect to the AfC being approved" so I retarget the redirect page, but that doesn't work. How can you make it so that it approves the article and overwrites the redirect? Thanks again, Deadbeef 05:16, 22 May 2013 (UTC)[reply]

Go to WP:RFA and get the admin bit. I should improve the wording, but at the moment I can't do anything as "normal users" don't have the ability to overwrite the history of any redirect by a page move. mabdul 05:23, 22 May 2013 (UTC)[reply]
This was always annoying to me, I suppose if the page doesn't exist we could have it overwrite with the contents of the sub and run cleanup, but that has abuse potential. My method is to CSD the redirect for housekeeping and mark the sub as under review. --Nathan2055talk - contribs 17:44, 22 May 2013 (UTC)[reply]
Can't the script replicate a WP:MOR that should allow any editor to approve the article and move the existing article to someplace simple like "article name/replacedByAFC" and tag it as housekeeping? Technical 13 (talk) 18:29, 22 May 2013 (UTC)[reply]
Nearly Everything is possible. I will invite the RM folks to comment here. mabdul 21:50, 22 May 2013 (UTC)[reply]
Can't we have it regex for redirect code in the existing article, and if so explain to the reviewer what's going on and make the required edits? --Nathan2055talk - contribs 01:36, 23 May 2013 (UTC)[reply]
Yes, I can! Maybe this weekend. mabdul 19:56, 23 May 2013 (UTC)[reply]

Bot workable

@Nathan: would you explain that? Actually you can access every stuff as it is javascript! mabdul 21:50, 22 May 2013 (UTC)[reply]

Ideally, NathanBot would run a slightly modified version of the AFCH cleanup script that would automate the cleanup process on each and every article, obsoleting AFC bot. I have no idea how to make the bot be able to access the cleanup functions of AFCH at this point. --Nathan2055talk - contribs 01:36, 23 May 2013 (UTC)[reply]
It always depends on how you program and/or in which language. Simply open afcHelper_blanking() and then afcHelper_cleanup(); Of course it is not that easy as it sounds (except creating a bot based on JavaScript) mabdul 05:16, 23 May 2013 (UTC)[reply]

Cat and redirect fixes

@mabdul: You didn't see it up there, so I'll repost. --Nathan2055talk - contribs 01:36, 23 May 2013 (UTC)[reply]

I saw it. I didn't worked on it, somehow AFC/R is working fine (in sense of backlog) in contrast to the article submissions. My priority is on the AFC stuff. Feel free to overtake any part. ;-) mabdul 05:16, 23 May 2013 (UTC)[reply]
Well, this might change your mind. --Nathan2055talk - contribs 17:14, 23 May 2013 (UTC)[reply]
Meh, ok in the next few weeks no new features, only bug fixing... mabdul 19:52, 23 May 2013 (UTC)[reply]
Is the code for this still in beta though? Another question: could you push my updated decline interface to beta (the trout one)? --Nathan2055talk - contribs 20:11, 23 May 2013 (UTC)[reply]
I doubt it, but simply check it on your own. mabdul 21:05, 23 May 2013 (UTC)[reply]

I don't even remember what I changed... Anyway, I need the review tab to show up on userspace pages since we have had about 200 sandbox submissions show up due to Technical 13 lagging out the servers and causing them to vanish. --Nathan2055talk - contribs 15:49, 24 May 2013 (UTC)[reply]

Better move the submissions (more or less automatically) to WT:AFC space for getting unsuccessful submissions deleted after a year of inactivity (see recent WT:CSD archives). mabdul 15:57, 24 May 2013 (UTC)[reply]
Wait, what did I do? Do you mean Joe's Null Bot? Technical 13 (talk) 19:53, 24 May 2013 (UTC)[reply]
This edit, which broke the category and was reverted, ended up hiding almost 200 userspace submissions for a few days. --Nathan2055talk - contribs 22:27, 24 May 2013 (UTC)[reply]
Oh... That had nothing to do with lagging out the servers though... Anyways, from what I have read above, there wasn't a single one that was finished that could be approved and they were all patent nonsense. Perhaps there is something to be learned there? Technical 13 (talk) 22:39, 24 May 2013 (UTC)[reply]

Notifications to new editors

It may be worthwhile treating new users of the AFCH script differently. For new users, turn off the "accept" and "decline" links and present a link to the various Wikipedia content policies and guidelines and to the AFC Reviewer page. Have a button that says "By clicking this button I agree that I am familiar with Wikipedia content policies and guidelines and have read the AFC reviewing instruction page, and I will not accept or decline articles outside of these policies and guidelines without discussing it with another reviewer first." Only after he clicks on the button will the "accept" and "decline" buttons work.

Keep a log of who has "signed off" on this and make this log available to administrators in the event the user demonstrates that he isn't abiding by these conventions. davidwr/(talk)/(contribs)/(e-mail) 18:43, 25 May 2013 (UTC)[reply]

Although I'm not a "fan" of this kind of request, I would like to see a broader consensus (at best at any VP or/and at WT:AFC), I would implement it if there is a strong consensus.
What I have to ask: what defines a "new user"?
Did you ever see that such kind of messages hold people off doing something stupid? Think of the great optional toolbars in install packages of any (free) program.
Did you ever see such a person reading all the disclaimers presented in the beginning of such install programs? Or while buying any stuff at amazon webshop?
I don't the part of the log! If somebody doesn't agree, then he wouldn't be able to use the script (as described in your request). Even if he does agree, on the long term editors will be discussed at ANI or immediately block if they are violating the rules. How does such a log help the adminitrators (or other editors)?
mabdul 21:46, 25 May 2013 (UTC)[reply]

I would like to see a new feature that would work like an AFC comment that would mark an article as "ready to be accepted" or "ready to be declined" and disable accept decline unless the article had already been pre-accepted or pre-declined by a different editor. The pre-decline would have the option of blanking and CSD-tagging, which could be un-done by a subsequent reviewer. A pre-decline with a CSD would never need to be seconded unless the administrator refused to delete the page.

The only downside to this would be 1) more complex code, 2) slightly more complex reviewing process, and 3) during times of backlogged (like now) it would need to be turned off or routinely over-ridden or we would choke on the submissions. But during times of low backlog it would increase the quality of accepts and declines.

Of course this wouldn't stop a manual move, but it would encourage people to have a "2-person sign-off" and it would put submitters on notice that they wouldn't be accepted or, in most cases, rejected on one person's say-so. davidwr/(talk)/(contribs)/(e-mail) 18:51, 25 May 2013 (UTC)[reply]

From my experience in the last few months last 1.5 years the backlog is only down under 100 for a day. And I don't see any reason why this should change in the future...
mabdul 21:52, 25 May 2013 (UTC)[reply]

Spacing

Moved from WT:AFC. --Nathan2055talk - contribs 16:27, 29 May 2013 (UTC)[reply]

Just a heads-up that the script is creating (as far as I've seen) an extra space between every heading and the start of its corresponding paragraph. Not too important, but it's quite curious. I also noticed this site is copying some submissions. FoCuSandLeArN (talk) 02:29, 28 May 2013 (UTC)[reply]

O is null again

Just started coding with alpha and the JS console started shouting that O is null. Here's the JS console error log. --Nathan2055talk - contribs 16:27, 29 May 2013 (UTC)[reply]

Uh oh...

The beta script just lost it while reviewing Global Labour Institute and kept removing the references header. --Nathan2055talk - contribs 15:43, 30 May 2013 (UTC)[reply]

And it's shrinking the wrong decline template at Wikipedia talk:Articles for creation/Rooster New York. --Nathan2055talk - contribs 15:45, 30 May 2013 (UTC)[reply]
It seems to be having issues with thinking comments are references at this page. --Nathan2055talk - contribs 15:52, 30 May 2013 (UTC)[reply]

Cleanup

Can we change it to run a cleanup AFTER each action, so as to prevent issues that require running another cleanup after declining? --Nathan2055talk - contribs 15:46, 31 May 2013 (UTC)[reply]

A specific criteria

Could someone add a proper canned criteria for pages declined as attack, neg unsourced BLP, or vandalism reasons please? To be based on User:Pol430/Sandbox2. We've been using 'test' for years now and it's not really appropriate. The comments template is too complicated for me to figure out how to add new reasons and it would need integrating into the script anyway. I'm currently working on some changes to the way users who create these pages are notified, more to follow.

Also if anyone has time, it would helpful if we could ensure that the various notability declines in the reviewing instructions have a corresponding subject-specific decline reason. There are several that are missing and still rely on 'nn'. Pol430 talk to me 08:15, 7 June 2013 (UTC)[reply]

AfC Teahouse invites

As noted by Anne Delong on WP:THQ#Teahouse invitations clicking the checkbox for send Teahouse invite sends the invite but does not sign it. Technical 13 (talk) 13:29, 9 June 2013 (UTC)[reply]

Yes, but I wasn't saying that that is necessarily a bad thing, only that the invitation should say "we" instead of "I" if a specific person is not mentioned. —Anne Delong (talk) 14:04, 9 June 2013 (UTC)[reply]
The wording can be changed by changing Wikipedia:Teahouse/AFC_invitation; The signature is added after the normal decline, so do we really need it another time? Actually this is a "no brainer" to add the signature one more. mabdul 14:13, 9 June 2013 (UTC)[reply]

The stable version of the tool does not load on AFC/R. The beta version does load and works "mostly" The prompt for custom redirect template does not work properly (or maybe it does but doesn't tell me that there is no such custom R from template based on what I typed in the prompt?). Technical 13 (talk) 13:40, 12 June 2013 (UTC)[reply]
Apparently the beta script didn't do this either. Technical 13 (talk) 13:46, 12 June 2013 (UTC)[reply]

Feature Request: Biography tags

Since the script does so much for the WikiProject Biography talk page template, it would be very nice if the script were to check if the page has a photo or infobox and if it doesn't have one, update the appropriate tags in the template (needs-photo or needs-infobox). APerson241 (talk) 21:26, 15 June 2013 (UTC)[reply]

Rollout date for July 1 rollout

I recommend rolling this out 3-4 days before July 1 so if it has to be pulled or emergency-fixed, the revert comes well before the backlog elimination drive starts on July 1. Either that, or postpone the Backlog Elimination Drive start date until July 4th or 5th. davidwr/(talk)/(contribs)/(e-mail) 23:06, 19 June 2013 (UTC)[reply]

User talk pages that are redirects

I don't know if Aggie80 (talk · contribs) was using the production or the beta when declined a submission with this edit but the submitter renamed his account after submission. The script put the decline on the former page, despite the presence of #REDIRECT. Recommended fix: If a user talk page redirects to another user-talk page and the "old" user either doesn't exist (typical with a user-rename), it was created after the date of the submission (as is the case here, due to an English-only rename likely followed by account-re-creation when the editor logged into Commons under his old name), or the redirect was placed by the "old" account name (likely with doppelganger accounts with redirected talk pages), write to the "new" place. Otherwise, I'm not sure what to do (after all, if a malicious person redirects my talk page, I would like to have the accept or decline on my talk page even if it was below the redirect). davidwr/(talk)/(contribs)/(e-mail) 23:50, 20 June 2013 (UTC)[reply]