Steps to replicate the issue:
- Override the DEFAULTSORT value of a page using the {{DEFAULTSORT}} magic word (e.g. https://test.wikipedia.org/w/index.php?title=Test&diff=prev&oldid=684191)
- Wait until the CirrusSearch metadata gets populated with the new DEFAULTSORT value (https://test.wikipedia.org/w/index.php?title=Test&action=cirrusdump, look for "defaultsort")
- Remove the {{DEFAULTSORT}} magic word, which would ideally restore DEFAULTSORT to the page name (e.g. https://test.wikipedia.org/w/index.php?title=Test&diff=prev&oldid=684192)
- The overridden DEFAULTSORT value still remains in the CirrusSearch metadata
What should have happened instead?:
The "defaultsort" parameter should have been removed or restored to its default value.
Other information (browser name/version, screenshots, etc.):
See https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Why_does_%22Monkey%22_appear_in_the_dropdown_search_results_for_%22Obama%22? for further context. Interestingly, https://test.wikipedia.org/w/api.php?action=query&prop=cirrusbuilddoc&titles=Test&cbbuilders=content does not seem to be affected by this.