User talk:Equazcion/OneClickArchiver

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

This is an old revision of this page, as edited by Equazcion (talk | contribs) at 17:05, 1 January 2015 (→‎toggling: re). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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)[reply]

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)[reply]
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)[reply]
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)[reply]
  • 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)[reply]

Would be great if....

Unresolved

I could archive in e.g. User talk:Josve05a/Archives/2014/February With this tool. I don't see how.... (tJosve05a (c) 17:01, 14 February 2014 (UTC)[reply]

  • ...One could archive all the sections at a page at once instead of one at a time. Soham 08:16, 16 February 2014 (UTC)[reply]
  • Hello Josve05a! I've thought about this, and need to do some more research on this. The way that I've done it is by number, so counter=1 for January, counter=2 for February, etc. How does the page currently flip through the months? Does a current bot update it every month? What about when there is no archiving that happens by bot in a month, as the script does not handle creating new archives very well? — {{U|Technical 13}} (etc) 16:00, 10 December 2014 (UTC)[reply]

Problems in archiving

Unresolved

Here User:EEng used this tool to archive 7 threads one by one but the seven threads arriving here have one thread duplicated twice and one another duplicated once. Resulting in loss of archiving for 3 threads. --Vigyanitalkਯੋਗਦਾਨ 07:15, 18 December 2014 (UTC)[reply]

I sure hope this gets fixed since one-click archiving is the best thing since sliced bread.
  • Since the email I got woke me up through my phone (darn thing, it's 2:40am), I'll look into it tomorrow but I'm guessing it's a server/caching glitch (see this page's history, it's apparently happened at least once before). I suppose I could add a sanity check when I have some free time. — {{U|Technical 13}} (etc) 07:46, 18 December 2014 (UTC)[reply]
    •  Checking... {{U|Technical 13}} (etc) 15:02, 18 December 2014 (UTC)[reply]
    • Okay, this looks a lot like User talk:Equazcion/OneClickArchiver/Archive 1#Archive goof reported back in Nov 2013. Archiving this section and having it show up as this section; this section and having it show up as this section; this section and having it show up as this section; this section and having it show up as this section all concern me enough to keep an eye out for it. I've made some changes since December 7, 2014, and I'm debating adding a(n optional) logging function that will make such issues more evident more quickly so I can look into them better. I'm going to mark this as unresolved because it will take me quite a bit of work to find a way to add a sanity check and make sure that it is actually removing the section that it just added to the archive. I'll also add it to the "todo" list, so I won't forget to do it later. Thank you for your report! — {{U|Technical 13}} (etc) 15:27, 18 December 2014 (UTC)[reply]
{{Plain link|url=//tools.wmflabs.org/sigma/summary.py?server=enwiki&max=500&ns=&nosect=on&name={{urlencode:{{BASEPAGENAME}}}}&search={{urlencode:[[User:Equazcion/OneClickArchiver|OneClickArchiver]]}}|name=Check OneClickArchiver edits}}
To any page in your userspace. This will make a link like: Check OneClickArchiver edits. On top of that, if you find it difficult to distinguish one row from another, you can open your error console and add the following code which will color each row either light red or light green for removing and adding content:
$('ul li').each(function(){$(this).css('background-color', $(this).find('span, strong').hasClass('plusminus-neg') ? '#FEE' : '#EFE')});
There should be a difference in 10 bytes caused by prefixing {{Clear}}\n (\n is a newline character and counts as one character) to each section archived on the destination page (prevents section bleed in archives, may subst: it in the future, not sure yet). I'm going to modify the code a little tomorrow so that it should always save the archived copy before clearing the section from the page (this, in itself, should help with the issue). — {{U|Technical 13}} (etc) 06:05, 21 December 2014 (UTC)[reply]
Thanks for the effort, Technical 13, but I have no idea what any of that said or means. I still have intermittent probs with Oneclickarchiving, though. SandyGeorgia (Talk) 16:02, 21 December 2014 (UTC)[reply]
  • I added the link to the top of your "useful links" box. All you have to do is click on that and you can easily look through your recent (500 entries should be 250 archived sections) and compare the byte size. The difference between a green number and a red one should be the green number is 9 or 10 higher than the red number. Big differences means that what was put on the archive page isn't the same as what was taking off of the section you wanted to archive. Thanks. :) — {{U|Technical 13}} (etc) 16:11, 21 December 2014 (UTC)[reply]
  • Thanks! So, that's to help me find past errors? But I check them each manually as I do them anyway. I'm not sure how I need to use that info ? SandyGeorgia (Talk) 16:21, 21 December 2014 (UTC)[reply]
  • It's quicker and easier for when you archive 3 or 4 sections on a page to just check that and see if the diff sizes line up. If they do, you don't have to manually go through each revision. :) — {{U|Technical 13}} (etc) 16:41, 21 December 2014 (UTC)[reply]

Error messages

I'm now getting visible error messages each time I load talk (and some other) pages that do not have archives:

OneClickArchiver errors!
The following errors detected:
• Unable to find |counter=
• Unable to find |archive=
• Causing the script to abort.
Please, see the documentation for details.

– can this be suppressed please? It's very annoying to see this pop up and then dissappear on pages that don't even need archives, such as short pages, TFD logs, etc. - Evad37 [talk] 03:37, 31 December 2014 (UTC)[reply]

  • Evad37, toggling the off using the link or accesskey when you are not using will suppress the messages. See User:Equazcion/OneClickArchiver#Further technical notes for details on toggling. — {{U|Technical 13}} (etc) 03:54, 31 December 2014 (UTC)[reply]
    • But is there any way to have it on all the time for when I want it, but not show error messages for pages without archives - like it used be? Perhaps something I could add to my custom CSS? - Evad37 [talk] 04:04, 31 December 2014 (UTC)[reply]
      • Not at the moment, and I've been stareing into a screen too long today. The purpose of that 5 second notice is to tell people why there are no `|Archive` linjs on the page instead of having links that didn't archive but instead yelled at you to say it couldn't archive. I really don't like the idea of there being no explaination for a lack of links. — {{U|Technical 13}} (etc) 04:13, 31 December 2014 (UTC)[reply]
        • I would really get rid of that error popup on load, Technical13. They won't be useful on the vast majority of page loads by most users, yet they show up all the time. Either get rid of it altogether or perhaps have a tiny permanent link somewhere saying "OneClickArchiver errors" that shows the popup when clicked, so people can troubleshoot when they need to. They shouldn't be showing up on every load. equazcion 10:48, 1 Jan 2015 (UTC)
        • I'm almost to a point where that error popup will be obsolete. The purpose is to tell users why there are no |Archive links since the script now checks for counter and page name before populating the page with the links. I spent all day on the beta version of the script on December 31, 2014, and it now knows how to create new archives with the defined header or the default {{Aan}}, knows how to respect maxarchive size and increment the counter, and in debug beta mode, it can even archive sections on pages that don't have an archival template. The next step is to get it to archive sections on pages like that and then apply a fully populated with defaults . Once that is done, then the links to archive section will always be there and that error message will be obsolete. There is now a much more detailed "on load" error message for those that need it by running the script in "debug=true" mode (same as the on site debug mode) and I'll be adding more details to that. I'm debating logging to the console as well. So, TL;DR on the error message, toggle it off if it really annoys, otherwise be patient and wait for the next release and it will be completely gone. :) — {{U|Technical 13}} (etc) 15:52, 1 January 2015 (UTC)[reply]
          • I'm aware of the purpose of the popups. That purpose is only served in a miniscule number of circumstances. It shouldn't be activated on every load, as most people looking at most talk pages will not be wondering why no archive links show up. I've removed the redirect for now from my code page, so users who installed prior to that will be running my old version, at least for now. I'll also be reverting the documentation page. You can host your version independently in your userspace if you like. equazcion 16:02, 1 Jan 2015 (UTC)
            • You do realize that does away with many functions that people asked for such as making sure the script clears the section it archived, being able to archive different header levels, being able to disable the archive links when they are not using it (to prevent accidental archiving). I've made that report "by request" with a link next to the toggle button as you requested. I'm sorry it wasn't quicker, I was only a 1/4 awake when I first responded at 5am this morning. — {{U|Technical 13}} (etc) 16:35, 1 January 2015 (UTC)[reply]

Your comment above from one hour ago seemed to indicate that you were not working on getting rid of the auto error popup, and weren't willing to, saying people should toggle it off if it really annoys them, and to otherwise wait til the error messages are no longer necessary. Of course I realize my revert removes your new features, however I'm more concerned when everyone who had installed something I made were suddenly getting an unnecessary and annoying popup that most of them were probably just confused by. It might be best if we kept our versions separate. People can manually install yours if they like; this way they won't suddenly get unexpected/confusing behavior. equazcion 16:48, 1 Jan 2015 (UTC)

  • The documentation page should be clear about that then, or I expect there will be more complaints like below. — {{U|Technical 13}} (etc) 16:51, 1 January 2015 (UTC)[reply]
Once you post your documentation page let me know and I'll link to it from here. equazcion 16:53, 1 Jan 2015 (UTC)

toggling

  • The installation wasn't as simple as copy this, click here, paste -- actually, I had to remove the old code, save despite a message saying "There are errors on this page/script", etc. Anyway...
  • Where is the toggle button?
  • I used alt-shift-O to toggle, which is fine I guess if I can remember it. But it seems tp me it should be off by default, not on by default. The whole point is prevent accidentally hitting ARCHIVE and if I have to remember to toggle off every time I arrive on a new page, that's useless.

Thanks again for working on this. EEng (talk) 16:20, 1 January 2015 (UTC).[reply]

    • Read the section above. Equazcion unilaterally decided to get rid of all the new features. If you wish to ensure that the features are working for you, replace importScript( 'User:Equazcion/OneClickArchiver.js' );// with importScript( 'User:Technical 13/Scripts/OneClickArchiver.js' );// to use my version directly, which has this feature. — {{U|Technical 13}} (etc) 16:35, 1 January 2015 (UTC)[reply]
What I've got now is the Technical13 version, and my comments above apply to that. Can't you technical guys move forward together without all this struggling? EEng (talk) 17:01, 1 January 2015 (UTC)[reply]
Your issue has nothing to do with our struggle, EEng. Just ignore us :) equazcion 17:05, 1 Jan 2015 (UTC)