Page MenuHomePhabricator

Enabling Title Key breaks prefixsearch via Special:ApiSandbox
Open, Needs TriagePublicBUG REPORT

Description

Enabling Title Key extension causes prefixsearch via Special:ApiSandbox to stop recognizing templates, files etc. This cripples extensions that rely on prefixsearch like the Template Wizard extension. It has apparently been broken since at least MW 1.30 https://www.mediawiki.org/wiki/Topic:Uci3j110eoxumevd

I discovered it while attempting to use Template Wizard and learned that the template Wizard Search didn't function as expected:
https://phabricator.wikimedia.org/T257738#6299574

Steps to Reproduce:

  • Enable Title Key on Mediawiki 1.33.0
  • Install Template Data Extension (which may in future be packaged with Mediawiki)
  • Add a template with some template. Do a null edit on the template to ensure that it is recognized.
  • Try a prefixsearch via Special:ApiSandbox similar to
https://en.wikisource.org/w/api.php?action=templatedata&format=json&generator=prefixsearch&gpssearch=templatename&gpsnamespace=10&redirects=true&includeMissingTitles=true&lang=en

Actual Results:

{
    "batchcomplete": "",
    "query": {
        "prefixsearch": []
    }
}

Expected Results:

{
    "batchcomplete": "",
    "query": {
        "prefixsearch": [
            {
                "ns": 10,
                "title": "Template:Templatename",
                "pageid": 2
            }
        ]
    }
}