Page MenuHomePhabricator
Search Advanced Search
Use the application-specific Advanced Search to set additional search criteria: Tasks, Commits. (More information)
    • Task
    ==== Error ==== * service.version: 1.42.0-wmf.24 * trace.id: 31b42232-39b3-4b02-8457-d4e823dd2945 * [[ https://logstash.wikimedia.org/app/dashboards#/view/AXFV7JE83bOlOASGccsT?_g=(time:(from:'2024-03-26T20:39:51.298Z',to:'2024-03-28T15:13:08.597Z'))&_a=(query:(query_string:(query:'reqId:%2231b42232-39b3-4b02-8457-d4e823dd2945%22'))) | Find trace.id in Logstash ]] ```name=labels.normalized_message,lines=10 [{reqId}] {exception_url} Wikimedia\Assert\PreconditionException: Precondition failed: This Title instance does not represent a proper page, but merely a link target. ``` ```name=error.stack_trace,lines=10 from /srv/mediawiki/php-1.42.0-wmf.24/vendor/wikimedia/assert/src/Assert.php(49) #0 /srv/mediawiki/php-1.42.0-wmf.24/includes/title/Title.php(3891): Wikimedia\Assert\Assert::precondition(boolean, string) #1 /srv/mediawiki/php-1.42.0-wmf.24/includes/title/Title.php(3872): MediaWiki\Title\Title->assertProperPage() #2 /srv/mediawiki/php-1.42.0-wmf.24/extensions/Disambiguator/includes/Hooks.php(202): MediaWiki\Title\Title->getId() #3 [internal function]: MediaWiki\Extension\Disambiguator\Hooks::MediaWiki\Extension\Disambiguator\{closure}(MediaWiki\Title\Title) #4 /srv/mediawiki/php-1.42.0-wmf.24/extensions/Disambiguator/includes/Hooks.php(201): array_map(Closure, array) #5 /srv/mediawiki/php-1.42.0-wmf.24/includes/HookContainer/HookContainer.php(159): MediaWiki\Extension\Disambiguator\Hooks->onLinksUpdateComplete(MediaWiki\Deferred\LinksUpdate\LinksUpdate, integer) #6 /srv/mediawiki/php-1.42.0-wmf.24/includes/HookContainer/HookRunner.php(2348): MediaWiki\HookContainer\HookContainer->run(string, array) #7 /srv/mediawiki/php-1.42.0-wmf.24/includes/deferred/LinksUpdate/LinksUpdate.php(194): MediaWiki\HookContainer\HookRunner->onLinksUpdateComplete(MediaWiki\Deferred\LinksUpdate\LinksUpdate, integer) #8 /srv/mediawiki/php-1.42.0-wmf.24/includes/deferred/AutoCommitUpdate.php(47): MediaWiki\Deferred\LinksUpdate\LinksUpdate->MediaWiki\Deferred\LinksUpdate\{closure}(Wikimedia\Rdbms\DBConnRef, string) #9 /srv/mediawiki/php-1.42.0-wmf.24/includes/deferred/DeferredUpdates.php(486): MediaWiki\Deferred\AutoCommitUpdate->doUpdate() #10 /srv/mediawiki/php-1.42.0-wmf.24/includes/deferred/DeferredUpdates.php(198): MediaWiki\Deferred\DeferredUpdates::attemptUpdate(MediaWiki\Deferred\AutoCommitUpdate) #11 /srv/mediawiki/php-1.42.0-wmf.24/includes/deferred/DeferredUpdates.php(285): MediaWiki\Deferred\DeferredUpdates::run(MediaWiki\Deferred\AutoCommitUpdate) #12 /srv/mediawiki/php-1.42.0-wmf.24/includes/deferred/DeferredUpdatesScope.php(269): MediaWiki\Deferred\DeferredUpdates::MediaWiki\Deferred\{closure}(MediaWiki\Deferred\AutoCommitUpdate, integer) #13 /srv/mediawiki/php-1.42.0-wmf.24/includes/deferred/DeferredUpdatesScope.php(198): MediaWiki\Deferred\DeferredUpdatesScope->processStageQueue(integer, integer, Closure) #14 /srv/mediawiki/php-1.42.0-wmf.24/includes/deferred/DeferredUpdates.php(304): MediaWiki\Deferred\DeferredUpdatesScope->processUpdates(integer, Closure) #15 /srv/mediawiki/php-1.42.0-wmf.24/extensions/EventBus/includes/JobExecutor.php(110): MediaWiki\Deferred\DeferredUpdates::doUpdates() #16 /srv/mediawiki/rpc/RunSingleJob.php(60): MediaWiki\Extension\EventBus\JobExecutor->execute(array) #17 {main} ``` ==== Notes ==== * Started happening yesterday on zhwiktionary immediately following wmf.24 rollout * Only coming from jobrunners * Only from wikikube jobrunners
    • Task
    Seen on https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Polar_bear&action=edit&cm6enable=1 https://logstash.wikimedia.org/app/dashboards#/doc/logstash-*/logstash-default-1-7.0.0-1-2023.10.10?id=-NQ-G4sBt3kDdlqnJpry ``` stack_trace at bindTextareaListener https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022 line 10 > eval:2:845 at disambiguator/ext.disambiguator.js/</< https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022 line 10 > eval:3:538 at fire https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022 line 10 > eval:4:699 at value https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.CodeMirror.v6.WikiEditor%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue%7Cjquery.ui&skin=vector-2022&version=1w73y:282:181 at execute https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.CodeMirror.v6.WikiEditor%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue%7Cjquery.ui&skin=vector-2022&version=1w73y:281:115 at doAction https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.wikiEditor&skin=vector-2022&version=14ys9:28:874 at jquery.wikiEditor.toolbar.js/buildTool/< https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.wikiEditor&skin=vector-2022&version=14ys9:30:882 at OO.EventEmitter.prototype.emit https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022 line 10 > eval:8:344 at OO.ui.mixin.ButtonElement.prototype.onClick https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.CodeMirror.v6.WikiEditor%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue%7Cjquery.ui&skin=vector-2022&version=1w73y:452:758 at dispatch https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.CodeMirror.v6.WikiEditor%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue%7Cjquery.ui&skin=vector-2022&version=1w73y:348:932 at add/elemData.handle https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.CodeMirror.v6.WikiEditor%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets%2Cvue%7Cjquery.ui&skin=vector-2022&version=1w73y:345:565 ```
    • Task
    Capturing via verbose Logstash and Excimer UI in two (separate) profiles using WikimediaDebug after 1 warmup request that has neither of the options enabled, by viewing en.wikipedia.org's featured article at <https://en.wikipedia.org/wiki/Robert_Howard_Hodgkin> in private browsing (logged-out). Prior art: * {T302538} * {T322528} ## List of queries * Logs: <https://logstash.wikimedia.org/app/dashboards#/view/x-debug?_g=(time:(from:now-1h,mode:quick,to:now))&_a=(query:(query_string:(query:%27reqId:%22d15a6bb9-27ac-44ac-a1ed-9887c872fbe2%22%27)))> * Flame graph with **stack traces for each database query**: <https://performance.wikimedia.org/excimer/profile/9f93148c22caf7dc> I reduced the logs by using `message:SELECT` which yields **19 queries**, roughly in order: 1. `[0.001s] Wikimedia\Rdbms\Replication\MysqlReplicationReporter::fetchSecondsSinceHeartbeat SELECT … FROM heartbeat where shard = 's1' …` * Who: rdbms. * Why: Preflight required once for any new db connection, as requested by one or more later. 2. `[0.001s] WikiPage::pageData SELECT … FROM page WHERE page_namespace = 0 AND page_title = 'Robert_Howard_Hodgkin' LIMIT 1 ` * Who: MediaWiki.php. * Why: This single query feeds many consumers all in one efficient row fetch. E.g. to determine the rendered title (is it a redirect that we need to resolve first?), RequestContext (does the page exist?), ActionFactory (which ContentHandler and Action will hande this request?), Title and PageRecord (page ID), ViewAction/OutputPage/Skin (current revision ID etc.) 3. `[0.002s] MediaWiki\Output\OutputPage::addCategoryLinksToLBAndGetResult SELECT … FROM page LEFT JOIN page_props ON (pp_propname = 'hiddencat' AND (pp_page = page_id)) WHERE ((page_namespace = 14 AND page_title IN (…,'Featured_articles',…,'1877_births','1951_deaths',…,'British_historians',…) ))` * Who: OutputPage, on behalf of Skin. * Why: Show category links at the bottom of the page. Interestingly, there is no `categorylinks` table query, because that data is obtained from the ParserOutput from the ParserCache. Doing so saves a DB query but also ensure integrity and internal concistency with the rendered wikitext revision (i.e. you wouldn't want a category associated with a template like "citation needed", when it is no longer in the content or vice versa). This query is to help separate the "hidden" categories from the regular ones. This can change at any time through edits to category pages and rather than cache this in ParserCache and require refresh links to propagate on the entire site after (unprotected) Category edits, we instead query this at the last-minute. 4. `[0.001s] MediaWiki\Page\PageProps::getProperties SELECT pp_page,pp_propname,pp_value FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'notalk'` 5. `[0s] MediaWiki\Page\PageProps::getProperties SELECT pp_page,pp_propname,pp_value FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'newsectionlink'` 6. `[0s] MediaWiki\Page\PageProps::getProperties SELECT pp_page,pp_propname,pp_value FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'archivedtalk'` * Who: DiscussionTools extension. * Why: To determine whether this is a talk page, via `isAvailableForTitle()` from `DiscussionTools\PageHooks::onOutputPageBeforeHTML`. 7. `[0.001s] MediaWiki\Page\PageProps::getProperties SELECT pp_page,pp_propname,pp_value FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'templatedata'` * Who: TemplateData extension. * Why: To localise template documentation, in case this is a page view (which it might not be) for a Template page (which it might not be) with templatedata docs in the parser output (which it might not have). 8. `[0.001s] MediaWiki\Extension\PageTriage\QueueLookup::getByPageId SELECT ptrp_page_id,ptrp_reviewed,ptrp_created,ptrp_deleted,ptrp_tags_updated,ptrp_reviewed_updated,ptrp_last_reviewed_by FROM pagetriage_page WHERE ptrp_page_id = 54249587 LIMIT 1 ` * Who: PageTriage extension. * Why: To decide whether to add its user interface to the article, via `isPageUnreviewed()` from `PageTriage\Hooks::onArticleViewFooter`. 9. `[0s] MediaWiki\Extension\Disambiguator\Lookup::filterDisambiguationPageIds SELECT page_id,rd_from FROM redirect JOIN page ON ((rd_namespace=page_namespace) AND (rd_title=page_title)) WHERE rd_from = 54249587` 10. `[0s] MediaWiki\Extension\Disambiguator\Lookup::filterDisambiguationPageIds SELECT pp_page FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'disambiguation'` * Who: RelatedArticles extension. * Why: To decide whether to output a "related articles" below the article. Via `MediaWiki\Extension\Disambiguator\Hooks::isDisambiguationPage` from `RelatedArticles\Hooks::onSkinAfterContent`. 11. `[0.001s] PageImages\PageImages::fetchPageImage SELECT pp_value FROM page_props WHERE pp_page = 54249587 AND pp_propname IN ('page_image','page_image_free') ORDER BY pp_propname LIMIT 1 ` * Who: PageImages extension. * Why: To insert `<meta property="og:image">` into the HTML `<head>` 12. `[0.001s] LinkBatch::doQuery (for Skin::preloadExistence) SELECT … FROM page WHERE ((page_namespace = 1 AND page_title = 'Robert_Howard_Hodgkin') OR (page_namespace = 2 AND page_title = 'X.X.X.X/sandbox'))` * Who: Skin. * Why: For links in the skin interface sidebar, personal tools, page actions, etc. all batched together to decide whether they are blue or red. 13. `[0s] MediaWiki\User\TalkPageNotificationManager::dbCheckNewUserMessages SELECT user_ip FROM user_newtalk WHERE user_ip = 'X.X.X.X' LIMIT 1 ` * Who: Skin. * Why: "**[Orange bar of doom](https://meta.wikimedia.org/wiki/New_messages_notification)**", to say "You have new messages".. Note that this for any edit session, including for unregistered users for whom messages are left on a User_talk page based on their IP-address. 14. `[0.001s] MediaWiki\Page\PageStore::getPageByNameViaLinkCache SELECT … FROM page WHERE page_namespace = 12 AND page_title = 'Category' LIMIT 1` * Who: Skin. * Why: The `Help:Categories` link, labelled "Categories", for the category box at the bottom of article. 15. `[0.001s] MediaWiki\Extension\Disambiguator\Lookup::filterDisambiguationPageIds SELECT page_id,rd_from FROM redirect JOIN page ON ((rd_namespace=page_namespace) AND (rd_title=page_title)) WHERE rd_from = 54249587` 16. `[0s] MediaWiki\Extension\Disambiguator\Lookup::filterDisambiguationPageIds SELECT pp_page FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'disambiguation'` * Who: RelatedArticles extension. * Why: To decide whether the already decided on "related articles" below the article, should load its CSS/JS module as well. Via `MediaWiki\Extension\Disambiguator\Hooks::isDisambiguationPage` from `RelatedArticles\Hooks::onBeforePageDisplay`. 17. `[0.001s] Wikimedia\Rdbms\Replication\MysqlReplicationReporter::fetchSecondsSinceHeartbeat SELECT … FROM heartbeat.heartbeat WHERE shard = 's8' …` * Who: rdbms. * Why: Preflight for one or more Wikidata queries after this. 18. `[0.011s] Wikibase\Lib\Store\Sql\Terms\DatabaseTermInLangIdsResolver::resolveTermsViaJoin SELECT … FROM wbt_term_in_lang JOIN … WHERE wbtl_type_id = 2 AND wbxl_language = 'en' AND wbit_item_id = 30153087` * Who: Wikidata (WikibaseClient extension) * Why: To create the `<script type="application/ld+json">` metadata element and add it to the end of the HTML output stream for machine readable association between Wikipedia articles and Wikidata.org entities (e.g. for automated clients, bots, and crawlers). Via `Wikibase\Client\ClientHooks::onSkinAfterBottomScripts` hook. 19. `[0.002s] MediaWiki\Revision\RevisionStore::fetchRevisionRowFromConds SELECT … FROM revision … JOIN actor comment comment_rev_comment page ON … LEFT JOIN user ON … WHERE page_namespace = 0 AND page_title = 'Robert_Howard_Hodgkin' ORDER BY rev_timestamp ASC,rev_id ASC LIMIT 1` * Who: Wikidata (WikibaseClient extension) * Why: To compute the `datePublished` property within the `<script type="application/ld+json">` element. Via `RevisionStore::getFirstRevision` as indirectly caleld from the same `Wikibase\Client\ClientHooks::onSkinAfterBottomScripts` hook handler. ## Performance analysis > 4. `SELECT pp_page,pp_propname,pp_value FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'notalk'` > 5. `[0s] MediaWiki\Page\PageProps::getProperties SELECT pp_page,pp_propname,pp_value FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'newsectionlink'` > 6. `[0s] MediaWiki\Page\PageProps::getProperties SELECT pp_page,pp_propname,pp_value FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'archivedtalk'` > * Who: DiscussionTools extension. > * Why: To determine whether this is a talk page, via `isAvailableForTitle()` from `DiscussionTools\PageHooks::onOutputPageBeforeHTML`. At glance one would think that articles can be more cheaply ruled out as a potential talk page by other means before doing a page props query for `notalk`. However, I suspect that this is yet another victim of `wgExtraSignatureNamespaces` and how its thus inheritently expensive for DiscussionTools to determine what a "discussion" page is (ref T336020, T249293, T245890, T249036; for various prior art and trade offs). Looking more closely, one thing that looks odd to me is the inline cache in `DiscussionTools\HooksUtils::hasPagePropCached`. This is caching the result of MediaWiki core's `PageProps->getProperties` service, which already has an inline cache. But above all, if this is specific to page views (i.e. not when viewing action=edit, action=history, or action=info), then you can assume a ParserOutput object, which already has page props in it. Fetching them by page ID should not be needed at all. The PageProps service can't do that, since its contract is bound to the latest revision in the database, not the revision shown. However, perhaps DiscussionTools could make some of this hook decision via the `onOutputPageParserOutput` hook, which runs just before the `onOutputPageBeforeHTML` hook, and has access to the `ParserOutput` object and all its rich metadata. (NOTE) **ACTION (DiscussionTools)**: Consider if checks can work without database queries by using ParserOutput. > 6. `[0.001s] MediaWiki\Page\PageProps::getProperties SELECT pp_page,pp_propname,pp_value FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'templatedata'` > * Who: TemplateData extension. > * Why: To localise template documentation, […] This was introduced Nov 2022 last year as part of T316759 and seems to introduce a mechanism not unlike core's `<mw:editsection>` placeholder. But, because it hooks into OutputPage, this means these placeholders are leak outside the content layer and not taken care of until here in the Skin-level with OutputPage and its browser-facing hooks. In other words, Parsoid and other APIs likely still leak the placeholders through non-standard HTML. A more appropiate hook would be `onParserOutputPostCacheTransform` which happens inside `ParserOutput::getText` just like where `<mw:editsection>` happens. These was introduced in 2017 (T171797). Adopting this would have three major benefits: * Reverts the added database query above in favour of free access via the in-memory ParserOutput object, provided to this hook. * Avoids race conditions where template pages are missing localisation or needlessly running this code when page_props and ParserCache return a different revision ID (e.g. when under load via PoolCounter). * Avoids leaking non-standard HTML to APIs. (NOTE) **ACTION (TemplateData)**: Consider if checks can work without database queries by using ParserOutput. > 12. `[0.001s] LinkBatch::doQuery (for Skin::preloadExistence) SELECT … FROM page WHERE ((page_namespace = 1 AND page_title = 'Robert_Howard_Hodgkin') OR (page_namespace = 2 AND page_title = 'X.X.X.X/sandbox'))` > * Who: Skin. Seems fine as-is. This is batched and heavily optimised to a bare minimum. The Article/Talk button (page actions tabs) and user talk page (personal portlet link) need to have the correct URL (redlink=1), tooltip ("Page doesn't exist") and blue/red coloring as they are highly visible and relevant to editor worklflow and engagement. For speed it doesn't matter much whether we query 1 or 20 titles in a batch, but for what its worth, we did reduce the query size a lot here in the past through {T299099}. > 9. `[0s] MediaWiki\Extension\Disambiguator\Lookup::filterDisambiguationPageIds SELECT page_id,rd_from FROM redirect JOIN page ON ((rd_namespace=page_namespace) AND (rd_title=page_title)) WHERE rd_from = 54249587` > 10. `[0s] MediaWiki\Extension\Disambiguator\Lookup::filterDisambiguationPageIds SELECT pp_page FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'disambiguation'` > * Who: RelatedArticles extension. > * Why: To decide whether to output a "related articles" below the article. Via `MediaWiki\Extension\Disambiguator\Hooks::isDisambiguationPage` from `RelatedArticles\Hooks::onSkinAfterContent`. > 15. `[0.001s] MediaWiki\Extension\Disambiguator\Lookup::filterDisambiguationPageIds SELECT page_id,rd_from FROM redirect JOIN page ON ((rd_namespace=page_namespace) AND (rd_title=page_title)) WHERE rd_from = 54249587` > 16. `[0s] MediaWiki\Extension\Disambiguator\Lookup::filterDisambiguationPageIds SELECT pp_page FROM page_props WHERE pp_page = 54249587 AND pp_propname = 'disambiguation'` > * Who: RelatedArticles extension. > * Why: To decide whether the already decided on "related articles" below the article, should load its CSS/JS module as well. Via `MediaWiki\Extension\Disambiguator\Hooks::isDisambiguationPage` from `RelatedArticles\Hooks::onBeforePageDisplay`. There's a lot to unpack here. First of all, the RelatedArticles extension doesn't actually output anything outside the Minerva skin or MobileFrontend. That fact is realized about three method calls **after** two full database roundtrips through a static check on the skin name. Those checks need to be re-ordered and that will immediately **remove 21% of all databae queries on all page views** in production. (NOTE) **ACTION (RelatedArticles)**: Fix order of operations in `RelatedArticles\Hooks::hasRelatedArticles` to check skins before making database queries. Secondly, the RelatedArticles extension is performing two queries where 1 would suffice. It apparently calls the Disambiguator lookup service with `$includeRedirects = true`. I have no idea why this parameter exists or why it is true by default. There are only 3 calls across production codebases and it not one appears to intentionally follow redirects. This was introduced in the Disambiguator extension in T88305 as an unused parameter for a use case relating to `onGetLinkColours` where links to disambig pages and links to redirects to disambig pages get the same colours. That's fine, except this hook calls the underlying logic direclty and so doesn't even need to expose the `$includeRedirects` paremeter, much less set it to true by default, even less set it to true for the call from the RelatedArticles extension. (NOTE) **ACTION (RelatedArticles)**: Fix `RelatedArticles\Hooks::isDisambiguationPage` to set `$includeRedirects = false` to skip a pointless database query. (NOTE) **ACTION (Disambiguator)**: Consider changing `DisambiguatorLookup` service to remove or change default of the `$includeRedirects` parameter. Thirdly, the RelatedArticles extension is performing the exact same database queries twice on every single page view. Once to decide whether to insert an empty `<div>` element, and then the whole suite of database queries and computations a second time to decide whether to queue a CSS/JS module. (NOTE) **ACTION (RelatedArticles)**: Fix `RelatedArticles\Hooks` to either use a single hook for both purposes, or to let one re-use information from the other. For example, use onBeforePageDisplay to communicate with the Skin in a way that removes the need for a onSkinAfterContent hook, or that leaves information that the onSkinAfterContent can use. Or the other way around, let onBeforePageDisplay send a signal to OutputPage, for example `OutputPage::setProperty` which the onSkinAfterContent hook can and draw its separation concern to only base on that predetermined boolean signal instead of concerning itself with the full computation again from scratch and having to keep them in sync. ## Conclusion The situation in the RelatedArticles extension reminds us that it's important to periodically run your dev environment with `$wgDebugToolbar` and `$wgDebugDumpSql` enabled (see DevelopmentSettings.php for an example). The number of queries on plain MediaWiki core is around 9 by default. Small enough to become familiar with and remember, and more importantly, to stand out if it goes and stays up, for someone in your team to notice. Even if it goes up by only 1, that's a big deal. Given the scale of Wikipedia and our budget, the quota for a feature is generallys **0 database queries** added per (cached) page view. The fact that we have hundreds of extension deployed and yet only 10-15 database queries on page views means this is generally feasible with relatively little effort. It's not about how hard it is, it's about noticing it. The above 19 are exceptional features where there was no other way and a trade-off was made in consultation with SRE, or, where we budgeted for it by saving something else, or where it benefits multiple features through a single query (e.g. batched, or re-usable information), or.... it flew under the radar temporarily... which works if only 1 or 2 extension do so and if we notice and revert or pay back within a few months!
    • Task
    **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.
    • Task
    **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.
    • Task
    **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
    • Task
    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!
    • Task
    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
    • Task
    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.
    • Task
    Maybe its own ContentHandler type with its own special kind of editor?
    • Task
    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
    • Task
    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.
    • Task
    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.
    • Task
    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.
    • Task
    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 -- ```
    • Task
    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?
    • Task
    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
    • Task
    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
    • Task
    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
    • Task
    [[MediaWiki:Disambiguationspage]] can be used. Is this bug a duplicate?
    • Task
    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
    • Task
    **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
    • Task
    **Author:** `lcarsdata` **Description:** It would be useful to have a check box to remove disambiguation pages from [[Special:Allpages]] and [[Special:Prefixindex]].
    • Task
    **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>.
    • Task
    **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