SpecialPageData calls the SpecialPage constructor with the title PageData and is registered in SpecialPageFactory with the title PageData too, but for some reason, Special:PageData (uppercase D) redirects to Special:Pagedata (lowercase d). The only occurrence of Pagedata (case-sensitive) in MediaWiki is an alias in MessagesEn.php, but even if that alias is changed to PageData (as for e. g. PageLanguage), the redirect persists. I have no clue where it comes from.
|mediawiki/core||master||+1 -1||Use Special:PageData as the canonical capitalization|
'Pagedata' => [ 'PageData' ],
The first Pagedata must be equal to the internal name used in the factory and special page and for call to SpecialPageFactory::getTitleFor to instance it.
The second Pagedata is the canonical form used to display the special page name in the content language of your wiki.
You can keep the internal name 'PageData' but has to set the canonical one also to 'PageData' to make it work as you expected.
Aaaaah… I had tried changing the canonical name to PageData in MessagesEn.php and it didn’t seem to have any effect, but I see why now – I needed to run maintenance/rebuildLocalisationCache.php…