Page MenuHomePhabricator

Enabling Title Key breaks prefixsearch via Special:ApiSandbox
Closed, ResolvedPublicBUG 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
            }
        ]
    }
}

Event Timeline

FrozenPlum closed this task as Resolved.EditedOct 7 2023, 4:23 PM
FrozenPlum subscribed.

This appears to have been resolved (and now works as expected) with the changes related to template search in VisualEditor:
https://phabricator.wikimedia.org/T274907
https://phabricator.wikimedia.org/T286990

No longer breaks TemplateWizard search, and now works as expected on 1.39 with both extensions enabled (search no longer broken).