Page MenuHomePhabricator

Render opted-in abstract articles at their mainspace URLs, reusing the M1 component
Open, MediumPublic

Description

Render opted-in abstract articles at their mainspace URLs, reusing the M1 component.

When a reader on a client wiki requests a mainspace title that does not have a local article and that title matches an opt-in entry, the request is served by the abstract-content renderer inherited from M1, with the provenance banner visible above the content. If either condition is absent — no opt-in entry, or a local article exists at that title — the request is served by the normal MediaWiki article read path exactly as it would be without this extension. The local article always wins, unconditionally and without any sysop action; this is the enforcement half of the collision policy described in the M2 header, and the hook choice below is what makes the enforcement structural rather than vigilance-based.

Acceptance criteria:

  • On Test Wikipedia, requesting a mainspace URL for a title that is in the opt-in set and does not correspond to an existing local article renders the abstract content via the M1 rendering component, with the provenance banner visible above the content.
  • On Test Wikipedia, requesting a mainspace URL for a title that is in the opt-in set but does correspond to an existing local article renders the local article via MediaWiki's normal read path, with no abstract content shown — verified by creating a colliding local article and observing the switch.
  • The ShowMissingArticle hook (or the alternative the implementer chose, with written justification for the choice) is the entry point into the abstract-content render, so that "local article wins" is enforced structurally by the hook choice rather than by a separate page-existence check.
  • The M1 rendering component is reused without forking: code review confirms no duplicated-and-tweaked copy of the M1 rendering code in the mainspace code path.
  • External-indexability metadata is emitted alongside the rendered article: <link rel="canonical"> to the local mainspace URL, a robots meta tag marking the page indexable, and an hreflang self-declaration for the page's own language. Whether to also emit an hreflang="mul" alternate pointing at the corresponding page on abstract.wikipedia.org is decided during implementation; either outcome is acceptable with the decision recorded in the code comment.
  • Cache misses, render failures, and the language-unavailable case fall back to the M1 secondary banner variant rather than to MediaWiki's default missing-article UI, verified by forcing each failure mode in a test environment.
  • The banner's sysop-CTA slot is populated by the deactivate CTA (wiring covered in the CTA sub-bullet; this criterion only asserts that the wiring is present).
  • The deferred-integration concerns (RecentChanges, watchlist, Special:WhatLinksHere, XML dumps, revision history) are documented somewhere linked from this task as "known-deferred for M2, tracked for post-pilot triage".