Module talk:Disambiguation

Plain DISAMBIG magic word
I just had a look over this module's code, and it seems to be missing the case when a user specifies a plain  magic word without using a template. I'm not sure how many disambiguation pages actually do this, but it's probably worth putting it in. Best — Mr. Stradivarius  ♪ talk ♪ 04:23, 20 October 2020 (UTC)
 * About 7 pages according to this search, most of which already have a disambiguation template. But yeah, probably still worth checking for it. - Evad37 &#91;talk] 23:16, 20 October 2020 (UTC)
 * ✅ - Evad37 &#91;talk] 22:47, 25 October 2020 (UTC)
 * Thanks! — Mr. Stradivarius  ♪ talk ♪ 11:59, 29 October 2020 (UTC)

Not working?
&mdash; Martin (MSGJ · talk) 22:37, 21 October 2020 (UTC)
 * Abbas Kola is a dab-page
 * Kamenitsa is a dab-page
 * List of schools in Ireland is a dab-page
 * Kamenitsa is a dab-page
 * List of schools in Ireland is a dab-page
 * List of schools in Ireland is a dab-page
 * can any improvement be made here? &mdash; Martin (MSGJ · talk) 20:05, 25 October 2020 (UTC)
 * , was missing the geodis and schooldis templates - Evad37 &#91;talk] 22:47, 25 October 2020 (UTC)
 * Thanks! I'll do a bit more testing, then look to implement this module in the class mask template &mdash; Martin (MSGJ · talk) 12:46, 26 October 2020 (UTC)

Found another few: &mdash; Martin (MSGJ · talk) 18:14, 26 October 2020 (UTC)
 * K7 is a dab-page
 * 2600 is a dab-page
 * Lost Battalion is a dab-page
 * 2600 is a dab-page
 * Lost Battalion is a dab-page
 * Lost Battalion is a dab-page

I tried to add mil-unit-dis to the module and failed miserably. Please can someone help with this? &mdash; Martin (MSGJ · talk) 12:11, 29 October 2020 (UTC)
 * Sandbox:
 * 2600 -> (numberdis)
 * K7 -> (Letter-Number Combination Disambiguation)
 * Lost Battalion -> (mil-unit-dis).
 * Something to do with the pattern looking for dashes earlier in the list? --Izno (talk) 15:47, 29 October 2020 (UTC)
 * (Maybe. Moving mil-unit-dis doesn't fix it. --Izno (talk) 15:50, 29 October 2020 (UTC))
 * The dashes need escaping with %, which I have now done &mdash; Martin (MSGJ · talk)

Set index article
A set index article is not a dab page, but I think it might be useful to be able to detect them, whether with this module or a different one &mdash; Martin (MSGJ · talk) 18:13, 26 October 2020 (UTC)
 * War of independence is a set index article
 * War of independence is a set index article

Tracking
Category:Disambiguation pages not detected by Module:Disambiguation lists pages which are tagged with WikiProject Disambiguation but whose subject pages are not detected as being dab pages by this module. They consist of: &mdash; Martin (MSGJ · talk) 12:04, 27 October 2020 (UTC)
 * Articles: perhaps they have been converted from dab pages into articles and WikiProject Disambiguation was not removed
 * Redirects - moved to separate category Category:Redirects tagged as disambiguation pages
 * Set index articles: many of these have been tagged with WikiProject Disambiguation
 * Real dab pages, which are not yet being detected

Methodology
There are templates in Category:Disambiguation message boxes. Each one may have several redirects (e.g. Template:Place name disambiguation has 7). That is a lot of possibilities to check for, and there is nothing to stop editors creating a new template (or redirect) at any time. Is there any better approach we could take? &mdash; Martin (MSGJ · talk) 12:32, 27 October 2020 (UTC)
 * We could have a bot update a list of disambiguation templates, I suppose. — Mr. Stradivarius  ♪ talk ♪ 12:01, 29 October 2020 (UTC)
 * It might also help if I look to see which redirects are not being used much and take them to RfD. By the way, could you help me with the request above? &mdash; Martin (MSGJ · talk) 12:12, 29 October 2020 (UTC)

Templates
• Template:Disambiguation 196489

• *Template:Dab 13838

• *Template:Disamb 2095

• *Template:Disambig-plants 0

• *Template:DAB 41

• *Template:Dbig 0

• *Template:Disambig 64787

• *Template:Disambiguation page 41

• *Template:Disam 44

• *Template:Disambig misspelling 4

• *Template:Begriffsklärung 3

• Template:Dmbox 410202

• Template:Airport disambiguation 487

• *Template:Airport disambig 1

• Template:Biology disambiguation 31

• Template:Call sign disambiguation 2786

• *Template:Callsigndis 6

• Template:Caselaw disambiguation 55

• *Template:Case law disambiguation 0

• Template:Chinese title disambiguation 128

• *Template:CJKVdab 0

• *Template:Disambig-Chinese-char-title 2

• *Template:Chinese title disambig 0

• Template:Disambiguation cleanup 9

• *Template:Disamb-cleanup 0

• *Template:Cleanup disambig 0

• *Template:CleanupDisambig 0

• *Template:Dabclean 0

• *Template:Dab-cleanup 0

• *Template:Disambig-CU 0

• *Template:Disambig-cu 0

• *Template:Disambig cleanup 0

• *Template:Geodis-cleanup 0

• *Template:Disambig-cleanup 0

• *Template:Disambiguation-cleanup 0

• *Template:Disambcleanup 0

• *Template:Disambigcleanup 0

• *Template:Diaambig-cleanup 0

• *Template:Disambig-cleaup 0

• *Template:Disambig-cleanip 0

• *Template:Disambig-clenup 0

• *Template:Disambiguate-cleanup 0

• *Template:Dab cleanup 0

• *Template:Cleanup disambiguation 0

• Template:Genus disambiguation 569

• *Template:Genus disambig 1

• Template:Hospital disambiguation 127

• *Template:Hospitaldis 2

• Template:Human name disambiguation 63031

• *Template:Bio-dab 0

• *Template:Hndisambig 80

• *Template:Hndab 127

• *Template:HnDis 0

• *Template:Personal name disambiguation 1

• *Template:HNDIS 0

• *Template:Hndis 60116

• *Template:Personal name 0

• Template:Human name disambiguation cleanup 1

• *Template:Personal name disambiguation cleanup 0

• *Template:Hndis-cleanup 0

• Template:Letter disambiguation 0

• *Template:Letter disambig 0

• *Template:Letterdab 0

• Template:Letter-number combination disambiguation 4688

• *Template:Letter-NumberCombdisambig 0

• *Template:Letter-NumberCombinationDisambiguation 5

• *Template:LNCD 0

• *Template:Letter-Number combination disambiguation 1

• *Template:Letter-NumberCombDisambig 3861

• *Template:Letter-Number Combination Disambiguation 747

• Template:Mathematical disambiguation 356

• *Template:Mathematics disambiguation 1

• *Template:Mathdab 258

• *Template:Math dab 1

• Template:Military unit disambiguation 1298

• *Template:Mil-unit-disambig 10

• *Template:Mil-unit-dis 1245

• Template:Music disambiguation 4

• *Template:Music disambig 0

• Template:Number disambiguation 734

• *Template:Numdisambig 0

• *Template:Numdab 0

• *Template:Numberdis 606

• Template:Phonetics disambiguation 5

• Template:Place name disambiguation 38880

• *Template:Geodab 137

• *Template:Geo-dis 215

• *Template:Geodisambig 10

• *Template:Geodis 36603

• *Template:DisambigG 1

• *Template:DisambigGeo 0

• *Template:Disambiggeo 0

• Template:Portal disambiguation 6

• *Template:Portal disambig 6

• Template:Road disambiguation 853

• *Template:Roaddis 141

• Template:School disambiguation 3144

• *Template:Schooldis 2490

• *Template:Schooldab 11

• *Template:School disambig 0

• Template:Species Latin name abbreviation disambiguation 2148

• Template:Species Latin name disambiguation 148

• *Template:LatinNameDisambig 0

• *Template:SpeciesLatinNameDisambig 6

• Template:Station disambiguation 1506

• *Template:Station dab 0

• Template:Synagogue disambiguation 39

• Template:Taxonomic authority disambiguation 0

• *Template:Taxonomic authorities disambiguation 0

• Template:Taxonomy disambiguation 129

• *Template:Species disambiguation 0

• Template:Wikipedia disambiguation 158

• *Template:Shortcut disambig 0

• *Template:WP-disambig 0

• *Template:Meta disambig 0

• *Template:WP disambig 105

• *Template:Project disambiguation 4

Template-protected edit request on 1 October 2021
Please change  to , so that articles with Letter-number combination disambiguation are also correctly identified. rchard2scout (talk) 09:20, 1 October 2021 (UTC)
 * ✅ firefly  ( t · c ) 09:29, 1 October 2021 (UTC)

Template-protected edit request on 1 October 2021 (2)
Please add the following list of templates:

"[Mm]il-unit-disambig", "[Mm]ilitary unit disambiguation", "[Gg]eo-dis", "[Gg]eodisambig", "[Dd]isambig[Gg]eo", "[Dd]isambig[GN]", "[Dd]isambigNm", "[Dd]isambigName", "[Ss]urname", "[Ss]urnames", "[Ss]pecies Latin name disambiguation", "[Ss]peciesLatinNameDisambig", "[Ll]atinNameDisambig", "[Mm]athematical disambiguation", "[Mm]athematics disambiguation", "[Mm]athdab", "[Mm]ath dab", "[Rr]oad disambiguation", "[Rr]oaddis",

And change  to

These were found by sampling pages in Category:Disambiguation pages not detected by Module:Disambiguation, and I think they'll cover the majority of pages that are not a set list.

I'm not very proficient in Lua string patterns, so it might be possible to merge some of the items in this list with smarter regexing (which might or might not impact performance, I have no idea). rchard2scout (talk) 10:28, 1 October 2021 (UTC)
 * @Rchard2scout Could we expand all templates (Special:ExpandTemplates – which in Lua seems to be frame:preprocess) and just check for  in the expanded output? If possible, that would be accurate, though at the cost of performance. –  SD0001  (talk) 10:40, 1 October 2021 (UTC)
 * I think that would be even better. It would certainly be cleaner and less likely to break. I have no idea of the performance cost of that. You could just try it (per WP:PERF) if you think it won't cause any huge problems. --rchard2scout (talk) 10:59, 1 October 2021 (UTC)
 * I wouldn't be surprised if this broke some transclusions. When wikitext is preprocessed in a Lua module, that counts towards the total Lua execution time for the page. If this time exceeds 10 seconds, then an error is shown and no more Lua modules are processed. If the page being tested happens to be a huge article that takes several seconds to render, then there is a good chance that the original page being rendered will go over the 10-second limit, particularly if it is using Module:Disambiguation multiple times. — Mr. Stradivarius  ♪ talk ♪ 11:54, 22 October 2021 (UTC)

I have added those requested above &mdash; Martin (MSGJ · talk) 12:02, 25 October 2021 (UTC)

Template-protected edit request on 14 April 2022
Can  and   be added? Similar templates such as  and   are included. Michaelwallace22 (talk) 17:37, 14 April 2022 (UTC)
 * Given name and surname list pages are not disambiguation pages. older ≠ wiser 17:42, 14 April 2022 (UTC)
 * ❌ as there is active discussion disputing this request above. If a consensus is reached please reactivate the edit request. — xaosflux  Talk 15:50, 21 April 2022 (UTC)

Error
The module seems to identify Category:Disambig-Class biography articles as a disambiguation page (see the class rating on Category talk:Disambig-Class biography articles) probably because of the Disambig in the page title. &mdash; Martin (MSGJ · talk) 07:37, 21 April 2023 (UTC)
 * No, perhaps I'm wrong. The example below shows only the talk page is incorrectly identified &mdash; Martin (MSGJ · talk) 07:40, 21 April 2023 (UTC)

→  →

✅ The module identifies Category talk:Disambig-Class biography articles as a dab page because it contains the template WikiProject Disambiguation. This could be fixed, but it's a minor issue &mdash; Martin (MSGJ · talk) 07:54, 21 April 2023 (UTC)

Performance issues
I've been doing some work to cut down on the execution speed of this module after Module:Class mask started using it, since it's been heavily impacting the execution time of Talk:World War II (To the point of occasional timeouts). I've implemented a faster version on the sandbox, and it works as expected, cutting down the execution time from ~8.5s to ~3.5s for the above talk page, and still detects pages as expected, but when I tried using  instead of   to match how the current version works, it kills the performance. 2 Questions: Thanks. Aidan9382 (talk) 11:30, 27 April 2023 (UTC)
 * 1) How important is using  here as opposed to  ?
 * 2) Why does  impact the performance so much?


 * Thanks, that would be fantastic. There are no unicode characters in the strings being checked, so I would guess that ustring is not required here. On question 2, I suppose there are 150,000 characters to check instead of 128? By the way, I did something on Talk:World War II to improve the situation but if you need it for testing then just revert me &mdash; Martin (MSGJ · talk) 11:53, 27 April 2023 (UTC)
 * The main reason the performance impact from using mw.ustring confuses me is that testing the current live version of the module with and without mw.ustring doesn't seem to change the performance, but for the /sandbox version it does. Judging from a very quick look, it appears it might be an issue with (g)match in specific, since swapping out ustring.match for ustring.find seems to be significantly faster. I don't think it's worth converting from gmatch to some system that avoids using match just to use ustring, so I'll just use string. Thanks for the advice. Aidan9382 (talk) 12:10, 27 April 2023 (UTC)
 * 3.5s is still significant and I feel sure there are more efficient methods we could use instead of analysing the whole text of the page. How about using Module:Is instance to check if the page is an instance of ? &mdash; Martin (MSGJ · talk) 12:14, 27 April 2023 (UTC)
 * 3.5s isn't exactly accurate - thats the process speed of every module there, not just Module:Disambiguation. A more accurate measure of the change is ~6.6s to ~0.5s
 * As for implementing Module:Is instance - that probably will work, but that module in specific has only a template entry point, so I'd have to implement a solution into here or modify that module for a module entry point, and I've not used wikidata functions before, so someone else might be better for doing that. Aidan9382 (talk) 12:33, 27 April 2023 (UTC)
 * ~6.6s to ~0.5s sounds even more impressive. I'll let you deploy your version first because that is a clear improvement. Then I might experiment with using wikidata and do some comparison tests later. &mdash; Martin (MSGJ · talk) 12:40, 27 April 2023 (UTC)
 * Ustring is not required when checking for  or  . It does make a difference when checking for the disambiguation template patterns, however. With the normal string library,   will match only ASCII space characters (spaces, newlines, carriage returns, tabs, vertical tabs, and I think form feed characters). With ustring, it will match "all characters with General Category "Separator", plus tab, linefeed, carriage return, vertical tab, and form feed". This includes things like non-breaking spaces, zero-width spaces, etc. These kinds of spaces are counted as whitespace by the Mediawiki parser when parsing template syntax, so ignoring them will potentially lead to this module missing disambiguation templates. For example, it would miss   - note the full-width spaces. The number of such disambiguation template transclusions is probably going to be very small, however. As for question 2, Scribunto calls back into PHP every time you do an operation with mw.ustring. Lua doesn't handle Unicode natively, and the Scribunto developers chose to work around this by using PHP's Unicode libraries. Each time you switch between Lua and PHP there is some cross-process overhead, and this can add up if you use ustring patterns frequently. — Mr. Stradivarius  ♪ talk ♪ 12:23, 27 April 2023 (UTC)
 * Thanks. This sounds roughly like what I suspected in terms of behaviour differences. Do you know if there's a way to implement ustring here without the issue of major overhead (which is mostly coming from the single gmatch call)? I'm not overly familiar with ustring, so I'm not sure if theres anything special possible there. I don't suspect this to be a major issue (I've never personally ran into a template with abnormal whitespace, and don't imagine they're common either) so I may deploy the string version anyways, but having this fixed would still be nice. Aidan9382 (talk) 12:42, 27 April 2023 (UTC)
 * I don't think there is a way to make ustring itself faster. There are some things you could tweak in your algorithm, though. At the moment you are finding the names of all the templates on the page, then checking each name to see if it matches one of the patterns. Instead, you could check each pattern each time you found a new template name. If you find a match, then this would mean you wouldn't have to check any of the other templates on the page.


 * In practice, this probably won't make too much difference, however, as disambiguation templates are usually at the end of the page. If you made a custom gmatch function that searches from the end of the string to the start of the string, then this might result in a speed-up. Having said that, the original gmatch is written in C, and the custom one would be in Lua, so if there are no disambiguation templates on a page, there is a good chance that this will be slower. If you do decide to do more work on performance for this module, you should measure everything to find out what works and what doesn't. — Mr. Stradivarius  ♪ talk ♪ 02:15, 29 April 2023 (UTC)

Using Wikidata
In the sandbox is a version which will look at to see if the page is a disambiguation page. It isn't foolproof (as there are a few pages not correctly identified) but it might be an efficient thing to check before analysing the content of the page. &mdash; Martin (MSGJ · talk) 15:29, 15 May 2023 (UTC)


 * Would be interested to see a comparison of speeds of the sandbox vs live. (Not sure how best to test it.) &mdash; Martin (MSGJ · talk) 17:44, 15 May 2023 (UTC)
 * How I perform speed tests is to fire a template call a bunch of times (Like this), and to compare the "Lua time usage" stat in show preview on both the live and sandbox version. Using an #invoke: with isDisambiguationPage, the time difference (from live to sandbox) appears to be from 0.09s to 0.25s on a non-disambiguation page (Peter Dulley) and 0.07s to 0.11s for a disambiguation page (Example), though timings are a bit give or take due to how much they fluctuate. I didn't think that the sandbox would be slower, so I wonder where most of the time impact is coming from. Aidan9382 (talk) 18:06, 15 May 2023 (UTC)
 * Interesting - so no benefit at all then. &mdash; Martin (MSGJ · talk) 21:50, 15 May 2023 (UTC)

False positives for pattern [%w_%s]-%f[%w][Dd]isam[%w]-
The pattern  matches italic disambiguation, which is not a disambiguation template. (See the comment about fictional character pages here.) This pattern seems overly broad - can it be made more specific? — Mr. Stradivarius  ♪ talk ♪ 02:10, 30 August 2023 (UTC)
 * Partly fixed: those characters are now . However, they're also still ; is that correct? Certes (talk) 10:33, 30 August 2023 (UTC)
 * I made an edit for this to the sandbox: which leaves the regex pattern but adds a false positives list that then gets checked against; will wait for someone who is more familiar with the template/Lua to promote. -- Pres  N  12:35, 30 August 2023 (UTC)
 * Thanks. Given Lua's limited implementation of regexp, I think an exception list is the best we can do. Certes (talk) 18:07, 30 August 2023 (UTC)
 * Okay, I added some more testcases to the test page to cover this and other use cases, and I felt confident enough to promote. Ping me if there are any issues. -- Pres N  21:32, 30 August 2023 (UTC)

This and all patterns match templates even within &lt;--HTML comments-->. That causes pages such as Interstate 10 to be categorised as dabs. (Such pages have commented dab templates to fool Popups into providing certain features which are useful there but normally reserved for dabs.) Is it desirable and possible to ignore templates within comments? Certes (talk) 18:15, 31 August 2023 (UTC)
 * In terms of possibility, Module:Wikitext Parsing.PrepareText exists, which cleans the contents of elements like HTML comments and nowiki tags with mw.text.nowiki, preventing them from being picked up as templates, though it does have a slight performance impact. Aidan9382 (talk) 20:06, 31 August 2023 (UTC)

Surnames
Why is  in the template list, causing   to return "yes" for a surname? Surname pages are set index articles, not disambiguation pages. Given name articles do not display this behaviour. (Hndis is correctly included, because full name lists are dabs, though we should really also add its widely used redirect Hndab.) Certes (talk) 18:06, 30 August 2023 (UTC)

Pages broken
every page with a WikiProject template seems to be broken as a result of your change, e.g. Talk:Basil Spence, please revert asap. – I s o chrone (T) 21:37, 30 August 2023 (UTC)

Original header: Edit request 30 August 2023

Description of suggested change:

Revert. It seems to be breaking headers on many pages, e.g. Talk:Congregation B'nai Jacob (Woodbridge, Connecticut) (may need to purge cache to see the bug). Dylnuge (Talk • Edits) 21:38, 30 August 2023 (UTC)
 * This is fixed (and I was one of three simultaneous reports); no need for further action. Closing Dylnuge  (Talk • Edits) 21:42, 30 August 2023 (UTC)

Original header: Error

@PresN, at Talk:Washington and Lee University (and several other talk pages I checked), there is an error coming from this module. Your recent edit appears to be the cause. Please revert (I will shortly if I do not hear from you) until the issue can be identified. &#123;{u&#124; Sdkb  }&#125;  talk 21:39, 30 August 2023 (UTC)
 * , given several identical reports of the issue. &#123;{u&#124; Sdkb  }&#125;  talk 21:43, 30 August 2023 (UTC)
 * I had them as well on almost every talkpage I looked at. Thank you for reverting.  Bobherry  Talk   My Edits  21:44, 30 August 2023 (UTC)

Well, I said to ping me if there were issues, so I got what I deserved. I've fixed the sandbox page, but I'll let someone else push it this time. -- Pres N  21:47, 30 August 2023 (UTC)

Error 2
Talk:Carmel Valley Historical Society is giving me

Lua error in Module:Disambiguation at line 40: assign to undeclared variable 'falsePositives'. Graywalls (talk) 21:46, 30 August 2023 (UTC)


 * It varies depending on the diff. Presently, this version has the error, but not the version after it. Graywalls (talk) 21:52, 30 August 2023 (UTC)
 * The pages' caches need to be purged. Just wait a bit or use Special:Purge. –  I s o chrone (T) 21:57, 30 August 2023 (UTC)

I'm seeing it in Template talk:Vichy France, which is occurring after the last undo of the Module:

 [C]: in function "error" strict.lua:21: ? Module:Disambiguation:40: in function "init" package.lua:103: in function "require" Module:Pagetype:18: in function "init" package.lua:103: in function "require" Module:WikiProject_banner/sandbox:109: ? (tail call): ? mw.lua:527: ? [C]: ?

Thanks, Mathglot (talk) 08:02, 1 September 2023 (UTC)
 * Never mind; worked after purge. Mathglot (talk) 08:06, 1 September 2023 (UTC)

Test cases updated
I've updated Module:Disambiguation/testcases to test all the templates in Category:Disambiguation message boxes (minus Template:Dmbox), and all of their redirects. Looking at Module talk:Disambiguation/testcases, there are currently 42 tests failing due to missing Lua patterns for these templates. Would it be a good idea to detect all of these? — Mr. Stradivarius  ♪ talk ♪ 15:24, 9 September 2023 (UTC)

Use list of all disambiguation templates and disambiguation template redirects
I have switched Module:Disambiguation/sandbox to use Module:Disambiguation/templates, a list of all disambiguation templates and their redirects. The list of disambiguation templates is taken from Category:Disambiguation message boxes, minus Template:Dmbox, the same as I used to populate Module:Disambiguation/testcases. The sandbox version passes all the test cases, and should remove the possibility of false positives like italic disambiguation. It also performs slightly better than the current version, but not so much as to make an appreciable difference. (To parse the content of Paris, the sandbox version takes an average of 0.0035s, but the current version takes an average of 0.0038s.) In the end there were 122 templates/redirects, which was not too unmanageable. The list will need to be maintained as new templates and redirects are added or deleted, but that is not too different from the situation we have now. Would it be OK to roll this change out to the main module? — Mr. Stradivarius  ♪ talk ♪ 11:28, 10 September 2023 (UTC)


 * Can we not emit some kind of invisible keyword as metadata which we could then search the content of the page for? I'm thinking there must be an easier way to do this. &mdash; Martin (MSGJ · talk) 15:05, 10 September 2023 (UTC)
 * That would work if we could access page HTML from Lua, but unfortunately we can't. Without updating MediaWiki in some way, I think listing all the disambiguation templates and their redirects is the cleanest way of implementing this module. — Mr. Stradivarius  ♪ talk ♪ 13:06, 11 September 2023 (UTC)
 * We are using some system like that in Module:Banner_shell where we emit metadata inside a span tag and then pick that up in the banner shell template. That content is passed via a parameter so I suppose it might be different to what getContent gives us? &mdash; Martin (MSGJ · talk) 13:14, 11 September 2023 (UTC)
 * As you say, that trick works because template/module parameters are preprocessed before being passed to the template or module. With getContent, we only have the raw wikitext to work with. We could, in theory, use frame:preprocess on the wikitext to expand it all, but this is time-consuming; for long pages I assume this would easily reach the 10-second Lua execution limit. — Mr. Stradivarius  ♪ talk ♪ 14:11, 11 September 2023 (UTC)
 * Fair enough, carry on then :) I was just brain-storming but assumed you would have thought through other options first. &mdash; Martin (MSGJ · talk) 14:34, 11 September 2023 (UTC)
 * As you are not around, I have deployed the new version &mdash; Martin (MSGJ · talk) 18:39, 19 September 2023 (UTC)
 * Thanks! — Mr. Stradivarius  ♪ talk ♪ 12:09, 23 September 2023 (UTC)

Set index articles detected as disambiguation pages
For example Advani says it is a set index article but  says "". Personally I'm not even sure what the difference is supposed to be, and that article looks indistinguishable from a dab page. Is there a useful distinction? &mdash; Martin (MSGJ · talk) 18:15, 19 September 2023 (UTC)
 * Never mind. Its seems the upgrade described above will solve this! &mdash; Martin (MSGJ · talk) 18:20, 19 September 2023 (UTC)

Bot for updating template list
I have written a bot to update Module:Disambiguation/templates. This should save people the trouble of having to update the template list whenever somebody adds, moves or deletes a new disambiguation template or disambiguation template redirect. I have made the source code available here - please take a look and let me know if you have any feedback. Best — Mr. Stradivarius  ♪ talk ♪ 15:33, 26 September 2023 (UTC)


 * Great job, thank you. All this work for something so simple. We really need someone to work on &mdash; Martin (MSGJ · talk) 08:49, 27 September 2023 (UTC)
 * Now submitted for approval at Bots/Requests for approval/StradBot. — Mr. Stradivarius  ♪ talk ♪ 13:59, 27 September 2023 (UTC)

Request update of template list (9 October 2023)
Bot comment: StradBot has detected that Module:Disambiguation/templates needs to be updated. This is due to a disambiguation template being added or removed from Category:Disambiguation message boxes, or to a redirect to one of those templates being added or removed. The bot has saved the new page content in Module:Disambiguation/templates/sandbox (diff). Please review this and update the module if necessary. StradBot (talk) 15:13, 9 October 2023 (UTC)


 * I can't analyse this diff because they are all in a different order! &mdash; Martin (MSGJ · talk) 15:18, 9 October 2023 (UTC)
 * Did a quick check, the only difference is an addition . This ideally shouldn't be an issue in later versions assuming it maintains the same order it did in this change. Aidan9382 (talk) 15:28, 9 October 2023 (UTC)
 * On the other hand, alphabetical order is probably more logical and the bot definitely shouldn't be removing the comments at the top explaining the purpose of the module. * Pppery * it has begun... 16:40, 9 October 2023 (UTC)
 * ❌ You are right - the bot should preserve the existing format of the module. I have implemented this, and will have the bot make a new edit request below. I have deactivated this one. — <span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius  ♪ talk ♪ 14:20, 10 October 2023 (UTC)

Request update of template list (10 October 2023)
Bot comment: StradBot has detected that Module:Disambiguation/templates needs to be updated. This is due to a disambiguation template being added or removed from Category:Disambiguation message boxes, or to a redirect to one of those templates being added or removed. The bot has saved the new page content in Module:Disambiguation/templates/sandbox (diff). Please review this and update the module if necessary. StradBot (talk) 14:21, 10 October 2023 (UTC)
 * The diff isn't as clean as I would have liked due to the different quotation style, but hopefully this is close enough to the existing format. Let me know what you think. — <span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius  ♪ talk ♪ 14:28, 10 October 2023 (UTC)
 * Much better thanks, and presumably will be much cleaner next time &mdash; Martin (MSGJ · talk) 14:38, 10 October 2023 (UTC)
 * ✅ * Pppery * <sub style="color:#800000">it has begun... 22:31, 10 October 2023 (UTC)

Category:Disambiguation pages not detected by Module:Disambiguation
Category contains pages. They are either pages which contain WikiProject Disambiguation which shouldn't, or they are are not correctly identified by this module. &mdash; Martin (MSGJ · talk) 10:41, 17 October 2023 (UTC)
 * The way to deal with this is to look through those pages, judge whether the subject page is a disambiguation page, and if so, add the disambiguation template to Category:Disambiguation message boxes. Then StradBot will add the templates and their redirects to an edit request on its next run. — <span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius  ♪ talk ♪ 13:32, 17 October 2023 (UTC)
 * Hm, I had a brief look through the category, and the pages in it seem to be almost all set index articles, with an occasional regular article. I didn't spot any actual disambiguation pages. There are lots of given name and chemical compound set index articles, so perhaps they could be tackled first? Also, the category should probably be limited to the Talk namespace, as only pages in article space can be disambiguation pages. — <span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius  ♪ talk ♪ 13:49, 17 October 2023 (UTC)
 * I've added Template:Hurricane season disambiguation to the category. As you say, most of the rest look like SIAs. &mdash; Martin (MSGJ · talk) 15:03, 17 October 2023 (UTC)
 * Yes, from a very brief look-see, most of these should not have WikiProject Disambiguation. Perhaps the tag is artifact left over from changing the page from dab to a set index -- or they were added by mistake. older ≠ wiser 15:50, 17 October 2023 (UTC)

Set index articles
Would there be any comments about creating a similar module (or adding a function to this one) to detect set index articles? I assume a similar method could be used, with a different set of templates. &mdash; Martin (MSGJ · talk) 10:51, 17 October 2023 (UTC)


 * Would like to pursue this idea. Rather than having to scan and parse the text of an article twice, would it be possible to write a function which would return "disambig" or "sia" if either of those types of template are found on the page? Would the bot be able to keep a list of sia templates up-to-date in the same way as Module:Disambiguation/templates? &mdash; Martin (MSGJ · talk) 22:31, 1 December 2023 (UTC)

Request update of template list (19 October 2023)
Bot comment: StradBot has detected that Module:Disambiguation/templates needs to be updated. This is due to a disambiguation template being added or removed from Category:Disambiguation message boxes, or to a redirect to one of those templates being added or removed. The bot has saved the new page content in Module:Disambiguation/templates/sandbox (diff). Please review this and update the module if necessary. StradBot (talk) 06:45, 19 October 2023 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 07:06, 19 October 2023 (UTC)

Request update of template list (20 December 2023)
Bot comment: StradBot has detected that Module:Disambiguation/templates needs to be updated. This is due to a disambiguation template being added or removed from Category:Disambiguation message boxes, or to a redirect to one of those templates being added or removed. The bot has saved the new page content in Module:Disambiguation/templates/sandbox (diff). Please review this and update the module if necessary. StradBot (talk) 06:45, 20 December 2023 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 09:39, 20 December 2023 (UTC)

Request update of Module:Disambiguation/templates (20 February 2024)
Bot comment: StradBot has detected that Module:Disambiguation/templates needs to be updated. This is due to a template being added or removed from Category:Disambiguation message boxes, or to a redirect to one of those templates being added or removed. The bot has saved the new page content in Module:Disambiguation/templates/sandbox (diff). Please review this and update the module if necessary. StradBot (talk) 15:38, 20 February 2024 (UTC)
 * Note: this edit request is a result of me changing the sorting algorithm governing the order that redirects are displayed in (upper case strings should now be sorted in alphabetical order). There is no difference in the templates used, so this would be a purely cosmetic edit. As such, I am deactivating the edit request. Future bot runs will only create new edit requests if the module sandbox changes, so it is fine to leave the main module as it is. — <span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius  ♪ talk ♪ 15:49, 20 February 2024 (UTC)

Request update of Module:Disambiguation/templates (21 March 2024)
Bot comment: StradBot has detected that Module:Disambiguation/templates needs to be updated. This is due to a template being added or removed from Category:Disambiguation message boxes, or to a redirect to one of those templates being added or removed. The bot has saved the new page content in Module:Disambiguation/templates/sandbox (diff). Please review this and update the module if necessary. StradBot (talk) 06:46, 21 March 2024 (UTC)
 * ✅ &mdash; Martin (MSGJ · talk) 12:29, 21 March 2024 (UTC)