MediaWiki talk:Gadget-aWa.js

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Thank you![edit]

@Kephir Thank you for creating this badly needed piece of automation! (which you seem to have named after the notorious Wonderfool). I noticed some strange bugs, but it looks like you noticed them as well. --WikiTiki89 07:43, 11 March 2014 (UTC)[reply]

Minor bug[edit]

When creating additional links to an archived page (for example Talk:fortississimo), if page that will contain the actual archive (Talk:fortissimo) does not exist, then it needs to be created before any page that will link to it, otherwise it will create a redlink that needs to be fixed with a null edit. --WikiTiki89 10:55, 3 April 2014 (UTC)[reply]

As the cliché goes, patches welcome. Also, a regular purge will suffice. Though I agree that this is a bit of a nuisance. There should probably be two page-saving queues, one for archiving proper, the other for creating backlinks; right now all page saves are done simultaneously. On the other hand, I guess this will lead to some code duplication. Keφr 14:57, 3 April 2014 (UTC)[reply]
What regular purge? Also, there shouldn't be any code duplication if this is done right. --WikiTiki89 19:50, 3 April 2014 (UTC)[reply]
?action=purge. Keφr 20:11, 3 April 2014 (UTC)[reply]

Pipe character bug[edit]

See this diff. When archiving, pipe characters in the main text, but not in templates, must be escaped (such as by using {{!}}). It might be difficult to fix this since it would require parsing templates and links in order to ignore their pipe characters. --WikiTiki89 20:04, 3 April 2014 (UTC)[reply]

It will be tricky indeed. Doing it properly will probably require completely overhauling the page-processing code. But I have got an idea already… Keφr 20:23, 3 April 2014 (UTC)[reply]
User:Wikitiki89: Fixed, in that the markup will now render as intended (although it may look awkward). Though on reflection we could have avoided all that by simply splitting the archiving templates into "top" and "bottom" parts… Keφr 08:43, 4 April 2014 (UTC)[reply]

Praise and a bug report[edit]

This gadget keeps getting better. :) I was particularly happy to see that the green window now uses a scroll bar rather than extending in length indefinitely; this is letting me archive a bunch of stuff all at once to clean out WT:RFVA. However, in diff, it marked the discussion as "RFV-passed", when in fact it was "RFV-failed". Any idea why? Ignore the fact that the discussion had already been archived to the page manually by someone else before it was archived again by me; that was human error all around. It did the same thing here, here and here, but got a lot of other pages I did at the same time right, e.g. this was fine, as was this. I understand that it's mostly my fault for not clicking the correct "result" button in the green window before archiving the discussions, but it's still odd that the gadget guesses the result correctly in some cases but not others. - -sche (discuss) 03:18, 1 September 2014 (UTC)[reply]

It detected the discussion as "failed" when the first link (in the detected list of pages under discussion) was a redlink, and as "passed" otherwise. I changed it so that it now looks for the last emboldened passage in the discussion section, and checks if it contains "kept"/"passed" or "deleted"/"failed". Should be good enough for our purposes. Keφr 07:57, 1 September 2014 (UTC)[reply]

"Citations talk" namespace[edit]

If a page in the "Citations" namespace is RFDed, upon the archival of that discussion, aWa seems to automatically direct it to the "Citations talk" namespace rather than that page's talk page as it should. For example, when Citations:gʼlazt was RFDed, the archived discussion was located at Citations talk:gʼlazt until I moved it to Talk:gʼlazt just today. I've had to vacate other pages in this namespace before, but can't remember which ones to use as examples. "Citations talk" is a namespace that exists on Wiktionary for technical reasons only, cannot be seen unless specifically searched for, cannot be edited by anyone but administrators (apparently), and should therefore never be used for any reason.

As I don't know any JavaScript (yet), is it possible that someone may fix this minor bug? PseudoSkull (talk) 19:47, 17 August 2020 (UTC)[reply]

@PseudoSkull: The code is super complicated and I don't fully understand it, but the lines with the like of title.namespace |= 1; seem to be changing a namespace number to a talk namespace number, so they might be the right places to fix this problem. I think I'll take another look at it later. — Eru·tuon 06:31, 18 August 2020 (UTC)[reply]