Wikipedia:Bots/Requests for approval/Monkbot 16
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Approved.
Operator: Trappist the monk (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 13:03, Tuesday, September 3, 2019 (UTC)
Function overview: replaces |dead-url=
and |deadurl=
in cs1|2 template with |url-status=
Automatic, Supervised, or Manual: automatic
Programming language(s): awb c++
Source code available: User:Monkbot/task 16: remove replace deprecated dead-url params
Links to relevant discussions (where appropriate): Help talk:Citation Style 1#update to the cs1|2 module suite after 2 September 2019 and discussion linked from there
Edit period(s): as often as required to clear Category:CS1 errors: deprecated parameters
Estimated number of pages affected: many upon many
Namespace(s): all that cs1|2 categorizes
Exclusion compliant (Yes/No): yes
Function details: details available at User:Monkbot/task 16: remove replace deprecated dead-url params
Discussion
- It seems a change to Module:Citation/CS1 has caused ref errors to generate all over the project, which several editors are upset about (see WP:AN#Is there a semi-automated tool that could fix these annoying "Cite Web" errors?). If this bot is a step in repairing those errors, please expedite this request. Ivanvector (Talk/Edits) 13:43, 3 September 2019 (UTC)[reply]
- I take that "dead-url=yes" will be replaced as "url-status=dead" and similar? Regarding Ivanvector's point, it seems like this bot is meant to update the templates to bring them in line with the new template parameters. Jo-Jo Eumerus (talk, contributions) 13:50, 3 September 2019 (UTC)[reply]
- Yes:
|dead-url=yes
→|url-status=dead
|dead-url=no
→|url-status=live
- this bot task could not have been run before the implementation of today's changes because the cs1|2 module suite did not know about
|url-status=
. - —Trappist the monk (talk) 14:20, 3 September 2019 (UTC)[reply]
- I've done a manual search-and-replace on a handful of pages and can confirm that this change does resolve the new errors regarding deprecation of
|dead-url=
. FWIW. Although I don't know how it will respond to errors where someone has put the URL itself as the parameter (i.e.|dead-url=https://www.offline.website/
). Ivanvector (Talk/Edits) 14:41, 3 September 2019 (UTC)[reply]- I reviewed the given source code and I think there are test cases that should be cleared before running further. For the http example you gave, I think it will be kept as is, just renamed to url-status. I don't know if the template will then give an error due to the incorrect parameter, but I think it is an ok way to handle it for this run, unless there is already now time and interest to decide that all illegal values should be rewritten according to some rule. These errors I hope would be only few, so main prio is to make sure that the bot doesn't destroy anything unknowingly. JAGulin (talk) 20:24, 3 September 2019 (UTC)[reply]
- Correct; parameter name changes but parameter value is retained (it was wrong before the bot fix and will likely be wrong after the bot fix). The bot will only change known good parameter values to the new parameter values.
- —Trappist the monk (talk) 13:11, 5 September 2019 (UTC)[reply]
- I reviewed the given source code and I think there are test cases that should be cleared before running further. For the http example you gave, I think it will be kept as is, just renamed to url-status. I don't know if the template will then give an error due to the incorrect parameter, but I think it is an ok way to handle it for this run, unless there is already now time and interest to decide that all illegal values should be rewritten according to some rule. These errors I hope would be only few, so main prio is to make sure that the bot doesn't destroy anything unknowingly. JAGulin (talk) 20:24, 3 September 2019 (UTC)[reply]
- I've done a manual search-and-replace on a handful of pages and can confirm that this change does resolve the new errors regarding deprecation of
- Yes:
- The red warning message should be suppressed immediately, until this bot has completed its run, then re-enable. We have over 2 million archive links (less in CS1|2), it is unnecessary to upset the community with a large volume red warning messages. -- GreenC 14:51, 3 September 2019 (UTC)[reply]
- Sure, but that's not really a question for this page; WP:AN and Help talk:CS1 would be where that suggestion has been made already. Jo-Jo Eumerus (talk, contributions) 14:59, 3 September 2019 (UTC)[reply]
- Not a function of this bot task and already done in the cs1|2 module suite.
- —Trappist the monk (talk) 13:11, 5 September 2019 (UTC)[reply]
- I have manually run the bot task on 50 pages; see Special:Contributions/Monkbot.—Trappist the monk (talk) 15:07, 3 September 2019 (UTC)[reply]
- I recommend that this bot not be approved until Wikipedia:Administrators' noticeboard#Proposal to overturn the mass change made to Module:Citation/CS1 has concluded as the closed discussion may effect the usefulness of this bot. - Knowledgekid87 (talk) 15:23, 3 September 2019 (UTC)[reply]
- A couple of questions:
- How does your bot handle <!-- html comments --> within citations? If not at all, what do you think it should do, if anything?
- If the
|website=
param exists already but has an invalid value, does the bot change it in any way? - What happens with
|deadurl=May 2016
or other invalid values?
- Thanks, Mathglot (talk) 22:04, 3 September 2019 (UTC)[reply]
- I'm not responsible for the code, but I had a look at it and may be able to answer. Please add suggested test cases here if you have worries or just want to confirm proper behavior. Test cases can be made up, but if you have actual example pages/references, that may be even better.
- There seems to be no special treatment of comments. It should be retained as is, but if the comment itself mentions dead-url it will probably be modified. I think the code will not see the comment as "blank", so an empty parameter having a comment should be kept. I think this behavior, apart from editing within comments, is as intended. It should be properly tested.
- As of now, this change is all about replacing dead-url, and existing url-status parameters are kept. This may introduce duplicate parameters with conflicting value, but I think that's ok for a first step. In effect website parameters are not touched and is not part of the task. The slight deviation from this truth is that any empty parameter will be removed, this may remove an empty website parameter, but not one with another illegal or legal value.
- The steps in the description are clear if you know how to interpret them. Your example will result in url-status=May 2016, which is equally illegal. This should be a good first step, those errors can be left for manual evaluation or be the target of another bot run later.
- My test cases showed a problem with corruption in some cases, but that has been fixed now. More unit testing is probably a good idea. Even if those constructions should be rare, it's better to make only careful changes than to have to find the corruption later. JAGulin (talk) 06:29, 4 September 2019 (UTC)[reply]
-
- Whenever the bots detect an html comment inside a cs1|2 template, it will skip that template; fixes will not be made. This task is not about
|website=
or any other periodical parameter.|deadurl=May 2016
will be changed to|url-status=May 2016
;May 2016
was an invalid value for|dead-url=
so the bot cannot know what to do with it.
- Whenever the bots detect an html comment inside a cs1|2 template, it will skip that template; fixes will not be made. This task is not about
-
- Testcases described here and at Editor JAGulin's test cases are show in this diff.
- —Trappist the monk (talk) 13:11, 5 September 2019 (UTC)[reply]
- Trappist the monk, wikicomments inside templates are common (usually left by old bots), could result in a lot skipped. -- GreenC 14:24, 5 September 2019 (UTC)[reply]
- Yep, could be. If that becomes a problem, we can worry about it later. Two out of 102 pages processed is a hair over 2% (this is a very small sample). Are you going to block this BRFA because this task skips templates with html comments?
- —Trappist the monk (talk) 14:31, 5 September 2019 (UTC)[reply]
- Honest question: how difficult would it be to hide wikicomments inside a template, make the change, restore the wikicomment? -- GreenC 14:39, 5 September 2019 (UTC)[reply]
- Trappist the monk, wikicomments inside templates are common (usually left by old bots), could result in a lot skipped. -- GreenC 14:24, 5 September 2019 (UTC)[reply]
- Comment: Please ensure that the bot correctly processes parameter values that are invalid due to upper-case letters, e.g.
|dead-url=No
, as in Old revision of Chief of the Air Staff (India). Thanks. – Jonesey95 (talk) 17:48, 4 September 2019 (UTC)[reply]- As far as the bot is concerned, case of keywords in
|dead-url=
is ignored. - —Trappist the monk (talk) 13:11, 5 September 2019 (UTC)[reply]
- As far as the bot is concerned, case of keywords in
- Approved for trial (100 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Primefac (talk) 11:08, 5 September 2019 (UTC)[reply]
- Trial complete. results at Special:Contributions/Monkbot. Nothing untoward noticed. The task skipped Ad valorem tax and Ad hominem because of html comments in
|archivedate=
(DASHBot signature). - —Trappist the monk (talk) 14:21, 5 September 2019 (UTC)[reply]
- Approved. Primefac (talk) 15:19, 5 September 2019 (UTC)[reply]
- Trial complete. results at Special:Contributions/Monkbot. Nothing untoward noticed. The task skipped Ad valorem tax and Ad hominem because of html comments in
- The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.
- For the record, the bot behavior for "html comments" and "case sensitivity" were modified in response to the questions. This was after trial permission but before the trial report. JAGulin (talk) 10:27, 7 September 2019 (UTC)[reply]