Wikipedia:Bots/Requests for approval/RonBot 12
- 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: Ronhjones (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 23:23, Monday, October 15, 2018 (UTC)
Function overview: Tags pages that have broken images, and sends a neutral message to the last editor.
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python
Source code available: User:RonBot/12/Source1
Links to relevant discussions (where appropriate): Request at Wikipedia:Bot_requests#CAT:MISSFILE_bot by KatnissEverdeen
Edit period(s): Twice daily.
Estimated number of pages affected: on average, we estimate 70 articles a day are affected, so that will be 70 articles and 70 talk pages.
Namespace(s): Articles, User Talk space
Exclusion compliant (Yes/No): Yes
Function details:
- Step 1 - Bot will get the list of articles at Category:Articles with missing files. It will check for the presence of {{BrokenImage}}. If not present, then it will (a) Add that template
, and (b) add {{Broken image link found}} to the talk page of the last editor. NB:This message will be adjusted for the first runs as the time from the broken image to the last edit might be while - it will be better when up to date. - Step 2 - Bot will get the list of articles
at Category:Wikipedia articles with bad file links (i.e. pages containing {{Broken image}})with {{BrokenImage}}. It will check that the page is still in Category:Articles with missing files - if not, it will remove the template- this allows for cases where some other action (e.g. image restored) has fixed the problem, without the need to edit the article.
Discussion
edit- I'm not sure leaving a TP message with the last editor is a good idea. I can think of several scenarios where the last editor might not have had anything to do with the image link breaking. I'd really like to hear other opinions on this. SQLQuery me! 04:31, 16 October 2018 (UTC)[reply]
- I'm actually Coding... to message the user who broke the link Galobtter (pingó mió) 06:23, 16 October 2018 (UTC)[reply]
- {{BOTREQ}} ping Ronhjones Galobtter (pingó mió) 10:08, 16 October 2018 (UTC)[reply]
- If a file is deleted (here or on Commons), then it may take several months until a page using the file shows up in Category:Articles with missing files. Whenever someone edits the page the next time, it immediately shows up in the category. Deleted files are typically removed from articles by bots, but they sometimes fail.
- As a first step, I propose that you generate a database report of broken images (use Wikipedia's imagelinks table to find file use and then Wikipedia's+Commons's image tables to see if the file exists) and then purge the cache of those pages so that the category is updated. Also consider purging the cache to all pages in Category:Articles with missing files as files might not otherwise disappear from the category if a file is undeleted.
- If the file is missing because it was deleted, then the latest editor to the article presumably doesn't have anything to do with this. I think that {{Broken image link found}} risks confusing editors in this situation. Consider reformulating the template.
- Category:Wikipedia articles with bad file links seems to duplicate Category:Articles with missing files so I suggest that we delete Category:Wikipedia articles with bad file links and change {{Broken image}} so that the template doesn't add any category.
- This is bad code:
if "{{Broken image}}" not in pagetext:
- Someone might add the template manually as {{broken image}} or some other variant and then you would add the template a second time. Consider asking the API if the template appears on the page instead of searching for specific wikicode. If the bot is unable to remove the template because of unusual syntax, then it may be a good idea if the bot notifies you in one way or another. --Stefan2 (talk) 10:23, 16 October 2018 (UTC)[reply]
- Using mw:API:Templates for the existence of {{Broken image}} would seem the better way of doing it.
use Wikipedia's imagelinks table to find file use and then Wikipedia's+Commons's image tables to see if the file exists
With 10s millions of files in each table I wonder how feasible doing that would be. Galobtter (pingó mió) 11:02, 16 October 2018 (UTC)[reply]- Also, the issue with deleted files would seem resolved once Wikipedia:Bots/Requests_for_approval/Filedelinkerbot_3 goes through Galobtter (pingó mió) 12:46, 16 October 2018 (UTC)[reply]
{{BotWithdrawn}} In view of the better system by Wikipedia:Bots/Requests_for_approval#Galobot_2 - I'll delete the unneeded cats and templates. Ronhjones (Talk) 22:39, 16 October 2018 (UTC)[reply]
Restart
editI have undone the withdraw at the request of Galobtter. But I have cut down the actions to a simple tagging (and de-tagging) of images based on the Category:Articles with missing files as requested. User pages will not be edited. The {{BrokenImage}} no longer generates a categorisation - instead I have used mw:API:Templates to find the list of transclusions (and removed the space in the template name to make life easier). Also removed the If "X" not in Y, for a better match code. Ronhjones (Talk) 22:53, 17 October 2018 (UTC)[reply]
- If
{{BrokenImage}}
no longer categorizes an article, then why add it? Also, pages which already have many maintenance templates will suffer from increased instruction/template creep. -FASTILY 07:39, 22 October 2018 (UTC)[reply]- @Fastily: Galobtter suggested it will still be useful - Special:Diff/864517326. It will highlight the fact that there is a broken image link. Passing editors may not realise there is a broken link otherwise - not all editors will be showing hidden categories (where Category:Articles with missing files is located), and how many editors will check the categories anyway? Ronhjones (Talk) 21:40, 22 October 2018 (UTC)[reply]
- With all due respect,
{{BrokenImage}}
states an obvious fact and does not even add a dated maintenance category. IMO, this does not improve the editor/reader experience. Given that maintenance tags are frequently ignored and/or annoying to editors (evidenced in discussions such as this), mass-tagging articles with yet another maintenance tag isn't a good task for a bot. -FASTILY 01:41, 15 November 2018 (UTC)[reply]- I find myself agreeing with Fastily in this case; if there is no maintenance category (dated or otherwise) then it will do no more good than simply having the page already in CAT:MISSFILE. With the notification aspect out of the way, I wonder the presence of the tag will do any good.
- Would you be willing to run the bot for say a week, and record how many pages fall into Task #1 and Task #2? In other words, I'd be interested to see if the presence of the template actually changes the category population (assuming KatnissEverdeen et al hold off on patrolling it). Primefac (talk) 21:36, 16 December 2018 (UTC)[reply]
- @Primefac: Sounds like an interesting trial. Just let me know when to start Ronhjones (Talk) 00:01, 17 December 2018 (UTC)[reply]
- P.S. I see the cat is down to 3 items at present. Ronhjones (Talk) 00:11, 17 December 2018 (UTC)[reply]
- Indeed. I'll wait to see what Sam Sailor and Katniss have to say, since obviously if they're patrolling the page during the trial it will mess with the numbers (i.e. they're checking the cat directly so the template won't matter much to them). Primefac (talk) 00:30, 17 December 2018 (UTC)[reply]
- P.S. I see the cat is down to 3 items at present. Ronhjones (Talk) 00:11, 17 December 2018 (UTC)[reply]
- @Primefac: Sounds like an interesting trial. Just let me know when to start Ronhjones (Talk) 00:01, 17 December 2018 (UTC)[reply]
- With all due respect,
- @Fastily: Galobtter suggested it will still be useful - Special:Diff/864517326. It will highlight the fact that there is a broken image link. Passing editors may not realise there is a broken link otherwise - not all editors will be showing hidden categories (where Category:Articles with missing files is located), and how many editors will check the categories anyway? Ronhjones (Talk) 21:40, 22 October 2018 (UTC)[reply]
- I have not been patrolling CAT:MISSFILE for a long while. I will gladly revisit the cat occasionally in the future, and will not be interfering with a trial. Sam Sailor 08:36, 17 December 2018 (UTC)[reply]
- Hi, I can stop patrolling for again, however I would suggest adding a notice on CAT:MISSFILE while the trial is going on just in case any of the few others that randomly look at it come along. Cheers KylieTastic (talk) 09:52, 17 December 2018 (UTC)[reply]
- I can also stop patrolling for a week or so. I agree that adding a highly visible notice at CAT:MISSFILE while the trial is going on would be very useful. - tucoxn\talk 15:30, 17 December 2018 (UTC)[reply]
- Hi, is the bot actually doing anything? The template does not appear to be used anywhere and I can not see any edit summaries that indicate any task 12 action. (CAT:MISSFILE up to 100). Regards KylieTastic (talk) 12:37, 22 December 2018 (UTC)[reply]
- KylieTastic, to start the one week trial Ronhjones will need approval from a BAG member like Primefac. Galobtter (pingó mió) 14:11, 22 December 2018 (UTC)[reply]
- Approved for trial (7 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Apologies for the delay; I'll add a note to the category. At this exact point there are 104 pages in the category, and I'd like to see some sort of running tally (maybe daily?) once the run starts of what the category count looks like just to get an idea of whether it's having an appreciable affect. Primefac (talk) 15:58, 23 December 2018 (UTC)[reply]
- OK, I'll fix the code to log category size and the changes before I start. Ronhjones (Talk) 13:49, 25 December 2018 (UTC)[reply]
- Trial results are being documented at User:RonBot/12/Trial - it's a rough table from Excel (pasted into Dreamweaver, and then the HTML code pasted into wiki page) Ronhjones (Talk) 16:32, 28 December 2018 (UTC)[reply]
Trial complete. Results at User:RonBot/12/Trial. The overall category only increased by less than 40 over the week, this was less than I expected which I think is a good sign - I thought ca.100 was the normal weekly increase when the regulars don't edit. The Bot added 361 BrokenImage templates. It removed 90 templates. 118 Templates were removed by other editors. I suspect a proportion of the 90 that the bot removed were down to lost commons images - the commons delinker bot waits for a while before delinking (thus allowing us expert commons admins to realise we shouldn't have deleted it - not that I would of course), and can get a little backlogged if a commons admin goes on a deleting purge. So my overall view is that it has has a positive impact - possibly by triggering watchlists of editors who have just edited the page. Ronhjones (Talk) 17:44, 1 January 2019 (UTC)[reply]
- @Primefac: NB: I've restated the bot, but with the tagging part disabled - I had reports that there were pages fixed, and the BrokenImage template was still there - it will only remove the template from fixed pages. Ronhjones (Talk) 17:05, 2 January 2019 (UTC)[reply]
- Keep the records, I'd be interested to see what the numbers look like without the bot running. Primefac (talk) 23:09, 3 January 2019 (UTC)[reply]
- @Primefac: is that with or without the normal patrolling? KylieTastic (talk) 19:02, 4 January 2019 (UTC)[reply]
- You can patrol the cat as usual. Primefac (talk) 19:18, 4 January 2019 (UTC)[reply]
- @Primefac: I've kept updating User:RonBot/12/Trial, and it started to increase, until they started patrolling the category and of course it's now plummeted to a low number. Ronhjones (Talk) 15:36, 9 January 2019 (UTC)[reply]
- @Primefac: is that with or without the normal patrolling? KylieTastic (talk) 19:02, 4 January 2019 (UTC)[reply]
- Keep the records, I'd be interested to see what the numbers look like without the bot running. Primefac (talk) 23:09, 3 January 2019 (UTC)[reply]
{{BAGAssistanceNeeded}} I've ceased updating records post 11th Jan, as the numbers do not mean anything, as the normal patrolling has been resumed (see above). Can we move forward with this request? Ronhjones (Talk) 20:23, 19 January 2019 (UTC) Approved. Primefac (talk) 14:16, 20 January 2019 (UTC)[reply]
- 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.