User talk:Technical 13/Scripts/OneClickArchiver

From WikiProjectMed
Jump to navigation Jump to search

Repeatedly incrementing archive page

When I manually archived a few threads on Wikipedia_talk:WikiProject_Biography without timestamps, it created a new archive page for each of them. Any reason why this happened? power~enwiki (ฯ€, ฮฝ) 16:15, 14 August 2020 (UTC)[reply]

Errors

When I recently tried using OCA, it created a few different errors that I had to fix manually [1][2]. Since the operator seems to be blocked, I don't have much hope these will be fixed, and will probably try to find a different script to use. {{u|Sdkb}}โ€ฏtalk 22:13, 15 November 2020 (UTC)[reply]

Oops, nevermind, I realized I was actually using a different script. Moving there... {{u|Sdkb}}โ€ฏtalk 22:25, 15 November 2020 (UTC)[reply]

"Wikipedia:OneClickArchiver" listed at Redirects for discussion

A discussion is taking place to address the redirect Wikipedia:OneClickArchiver. The discussion will occur at Wikipedia:Redirects for discussion/Log/2021 January 28#Wikipedia:OneClickArchiver until a consensus is reached, and anyone, including you, is welcome to contribute to the discussion. ๐Ÿ™๐Ÿค๐Ÿฏ๐Ÿบ๐ช๐‘ค๐’†๐“‡๐Ÿท๐Ÿฎ๐Ÿฅ๐Ÿœ๐“บ๐”ด๐•–๐–—๐Ÿฐ (๐—๐—ฎ๐˜ญ๐™ ) 14:44, 28 January 2021 (UTC)[reply]

Question

I have noticed that when I use this tool on my talk page it sends all of the discussions to archive 1. How do I send them to archive 2? Scorpions13256 (talk) 01:12, 3 May 2021 (UTC)[reply]

@Scorpions13256: I believe you'll need to add Template:Archive basics to set the page to archive to. --Funandtrvl (talk) 19:47, 28 June 2021 (UTC)[reply]
Already taken care of. Thanks. Scorpions13256 (talk) 19:48, 28 June 2021 (UTC)[reply]

Not working

On my .js page, I installed importScript('User:Technical 13/Scripts/OneClickArchiver.js'); // Backlink: User:Technical 13/Scripts/OneClickArchiver.js, cleared cache, then went to a talk page, chose a topic to archive, pressed 'edit', highlighted the section, and expected to see a tool appear in the left margin where I have other tools. Nothing new was there, and no archiving functions appeared available. Repair thoughts? Thanks. Zefr (talk) 01:11, 5 September 2023 (UTC)[reply]

This script has a fork that is more up-to-date and less buggy. Try User:Evad37/OneClickArchiver.js โ€“Novem Linguae (talk) 01:35, 5 September 2023 (UTC)[reply]
Thanks. Uninstalled the Tech13 archiver and installed Evad37, cleared cache, and tried to archive a talk page topic. Still no new archive tool showing. I'm using Chrome OS 103.0.5060.132 (Official Build) (64-bit). Perhaps that's the issue? Zefr (talk) 02:10, 5 September 2023 (UTC)[reply]
I went to a newer PC with Chrome OS Version 114.0.5735.239. No new archive tool showing. Zefr (talk) 02:17, 5 September 2023 (UTC)[reply]
I think I found the problem by copy pasting your common.js into mine and looking at the WP:CONSOLEERRORs. Try changing importscript('form[action*="action=purge"]').submit(); to importScript('form[action*="action=purge"]').submit();. Note that the "s" in importScript needs to be capitalized. Hope this helps. โ€“Novem Linguae (talk) 02:48, 5 September 2023 (UTC)[reply]
Thanks again. All procedures followed and cache cleared, but still no archive tool. Appreciate your assistance, but I'll let this rest for now. Zefr (talk) 04:25, 5 September 2023 (UTC)[reply]
I don't see the fix I mentioned above in the diff history of your common.js file. I'm like 99% sure that's the fix. Want me to just make the change for ya? โ€“Novem Linguae (talk) 04:51, 5 September 2023 (UTC)[reply]
In my .js list, I have importScript('User:Evad37/OneClickArchiver.js'); // Backlink: User:Evad37/OneClickArchiver.js which is directly from the install and is the same format as others in use. If you see an error, please fix it. Thanks again. Zefr (talk) 13:56, 5 September 2023 (UTC)[reply]
This diff is the fix I thought would fix things. Turns out that particular line was still buggy. I went ahead and commented out the line. Try it nowย :) โ€“Novem Linguae (talk) 18:31, 5 September 2023 (UTC)[reply]
The archiving function is visible and working, as are a couple of other scripts I had requested. Thanks, Novem Linguae! I had installed the purge script and don't know why that one affected the others. Is there a short answer? Zefr (talk) 18:56, 5 September 2023 (UTC)[reply]
It affected the others because it had a syntax error. A syntax error in the common.js file will break the entire common.js file. The syntax for the purge script doesn't make sense. importScript() will only accept a wikipage title, not JQuery/CSS. Where'd you get the code from? Perhaps it was copied incorrectly? โ€“Novem Linguae (talk) 19:01, 5 September 2023 (UTC)[reply]
Easy to understand once simply explainedย ;>) I believe the script came as a suggestion from the Village Pump when I asked why my history counter had stopped working, [User Wikipedian For|year=2005|month=04|day=17], possibly needing an auto-purge to refresh each day as it had done reliably for years. Is there a way a syntax error in a .js file affects a user page command? Zefr (talk) 19:09, 5 September 2023 (UTC)[reply]
This discussion? Wikipedia:Village pump (technical)/Archive 205#Auto-updating activity counter. I agree with the editor that responded in that discussion that your page was probably never auto purging. An edit to a page may trigger a purge though. If you were editing the page a lot perhaps that was purging it in the background. WP:PURGE probably has the purge logic/algorithm in there somewhere if you want to research it more. โ€“Novem Linguae (talk) 23:45, 5 September 2023 (UTC)[reply]
The script you inactivated is on the WP.PURGE page, and reminds me that I took it from there, and installed it with no error showing on my .js page.
Having a daily-updated history was never an important problem to solve, but rather one I felt I should try to understand out of coding interest. I have not edited my user page very often, but am confident in saying that the history calendar on my page and others I had seen over the years was updating regularly, if not daily (was correct each time I checked, sometimes daily out of curiosity).
Why/how could it not update daily? What is its timer or trigger to activate if the page isn't edited?
After I edited my page in April this year, the calendar became stuck and did not do daily updates again even over many days. Manual purging or a null edit is successful.
It leaves me wondering if a change in layout on my user page had introduced a bug and interrupted what had been a long-term accurate function, which is why I asked at the Pump.
Again, this is more a matter of curiosity than importance, but I do appreciate your patience and insight. Zefr (talk) 00:57, 6 September 2023 (UTC)[reply]

I think this is the diff where you first added the script. It has two syntax errors (the lowercase s, and the fact that it's trying to import JQuery/CSS syntax rather than a wikipage). I think it likely this script never worked, and it probably broke at a minimum everything in the common.js file that came after it, and possibly the entire common.js file. The reason it did not work is that you copy pasted only a portion of the 4 lines of JavaScript code, and you also changed the $ to importscript. If you were to copy paste all 4 lines, it would likely do what it says, which is to auto click the "Purge" button for you when visiting any purge page such as https://en.wikipedia.org/w/index.php?title=User:Zefr&action=purge. However this doesn't seem to be what you want. If I'm understanding you correctly, you want something more like a bot that visits your page daily and purges it for you. โ€“Novem Linguae (talk) 01:25, 6 September 2023 (UTC)[reply]

That was a mess I made of the purge script - thanks for explaining. I copied the history calendar from another editor years ago, and see it used currently by many editors. So, the daily purging bot would best apply universally if it could detect the counter on any user page and run by the UTC clock. I know this would be a low-priority coding effort, so haven't asked for it at the Pump. Zefr (talk) 03:44, 6 September 2023 (UTC)[reply]
A bot to auto purge pages exists. I forget if it's still broken or if it was repaired. Some relevant pages are User:ProcBot/PurgeList (edit it to see the invisible data) and Wikipedia:Bots/Requests for approval/ProcBot 5. โ€“Novem Linguae (talk) 03:50, 6 September 2023 (UTC)[reply]