Jump to content

User talk:Equazcion/OneClickArchiver/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1

Subsection failure

WT:WikiProject Articles for creation/2013 5#Suresh Apex Bhandari -- I had to manually replace the bot-inserted text with a copy retrieved from the non-archived page's history. The section being archived had subsections, and only the beginning until the first subsection break was included. Dovid (talk) 04:14, 29 October 2013 (UTC)

Although those may have been intended as sub-sections, they seem to actually be "top level" sections -- their headers (section titles) were created using == ==, while sub-sections need to be created using === === (three to five equal sign on each side). The script will automatically include actual sub-sections in a discussion to be archived, but it can't know if a section is intended as a sub-section unless it's been coded that way. Discussions created using such a format, with multiple top-level headers, should probably be fixed before being archived -- whether OneClickArchiver is used or not -- as otherwise it creates confusion. equazcion 04:23, 29 Oct 2013 (UTC)

Archive goof

Hi, Equazcion ... thanks for developing this cool tool. It glitched. I archived four sections just now, but the fourth ended up a repeat of the third, so I had to do it manually. Thanks again, SandyGeorgia (Talk) 03:19, 21 November 2013 (UTC)

Thanks for letting me know. It looks this may have been a server cache foulup.
What I'm thinking happened is that the version of your talk page that got edited on the "remove" step was more current than the version that got pulled on the "append" step. So when it pulled the content from the section number you wanted to archive, it wound up grabbing a section that was actually already gone. Also interesting is that the first and second append edits seem to have gotten to the server at the same time, conflicted with each other, and were automatically merged by MediaWiki -- this edit shows a section getting added before another section, which OneClickArchiver isn't capable of doing intentionally (it uses MediaWiki's "append" function, which can only add content to the end of the page, so an edit conflict seems like the only way this could've occurred).
I could possibly see something like this happening if you used OneClickArchiver on two different browser tabs, archiving one section and then archiving another without waiting for the first to complete. If that's what you were doing then I'd advise against it, because it will mess things up often.
If that's not what you were doing, and the page actually reloaded before you clicked the archive link a second time, I'm pretty sure the only way this could've possibly happened is the aforementioned server caching issue. OneClickArchiver pulls content on the fly and doesn't save anything, so once a section is gone from the origin page, it can't magically get it again to add a second time.
If this is reported again I may need to find a way to make sure all cache is bypassed when pulling content. I'm not sure right now how the MediaWiki API uses cache. Let me know if you see this happen again, though if I'm right about the cause then it should be an extremely rare occurrence. equazcion 08:59, 21 Nov 2013 (UTC)
not multiple tabs, probably the page reloaded before I clicked. So in the future I will go slower! Thanks for looking, thanks for the tool, and I'll let you know if it happens again. Best, SandyGeorgia (Talk) 14:34, 21 November 2013 (UTC)

Other wikis

Can I put this on other wikis (like Commons, Meta) where User:MiszaBot is archiving. Old miszabot is still working, but too slow, so I want to use this javascript. Is there any problem with using in other wikis? --레비Revicon 08:09, 20 December 2013 (UTC)

Hi 레비, see discussion below, I managed to make it work on frwiki. --NicoV (Talk on frwiki) 08:37, 27 March 2014 (UTC)

Addition to common.js file

Hello,

Cool tool! I tried to add the{{subst:iusc|User:Equazcion/OneClickArchiver.js}} script for the OneClickArchiver to my common.js file, and got the following message:

Warning: Label 'subst' on iusc statement.

and

when I tried to save it... something like - do you want to save with errors?

Does it need to be in a particular order in the file? Or, is there another issue?

By the way, I recently had an issue come up related to my use of vector vs. monobook, so I don't know if that might have something to do with it.

Thanks!--CaroleHenson (talk) 16:30, 8 September 2014 (UTC)

Hi CaroleHenson, not sure but I see 2 things you can try:
  • First, fix your common.js by adding a ";" at the end of the first line (as suggested by the code editor which says "Missing semicolon")
  • Try with using directly importScript(), like on my common.js
--NicoV (Talk on frwiki) 16:43, 8 September 2014 (UTC)
Hello, worked like a charm. Thanks!--CaroleHenson (talk) 17:07, 8 September 2014 (UTC)

AN boards

I notice that it says it only works on pages that have an "add new section" link, which is only available on talk pages. I notice this isn't entirely true as WP:AN and WP:ANI have "add new section" links but aren't talk pages. How did those pages get those links? Is it added by one of the available gadgets? I also notice that WP:AN3RR doesn't have the link, yet the script still seems to be available on that page. Looking over the source code, I see that you've manually added an override for it to be available on that page. What I'm wondering is if you could add another similar override for WP:ANRFC if there is a consensus (or a lack of objection) to the current path of the discussion on Wikipedia talk:Administrators' noticeboard/Requests for closure#Lack of archiving. Thanks. — {{U|Technical 13}} (etc) 16:24, 26 November 2014 (UTC)

The page - or one of the templates on it - will have a __NEWSECTIONLINK__, see H:MW#Behavior switches. --Redrose64 (talk) 13:44, 1 December 2014 (UTC)

typo

Resolved

awesome script. the string for mSection misspells retrieving as retreiving. NE Ent 23:38, 2 January 2014 (UTC)

Bug

Resolved

See Talk:Dogecoin. The first discussion needs to be archived, it's just that it has no date and the bot won't pick it up. When trying to archive it says that there is no counter specified but the config is there and working: It was just successfully archived by the bot minutes before. KonveyorBelt 02:30, 9 January 2014 (UTC)

  • Konveyor Belt, thanks for stopping by! The reason that it refused to recognize the counter is due to spacing of the parameter. The script used to be very strict about what the parameter had to look like in that regards and if there was a space between the pipe and the word archived (like | archive...) or if there was more than one space on either side of the equals sign (like |counter     = 1) then it would fail to see the counter. I have fixed that issue (was one of the things that annoyed me too and was a first fix when I sandboxed the script to add the heading level feature). The script now works on that page as can be seen in the archival or this section to the archive. Happy editing! — {{U|Technical 13}} (etc) 14:36, 10 December 2014 (UTC)

unarchive?

I was wondering if this tool could be set to instead unarchive discussions? If the page is called /archive*, it would just check if the parent page's configuration would post to that page or not, and offer to remove it from the archives to the parent page if that's the case. I haunt WP:ANRFC, and it would be nice to be able to move the discussion back to the main talk page for closure. Just a thought. VanIsaacWS Vexcontribs 07:40, 28 October 2013 (UTC)

That's a feature that would seem to be a bit less reliable since it can only check the parent page. It also wouldn't seem to be of as much general use to editors... Maybe when I have some time to kill... :) equazcion 00:39, 29 Oct 2013 (UTC)

Archiving differently today

Equazcion, OneClickArchiver is just one great tool. Thank you for coming up with it. I've used it on a few pages, but today it did something I've never seen before. Talk:James Bowie/Archive 1 was created when I did my first OneClick on Talk:James Bowie. All threads on the archive page have an "Archive" option, as if it's the regular talk page. Just thought it was worth mentioning. The tool didn't archive that way before on other pages. — Maile (talk) 23:28, 4 December 2013 (UTC)

Thanks, I'm glad you like it :) The Archive links will actually show up indiscriminately on any page with a "new section" tab. Those tabs are removed by most archive navigation templates, such as {{aan}}, which is probably why you haven't seen them until now when you created a new archive page. If you place a template like {{aan}} at the top of your newly created archive pages, the OneClickArchiver links will be removed in most cases. equazcion 23:52, 4 Dec 2013 (UTC)

Archive header

Unresolved

Is there any way this could check to see if the archive page is being created and if so add in {{Automatic archive navigator}} the archiveheader= value? VanIsaacWScont 08:29, 8 May 2014 (UTC)

  • Van, if you read the script description, it doesn't typically create archive pages because it doesn't increment the counter or respect the maxsize parameter. — {{U|Technical 13}} (etc) 14:56, 6 June 2014 (UTC)
Which is exactly what I was running in to when I made this request: the automatic archiving bot was blocked, so I manually incremented the counter so that we could start a new archive, but OCA didn't create a functional archive - I had to do it manually. — Preceding unsigned comment added by Vanisaac (talkcontribs)

Use on an other wiki ?

Hi, is it possible to use OneClickArchiver on an other wiki ? I'd like to use it on frwiki. --NicoV (Talk on frwiki) 06:55, 25 March 2014 (UTC)

I tried to use it on frwiki by creating fr:Utilisateur:NicoV/common.js, then went to fr:Discussion Wikipédia:WPCleaner: the "Archive" links do appear, but when I try to click on the one for the "Bug" section, I get the following message "No archive counter was detected on this page, so archiving was aborted. See User:Equazcion/OneClickArchiver for details.". Current archive page is fr:Discussion Wikipédia:WPCleaner/Archives 2014. --NicoV (Talk on frwiki) 07:09, 25 March 2014 (UTC)
I tried adding a {{User:MiszaBot/config}} in fr:Discussion Wikipédia:WPCleaner, but no change. --NicoV (Talk on frwiki) 10:12, 25 March 2014 (UTC)
(talk page stalker) As that page is currently, OneClickArchiver would not function even if it was on en.wiki. OneClickArchiver has only very basic parsing of either the {{User:MiszaBot/config}} or {{Archive basics}} templates. One or the other of those must be on the page, and must contain both a valid |archive= and a valid |counter=. The the page you are attempting to use this script on does not have a |counter=. Thus, OneClickArchiver will not function. In general, OneClickArchiver does not work with archives which are stored in pages organized by date. However, in this specific instance, the archives are stored with only the year as a changing number. This should be able to be made effectively the same using |counter=2014. If I was doing this there I would create the {{Archive basics}} template on fr.wiki as a clone/fork of the one on en.wiki and use that template on the desired page(s). Using the MiszaBot template leaves you open to having problems if any of the MiszaBots or lowercase sigmaBot III is run on fr.wiki. — Makyen (talk) 11:46, 25 March 2014 (UTC)
Thanks Makyen, I tried your suggestion (creation of the template Modèle:Archive basics, using it with archive and counter in fr:Discussion Wikipédia:WPCleaner), but I still get the same error message. --NicoV (Talk on frwiki) 12:16, 25 March 2014 (UTC)
Finally, it works ! Thanks a lot, I had to use the counter variable. I put a small description of the tool on fr:Utilisateur:Equazcion/OneClickArchiver. --NicoV (Talk on frwiki) 12:21, 25 March 2014 (UTC)

Make "counter" optional ?

Hi, a nice improvement would be to check for the definition of "counter" only if it's required to compute the archive name. For many pages, archiving by year would be quite enough and using the %(year)d variable in the archive name. --NicoV (Talk on frwiki) 12:07, 16 April 2014 (UTC)

Not working for me

Resolved

New user here. It does not work for me on Talk:Yank Barry, saying No archive counter was detected on this page, so archiving was aborted. See User:Equazcion/OneClickArchiver for details. There is an auto-archival header with a working bot on the page. Any suggestions as to what I am doing wrong? VQuakr (talk) 01:09, 7 June 2014 (UTC)

Not working for me on my user talk page, either. — Arthur Rubin (talk) 15:40, 24 August 2014 (UTC)
Hi Arthur Rubin, it only works with "counter" as specified in User:Equazcion/OneClickArchiver#Further technical notes, not with "year". If you want an example, it's working on Wikipedia talk:WPCleaner (you can try by archiving the last discussion, which is marked as resolved). --NicoV (Talk on frwiki) 16:34, 24 August 2014 (UTC)

Echo

mw:Echo sometimes sends a notification when someone archives a discussion which I have participated in. For example, I was just notified that I was mentioned in Special:Diff/635909103. On the other hand, I do not receive a notification when a bot archives a discussion. It seems silly to notify users when a discussion is archived. Could you look into this? --Stefan2 (talk) 18:29, 29 November 2014 (UTC)

The easiest way to bypass this would be to mark edits as minor, which AFAIK, should stop pings being sent. --Mdann52talk to me! 13:35, 1 December 2014 (UTC)
Equazcion, can you please modify the script so that it marks these archiving edits as minor? — Cirt (talk) 19:15, 3 December 2014 (UTC)
  • Ummm... Echo shouldn't be notifying of comments made that don't have a "new" timestamp... Bsitu, can Echo be fixed for this? I'll open a ticket on Phab as well... Tracking number to come soon. As far as Equazcion updating the script for that goes, he seems to be semi-inactive at the moment, and I don't expect it any time soon. I'll be back with a Tracked template in a few moments. — {{U|Technical 13}} (etc) 19:30, 3 December 2014 (UTC)
Thanks very much for your help, Technical 13, I've sent Equazcion an email so we'll see if he responds but let's plan for if not and do a work around and that would be most appreciated if it could be fixed this way !!! — Cirt (talk) 19:32, 3 December 2014 (UTC)
I see we want to add the minor bit and add ClueBot configs. I'm really not in the proper mindset to handle these things though. I haven't looked at any of this in a very long time and I'm not involved in Wikipedia at all anymore. I'll hereby authorize any admin to make whichever changes they feel are necessary and safe, hopefully with consult from javascript ninjas. I see Technical13 posted a sandbox version, but I'd rather not be responsible for replacing a script that so many people are apparently using with one that I haven't tested and wouldn't be able to analyze properly at this point. I could conceivably replace the JS page in my userspace with an importScript line pointing someplace else, if someone wants to take over development (and responsibility), though it would be best to get the target script tested and approved first by peers in the know. equazcion 19:43, 3 Dec 2014 (UTC)
  • Considering my sandbox version (which I've just moved into my scripts as it is stable) has already been created and I had to reformat many parts of the script to create it, I'd be happy to take over maintenance and responsibility of the script. — {{U|Technical 13}} (etc) 20:04, 3 December 2014 (UTC)
Great! So what do I do to use the newer script? — Cirt (talk) 20:50, 3 December 2014 (UTC)
So, tiny issue, User:Jehochman apparently protected my script in order to "avoid a security threat," and suggested that I be made an admin so I can continue to edit it. This is pretty mystifying to me. I can't do anything til he unprotects it or I become an admin (the latter seems rather farfetched). equazcion 20:59, 3 Dec 2014 (UTC)
I was about to redirect to Technical13's script, FYI, so everyone with OneClickArchiver installed would automatically start using his updated version. equazcion 21:02, 3 Dec 2014 (UTC)
  • You saw my comment there, right? LOL I'm as befuddled as you are. We can fix this though...

Please read the discussion immediately preceding this request for help from an administrator. We are in need of a protected page being unprotected/modified. The replacement code should be:

importScript( 'User:Technical_13/Scripts/OneClickArchiver.js' );

Thank you. — {{U|Technical 13}} (etc) 21:07, 3 December 2014 (UTC)

Thanks. Ideally the script should be unprotected though. There's no reason it should've been protected in the first place and I'd like it unprotected. Thanks. equazcion 21:09, 3 Dec 2014 (UTC)
  • You can just ask me for help directly, you know. Is there some reason a widely used JavaScript file should be unprotected so that anybody could slip malicious code in there? Jehochman Talk 21:30, 3 December 2014 (UTC)
    • The script is within my userspace. No one but myself or an admin would be able to slip anything in. This is one of the reasons scripts are generally confined to userspace -- for that inherent security feature. The only person you're protecting this page from is its author. equazcion 21:36, 3 Dec 2014 (UTC)
      • That's a good answer if it actually works that way. Just a moment, I will test it. Jehochman Talk 21:38, 3 December 2014 (UTC)
        • Jechochman removed the protection and left a note at my talk page. The script should be redirecting to Technical 13's version. Keep testing and good luck. equazcion 21:49, 3 Dec 2014 (UTC)

Missing safety-check

Resolved

Before this edit, the archive configuration at Portal talk:Textile arts was incorrect. I've read that the archiving bots include a safety-check, and refuse to archive anything if the destination is not a subpage of the source. Thoughts? -- John of Reading (talk) 15:19, 28 January 2014 (UTC)

It was a simple capitalization matter in the archiving code. I fixed it easily. :) Cheers, — Cirt (talk) 02:53, 29 January 2014 (UTC)

Archiving failed

Resolved

@Equazcion and Technical 13: The page in question is Talk:Fremantle Prison (history). Everything appeared to work when I clicked the Archive links – no errors or unusual messages – but the content was removed without being archived to Talk:Fremantle Prison/Archive 1 (history). - Evad37 [talk] 08:15, 10 December 2014 (UTC)

Feature request - "Are you sure?"

Resolved

While we're all here, can I request an mod so that you get an "Are you sure you want to archive this thread?" query after clicking? I guess this would make it the Two-Click Archiver, but when I've been having nightmares about accidentally clicking Archive on e.g. an ANI thread, and the ton of bricks that would fall on me if I did that. EEng (talk) 07:31, 18 December 2014 (UTC)

  • As for EEng's request, I'm hesitant to do that. I'll have to think about it and if I decided to implement it, it would be a custom setting for individual user's and not the default. Anyways, thanks for the report, I'm going back to sleep. — {{U|Technical 13}} (etc) 07:46, 18 December 2014 (UTC)

@EEng: Here's some help for you: I too have the same fear of archiving by mistake since the click button for the "Archive" is dangerously close to the scroll bar (I don't use a mouse but a Wacom pen tablet). So I have the archiving turned off most of the time but putting two "//" in front of the code in my commons.js and only open it by removing the slashes when I want to archive something. Check the History. Ok, it's a bit more complicated than a "two-click-thingy", but it works for now. - w.carter-Talk 07:15, 21 December 2014 (UTC)

Too much trouble. I'd much rather just have an "are you sure" query, even if I have to enable that (one time) by uncommenting something in the code or whathaveyou.. EEng (talk) 22:21, 28 December 2014 (UTC)
  • Hello there! I agree that is is too much trouble to have to comment and uncomment the script to turn it on and off. So... I've added a new feature today that allows you to toggle the script on or off directly from talk pages! The best part is that it will remember what the last state was! Please see the documentation for more details and happy archiving! — {{U|Technical 13}} (etc) 00:46, 29 December 2014 (UTC)
EEng, does this solution work for you? — {{U|Technical 13}} (etc) 04:30, 29 December 2014 (UTC)
If I'm understanding correctly that seems fine, though it will be a day or two before I can actually try it out for myself (for complicated reasons). An alternative would be someone's idea (above?) of being able to check a box by each of one or several threads to be archived, followed by clicking a button somewhere on the page for "Archive checked threads" -- that would give us "two-clicks" protection against accidental archiving, and at the same time eliminate the annoyance of cluttered page histories. Anyway, I'll let you know about the new version when I've tried it. Thanks for the attention. EEng (talk) 04:36, 29 December 2014 (UTC)
  • I'm not sure if that is going to happen, but it will require many of the other requests to be carried out first and some other fixes before I can even really think about it. — {{U|Technical 13}} (etc) 04:40, 29 December 2014 (UTC)

Support archiving multiple sections at once

I think this script should support archiving multiple sections at once. People are using one-click archiving repetitively when a single edit would do, which is a bit annoying and wasteful. :-( --MZMcBride (talk) 00:59, 29 January 2014 (UTC)

Archiving one section at a time is prudent. It helps for users to be able to determine, manually, one at a time, if a thread is inactive for reasons a bot cannot determine, for example, notification on a WikiProject talk page of an FAC discussion, which has since been closed and is therefore no longer relevant or needed as a notification. Cheers, — Cirt (talk) 02:52, 29 January 2014 (UTC)
Sure, archiving expired notifications and dead discussions manually is fine. But this is about efficiency as a technical matter. This tool could allow a user to individually press archive links (or check checkboxes or...), then build a queue of sections to archive, and finally move that queue in two edits instead of two-dozen edits. I don't think there's any issue doing this in fewer edits. That's what the bots do, so it's hardly unexpected. :-) --MZMcBride (talk) 03:30, 29 January 2014 (UTC)
Okay, MZMcBride, I agree with all of your examples of suggested uses for the tool in ways to archive multiple threads at once, checkboxes being one particular good example. Thank you for this helpful input! — Cirt (talk) 03:53, 29 January 2014 (UTC)
  • I'd personally like to see a checkbox next to the archive link for each section as well. I find it disruptive to history pages and my watchlist to see multiple "archived by one-click-archiver" in a row (I mean like more than three or five or ten in a row, not just 1-3 which would be reasonable). This would allow a user to click the check boxes of all the sections they want to archive and clicking any archive link would do them all in one shot (the checked ones and the one for the link checked or not, that way there are no extra clicks). — {{U|Technical 13}} (etc) 14:53, 6 June 2014 (UTC)