**Feature summary** (what you would like to be able to do and where):
Per [[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300|MDN]], the `300 Multiple Choices` HTTP status code signifies that several pieces of content are available for one request. Disambiguation pages fit directly into this description; the main body content of a "request" in this case would be the title of an article.
**Benefits** (why should this be implemented?):
Makes responses more semantic and correct.
NOTE: Feel free to untag your project and create subtasks if needed.
In https://gerrit.wikimedia.org/r/c/mediawiki/core/+/865811 we updated the default for targets to be `["desktop", "mobile"]`. This means that any extensions/skins defining this are now redundant and can remove these definitions,
The following query marks some of the offenders (regex to be improved later):
https://codesearch.wmcloud.org/search/?q=%22targets%22&i=nope&files=(extension%7Cskin).json&excludeFiles=&repos=
# NOTE
If the extension is MLEB then support is required for at least two releases thus targets should be retained until 1.42.
More information: https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle
# TODO
[] Remove the lines
[] Bump the MediaWiki required version to 1.40
**Problem **
When adding a new link on the Wikitext editor, the editor doesn’t notice if the link is to a redirect to a disambiguation page
**What happens?**:
The editor does NOT warn you that the link you added is a disambiguation page since it's a redirect.
**What should have happened instead?**:
The editor should warn you that you are adding a link to a disambiguation page.
–––––
Thanks to @Danbloch for spotting this – and please feel free to add more information/edit the bug description as you see fit.
**Feature summary** (what you would like to be able to do and where):
Removing a disambiguation template should mark article as unreviewed.
> I'm pleased to see that NPP catches [[WP:NPPREDIRECT|redirects converted to articles]]. Does any mechanism cover dabs converted to articles? For example, if I overwrite [[John Smith]] with a badly written bio of my non-notable friend John Smith, is there a system for picking that up? How about name lists such as [[Abdul Hamid]]? @Certes
**Use case(s)** (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
**Benefits** (why should this be implemented?):
* Close a loophole that undisclosed paid editors could exploit. Examples:
** https://en.wikipedia.org/w/index.php?title=888&diff=1103108865&oldid=1096833961&diffmode=source
** {{diff|Galactica|prev|1103019290|Galactica}}
** {{diff|Galactica|prev|1103050323|twice}}
** {{diff|Scaler|prev|1103067869|Scaler}}
**Notes**
* Another ticket talks about [[mw:Extension:Disambiguator]] which notes whether a page is a disambiguation page in SQL table `page_props`. Example query to see if a page is a disambiguation page: https://quarry.wmcloud.org/query/66497
* Could also do an edit page hook and look for the removal of something. Perhaps the category "Disambiguation pages"
** The "mark redirect-to-article as unreviewed" code lives in Hooks.php->onRevisionFromEditComplete(). That'd be a good spot for this.
* Set index articles are basically a disambiguation page, but are not marked as such in page_props and would have to be detected a different way. Example: https://en.wikipedia.org/wiki/New_York_Proposition_1
Now that {T243051} is done, this extension should migrate away from IDatabase::select() to [[https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php|SelectQueryBuilder]].
It would improve readability of the code, avoids mistakes by passing the wrong order of arguments, etc.
For more information check T243051 and [[https://www.mediawiki.org/wiki/Manual:Database_access#SelectQueryBuilder|its documentation]].
Note that query builder is a different paradigm and changes should not be one-to-one. For example, avoid using joinConds().
**List of steps to reproduce** (step by step, including full links if applicable):
* https://zh.wikipedia.org/w/index.php?title=Special:Log&logid=11427749&uselang=en
**What happens?**:
The tag is added to a move log by the extension.
**What should have happened instead?**:
I think the tag should only be added to edits.
**Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.**:
1.39.0-wmf.7
Disambiguation pages are tagged with `__DISAMBIG__` so that they're easier to work with; for example, tagging a page allows the software to easily tell whether a page is a disambiguation page without having to parse the page, and have a consistent API to tell clients this information.
Almost always, this tag is put into a disambiguation template, so even the most experienced of editors aren't aware that the tag exists because they never see it and never have to add it. Nevertheless, there is a button in the page settings box in the visual editor to add the tag. There is no tooltip or other explanation given to the user as to why it's there or what it does. There probably should be.
{F13710249}
Original report:
> I'll admit 2 things:
> one is that I have never used the magic word to create/tag a disambig page. Interestingly, my colleague from en.wp said the same thing,
> The second is that I would have loved to figure out what the option actually did via the (I) icon, but there isn't one there, and I don't even know if you ever planned to have one in the first place. TY!
On enwiki `DisambiguationPages` in the querycache hasn't been updated since `20130716141819`...
Is this right? Shouldn't it have been updated?
https://github.com/wikimedia/mediawiki-extensions-Disambiguator/blob/master/specials/SpecialDisambiguationPages.php
Or are the rows under `DisambiguationPages` not from Disambiguator the extension? There are 1000 rows in the querycache table... There's thousands more available via https://en.wikipedia.org/w/index.php?title=Special:DisambiguationPages&limit=5000&offset=0 - Are they from the old MW implementation that was stripped out years ago?
The page is marked as inexpensive - https://github.com/wikimedia/mediawiki-extensions-Disambiguator/blob/master/specials/SpecialDisambiguationPages.php#L20 which would presumably explain why it's not being cached?
Notice when looking at T174513
In order to apply special styling to disambiguation pages (in our particular case, we want the TOC flushed right), we need a way to identify them in CSS.
Adding a class "mw-disambig-page" to the page's body tag would accomplish that.
Thanks.
Maybe its own ContentHandler type with its own special kind of editor?
On Flow pages links to disambiguation pages does not use the class "mw-disambig"
Exception : when writing or editing a message as it uses VisualEditor classes and VisualEditor handles Extension:Disambiguator (or vice versa)
Example : https://test.wikipedia.org/wiki/Topic:Tdjd6kijr6fp4mb8
Followup to {T146310}
I'm thinking I'll send a note to wikitech-ambassadors explaining the feature, and then later on go, through the wikis myself seeing where I can add the magic word.
When I try to add link to "Note" on de.wikipedia in VE, I get a list of suggestions with titles starting with "Note". The first entry is a disambiguation page. It would be nice to have (some of) the links from that page also in the suggestion list, as it isn't unlikely that I want to link one of these pages. Not all of them start with "Note", so they won't turn up on a normal prefix search.
For example, presently to show a single non-disambig random article we have to use one of the two following approaches:
- add "pageprops" to the random query, run the query, check returned pageprops for "disambiguation" and if found keep re-requesting another random article until we get an article without "disambiguation" pageprop
- make the random query fetch multiple random articles, say 5, and check for one without "disambiguation" pageprop, hoping that we didn't get 5 disambiguation articles
What would be nice to have is a parameter to exclude disambig pages, so, in the case of random, we could just ask for a single non-disambig random article.
See T88227.
```
$wgResourceModules['ext.disambiguator.visualEditor'] = array(
'localBasePath' => __DIR__,
'remoteExtPath' => 'Disambiguator',
'scripts' => array( 'visualEditorIntegration.js' ),
'messages' => array( 'visualeditor-dialog-meta-settings-disambiguation-label' ),
'dependencies' => array( 'ext.visualEditor.mwmeta', 'ext.visualEditor.mediawiki' ),
'targets' => array( 'desktop', 'mobile' )
);
```
```
22:00:57 There was 1 error:
22:00:57
22:00:57 1) ResourcesTest::testUnsatisfiableDependencies
22:00:57 Undefined index: ext.visualEditor.mediawiki
22:00:57
22:00:57 /srv/ssd/jenkins-slave/workspace/mwext-Disambiguator-testextension-zend/src/tests/phpunit/structure/ResourcesTest.php:94
22:00:57 /srv/ssd/jenkins-slave/workspace/mwext-Disambiguator-testextension-zend/src/tests/phpunit/MediaWikiTestCase.php:133
22:00:57
22:00:57 --
```
From https://www.mediawiki.org/wiki/Thread:Talk:Page_Curation/Modifying_Page_Info_on_disambiguation_pages:
Could the Page Curation toolbar be modified to prevent the "No citations" notice (under "Possible issues") from appearing on any page containing a disambiguation tag?
Now when I look at e.g. user's contributions, RC, etc. I cannot see disambigs (s)he edited highlighted while I can see it for redirects (I use simple css which changes background of links to disambigs or redirects).
--------------------------
**Version**: unspecified
**Severity**: normal
It would be useful for things like [[https://en.wikipedia.org/wiki/Module:WikiProjectBanner|Module:WikiProjectBanner]] if Scribunto could detect whether a given page is a disambiguation page or not. At present, the only way of doing this is to preprocess all of a page's text and search for the `__DISAMBIG__` magic word, which is obviously not practical for performance reasons.
I envision this as an "isDisambig" property of the Scribunto title object, but the exact naming or location isn't so important.
* https://en.wikipedia.org/wiki/Module:Disambiguation
The page [[Special:DisambiguationPageLinks]] (currently) has the item "ASCII → ASCII (disambiguation)" but it is the code {{about|the character encoding}} from [[ASCII]] which (intentionally) creates the link to the disambiguation [[ASCII (disambiguation)]] (and there is no other link to the same page).
For maintenance purposes, it would be great to have a way to exclude this kind of links from the special page.
Maybe we could have some tag which could be used in the [[Template:about]] as in
<validLinkToDisambiguationPage>[[the link]]</validLinkToDisambiguationPage>
?
--------------------------
**Version**: unspecified
**Severity**: enhancement
[[MediaWiki:Disambiguationspage]] can be used.
Is this bug a duplicate?
Is this what you're trying to say?
>-'disambiguations-text' => "The following pages link to a '''disambiguation page'''.
>+'disambiguations-text' => "The following pages (on the left) link to a '''disambiguation page''' (on the right).
(Same for other languages.)
But looking at e.g., [[Special:Disambiguations]], we
see "(disambiguation)" scattered on both left and right.
Personally in LocalSettings.php I instead just avoid the issue, via
```
functionJidanniLessSpecialPages(&$list){
foreach(array('Disambiguations',...)as $i){
unset($list[$i]);}
return true;}
$wgHooks['SpecialPage_initList'][]='JidanniLessSpecialPages';
```
--------------------------
**Version**: unspecified
**Severity**: enhancement
**URL**: http://en.wikipedia.org/wiki/Special:Disambiguations
**Author:** `le.korrigan`
**Description:**
Currently, the improved Lucene Search on en.wikipedia indicates when results are redirects, or form a section of an another page.
I think it would be useful if the results could indicate "(Disambiguation page)" when a page is a disambiguation, for example using the list of relevant templates from [[MediaWiki:Disambiguationspage]].
Thanks.
--------------------------
**Version**: master
**Severity**: enhancement
**Author:** `lcarsdata`
**Description:**
It would be useful to have a check box to remove disambiguation pages from
[[Special:Allpages]] and [[Special:Preifxindex]].
--------------------------
**Version**: unspecified
**Severity**: enhancement
**Author:** `dunc_harris`
**Description:**
I'm not sure this can be done without fixing T8754 first, but...
[[special:allpages]] identifies redirect pages from all other pages. Redirects are in <i>italics</i>, whereas other pages are not. I want to split all other pages into article pages and disambiguation pages, so developing the theme, I think it would be good to put disambiguation pages in <b><i>bold italic</b></i>.
**Author:** `dunc_harris`
**Description:**
I'm not sure this can be done without fixing
http://bugzilla.wikipedia.org/show_bug.cgi?id=6754 first, but...
[[special:whatlinkshere]] identifies redirect pages from all other pages. I
want to split all other pages into article pages and disambiguation pages, so
that you end up with summut like this:
The following pages link to [[foobar]]
* [[FOOBAR]] (redirect page)
* [[tree (disambiguation)]] (disambiguation page)
* [[turtle]]
* etc
--------------------------
**Version**: unspecified
**Severity**: enhancement