Page MenuHomePhabricator

ContentTranslation fails with Internal server error if an invalid title is given
Closed, ResolvedPublic

Description

Try typing a URL with a page parameter that has an invalid title character, for example page=Hel}lo.

For example: https://en.wikipedia.org/wiki/Special:ContentTranslation?page=Steve+A}lbini&from=en&to=he

In production Wikipedia this produces Exception encountered, of type "BadMethodCallException".

On my local machine, this produces a blank page and the server log says: PHP Fatal error: Call to a member function getDBkey() on null in /home/amire80/dev/livowiki/extensions/ContentTranslation/specials/SpecialContentTranslation.php on line 69

Unless a URL is typed manually, this is unlikely to actually happen because the page selector validates the titles, but should probably be handled.

A similar frontend issue: T111544.