Wikipedia:WikiProject Articles for creation/Helper script/Development page
Main page | Talk page | Submissions Category, Sorting, Feed | Showcase | Participants Apply, By subject | Reviewing instructions | Help desk | Backlog drives June 2025 |
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
- Disambiguate headlines, see Wikipedia talk:WikiProject Articles for creation/2013 2#Disambiguating headings (diffs) (thanks to Pigsonthewing (talk · contribs))
- Removal of {{talk header}} per consensus at this thread (diff) (thanks to davidwr (talk · contribs))
- Add a purge feature for related pages
- Add decline reason for pages that have been AfDd in the past
- Minor interface changes
- 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?)
- this talk page discussion)
- Implementation of HotCat --> AFC/C cat adding when cat is created.
- Uh, the HotCat stuff was for accepting articles. I have no clue what you want it to do with AFC/C. I'll mess with the reasoning stuff though. --Nathan2055talk - contribs 16:13, 29 May 2013 (UTC)
- Normal priority
- Bugs sorting and shrinking non-timestamped decline templates (see File:AFCH Decline sorting bug.png, page in question is Wikipedia talk:Articles for creation/Cardin-Lugar Amendment)
- Automatic fixing of submission templates without open parameters
- Add wikilinks to the comments of the deletion log
- Sort decline templates on bases of the
|ts=
and|declinets=
; shrink templates on basis of order [1]- I get the code already by a friend, but have to understand it first! mabdul 00:30, 27 June 2012 (UTC)
- need to add comment sorting as well
- I get the code already by a friend, but have to understand it first! mabdul 00:30, 27 June 2012 (UTC)
- [2] new lines; wikilink correction
- Uhm, why are we using a <references /> tag as opposed to a {{reflist}}? --Nathan2055talk - contribs 16:06, 29 May 2013 (UTC)
|ns=
should be changed to 4 or 5- mw:ResourceLoader/Default_modules#addPortletLink: addPortletLink should be updated (we're using the old fashion way!)
- Move user/user talk pages automatically
- A resubmit button
- On top of that, it needs to be able to review drafts, perhaps with a warning. --Nathan2055talk - contribs 17:40, 22 May 2013 (UTC)
- Enable review tab on all pages in userspace for easy sandbox reviewing
- Low priority
- Moving blacklisted submissions
- Automatically adding a {{reflist}} if there are ref tags, but not reflist
- Moving the {{reflist}} to the bottom if there are ref tags deeper in the source code
- Individual configurations/preferences (e.g.: auto turn on of the teahouse invitation, watchlisting (and related checkboxes, etc.))
- Cleanup/removal option of decline templates without going on edit
- Check advisor.js code for more cleanup stuff
- Access key for opening the review panel (see mw:ResourceLoader/Default_modules#addPortletLink)
- {{Connected contributor multi}} adding while accepting
- Duplication of references (both in article, and having one reference in article, and another in final list) (requested by TheOriginalSoni (talk · contribs))
- Add stuff from User:Ohconfucius/script/formatgeneral.js; maybe ping Ohconfucius (talk · contribs)
- A method for bots to access the script (part of the NathanBot (talk · contribs) plan)
- FFU reviewing
- Using magic CSS and polish the design
- Add a CSD button for CSD#G13 (requested by Nathan2055 (talk · contribs))
- rework the commenting structure of the helper script (too many places use the same stuff).
- Fix whitespace bug if a user ends the comment with a newline, see diff
- Signature breaking the comment template
- Automatic tagging of {{linkrot}}
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
- On articles with multiple declinations, is there anyway that all of them could be listed in one box instead of 2, 3, 5, 8, or more boxes taking up 4/5 of the page? I can go into more detail and am willing to assist with a possible revamp of the template to accommodate this. The helper script should be able to handle the leg work if implemented. linking here from the main discussion page as well. Technical 13 (talk) 01:12, 11 April 2013 (UTC)
- Under discussion at Wikipedia_talk:AFC#Multiple_declination_articles. mabdul 09:45, 13 April 2013 (UTC)
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)
- 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)
- 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)
- OK, but this will need some time. I first want to fix some bugs so that the script can be finally pushed as live version... mabdul 05:51, 22 April 2013 (UTC)
- 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)
- 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)
order of templates
- I'm using the beta. I added a comment to Wikipedia_talk:Articles_for_creation/Tropical_Depression01W_(2010) which had an old decline. The script put the new submission immediately below my comment, which it put immediately below the old decline. I did a "clean" and now it looks right. At one time, adding a comment did the equivalent of running clean as well. davidwr/(talk)/(contribs)/(e-mail) 15:56, 19 April 2013 (UTC)
- Please see Wikipedia talk:WikiProject Articles for creation#AFC bot and AFC Helper Script Beta are in conflict. davidwr/(talk)/(contribs)/(e-mail) 18:59, 21 April 2013 (UTC)
- Heh, yeah, will be fixed soon. mabdul 05:51, 22 April 2013 (UTC)
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)
- 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)
- I stopped using the Beta script and used the production script to decline the article. Please let me know when the Beta is functional so I can go back to using it. davidwr/(talk)/(contribs)/(e-mail) 04:14, 10 May 2013 (UTC)
- I believe this bug is fixed. mabdul 16:06, 24 May 2013 (UTC)
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)
- AutoEd is run automatically while cleaning up the page. No need for extra /manual run. mabdul 17:34, 9 May 2013 (UTC)
- 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)
- AutoEd is an user script that does many cleanup tasks automatically. mabdul 16:06, 24 May 2013 (UTC)
- 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)
Wikilink Correction
Do we want to go a step further as WP:AWB does and replace [[Example|Examplefoo]] with [[Example]]foo ( Examplefoo → Examplefoo )?
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)
- Feel free to point me to more corrections as these could be integrated into AutoEd. mabdul 16:06, 24 May 2013 (UTC)
- @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)
- @Mabdul: I use the rules listed at Wikipedia:Piped link && Help:Pipe trick. Technical 13 (talk) 22:18, 25 May 2013 (UTC)
- @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)
Single stub append

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)
- 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)
- 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)
- 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)
- Feel free to do it... mabdul 20:21, 23 May 2013 (UTC)
- Check added and tested at test.wikipedia. mabdul 19:25, 24 May 2013 (UTC)
- Feel free to do it... mabdul 20:21, 23 May 2013 (UTC)
- 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)
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)
- 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)
- 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)
- 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)
- Nearly Everything is possible. I will invite the RM folks to comment here. mabdul 21:50, 22 May 2013 (UTC)
- 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)
- Yes, I can! Maybe this weekend. mabdul 19:56, 23 May 2013 (UTC)
- 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)
- Nearly Everything is possible. I will invite the RM folks to comment here. mabdul 21:50, 22 May 2013 (UTC)
Bot workable
@Nathan: would you explain that? Actually you can access every stuff as it is javascript! mabdul 21:50, 22 May 2013 (UTC)
- 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)
- 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)
Cat and redirect fixes
Rewrote the redirect and category submission review interface(will be added to the next version, but is still in the beta script)- What's the status on this? --Nathan2055talk - contribs 17:01, 21 May 2013 (UTC)
@mabdul: You didn't see it up there, so I'll repost. --Nathan2055talk - contribs 01:36, 23 May 2013 (UTC)
- 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)
- Well, this might change your mind. --Nathan2055talk - contribs 17:14, 23 May 2013 (UTC)
- Meh, ok in the next few weeks no new features, only bug fixing... mabdul 19:52, 23 May 2013 (UTC)
- 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)
- I doubt it, but simply check it on your own. mabdul 21:05, 23 May 2013 (UTC)
- 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)
- Meh, ok in the next few weeks no new features, only bug fixing... mabdul 19:52, 23 May 2013 (UTC)
- Well, this might change your mind. --Nathan2055talk - contribs 17:14, 23 May 2013 (UTC)
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)
- 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)
- Wait, what did I do? Do you mean Joe's Null Bot? Technical 13 (talk) 19:53, 24 May 2013 (UTC)
- 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)
- 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)
- 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)
- Wait, what did I do? Do you mean Joe's Null Bot? Technical 13 (talk) 19:53, 24 May 2013 (UTC)
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)
- 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
amazonwebshop? - 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)
Recommended new feature: Pre-accept and pre-decline
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)
- From my experience in the last
few monthslast 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)
Spacing
Moved from WT:AFC. --Nathan2055talk - contribs 16:27, 29 May 2013 (UTC)
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)
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)
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)
- 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)
- It seems to be having issues with thinking comments are references at this page. --Nathan2055talk - contribs 15:52, 30 May 2013 (UTC)
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)
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)
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)
- 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)
- 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)
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)
Apparently the beta script didn't do this either. Technical 13 (talk) 13:46, 12 June 2013 (UTC)