Error
Trying to access the entity page for any form or sense ID via Special:EntityPage (form example, sense example) results in an internal error:
InvalidArgumentException from line 429 of /srv/mediawiki/php-master/extensions/Wikibase/repo/includes/Content/EntityHandler.php: The given ID does not refer to an entity of type lexeme
Impact
- Users who try to use Special:EntityPage with a form or sense ID are presented with a generic system error page, effectively stranded. However, we don’t link to such pages anywhere, so it’s not clear how those users would reach the error page in the first place.
- The server produces a fatal exception, which results in noise and false alarms for operational monitoring. That said, the noise volume is extremely low, see below.
- The server response is HTTP 500, which cannot cached.
Notes
Between 2019-01-01 and 2019-05-28, there hasn’t been a single occurrence of this error in Logstash. (There are some occurrences on 2019-05-29, presumably from users seeing the activity on this task and clicking the links above.)
Solution
Special:EntityPage should be disabled for sub entities and display a "nice" error.
Either we can:
- Add a common interface for sub entity IDs to use in datamodel, use that interface in form and sense ids and then detect and present a nice error.
OR
- Use the current assumption that full entity IDs are [A-Z]\d+, and throw the error only based on that fact. (less work to do and easy to change in the future)