https://en.wikipedia.org/w/index.php?title=Talk:Thomas_W._O%27Brien&diff=757480527&oldid=610994123
Edits such as this are taking the subject-space page's default category sort key and putting it on the talk page. There are hundreds, probably thousands, of similar edits. This is kind of insane and we should address this in a better way.
Instead of duplicating the default category sort key between the subject-space page and the talk page, let's provide a means of accessing/extracting the default category sort key of an arbitrary wiki page from a wiki talk page.
I can see two relatively straightforward paths to providing this functionality:
- Add a function or property to Scribunto/Lua to get the default category sort key of a Title object. I looked at https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual and didn't see one already, unfortunately.
- Add a magic word or parser function (cf. https://www.mediawiki.org/wiki/Help:Magic_words) such as {{#getdefaultsortkey:Page name}} or similar that can retrieve a wiki page's default category sort key. Or it could be similar to {{PAGESIZE:Page name}} or perhaps could even be integrated with the existing {{DEFAULTSORT:}}, but that seems kind of messy.
Thoughts on which approach to take? Once there's a decision, implementing this functionality should be pretty easy.