Page MenuHomePhabricator

{{NAMESPACE}} wrongly returns "Special" when used in autosumm-new
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue:

  • Set MediaWiki:Autosumm-new's contents to {{NAMESPACE}}.
  • Create a new page leaving the edit summary empty.
  • Check the auto-generated edit summary.
    • It says "Special".
    • Should be equal to the namespace prefix of the created page.

Proof: the edit summary of this diff was based on this revision of MediaWiki:Autosumm-new.

Use case: on plwiktionary, we have locally edited MediaWiki:Autosumm-new to avoid spamming with long edit summaries on the RecentChanges page. That is, the default Created page with "$1", where $1 is expanded to a long chunk of wikitext, is shortened to Created page for pages created in the main namespace. This is no longer working at 1.42.0-wmf.10, I think it started breaking at 1.41.0-wmf.29 (not 100% sure).

This is the behavior we want to achieve (currently bugged, used to work until October 2023):

{{#ifeq:{{NAMESPACE}}|{{ns:0}}|Created page|Created page with „$1”}}

Event Timeline

Umherirrender subscribed.

The message is parsed in the context of Special:Badtitle/Missing, the title of the page is currently not known when that code (in ContentHandler::getAutosummary) is processed.

Messages not used in the navigation/skin may not support all kind of variables like {{NAMESPACE}} as there are used from the GUI edit page and from API edit module, so the title is not easy known.