Lucas_Werkmeister_WMDE added a comment.

I think this might be what’s happening:

  • Wikibase attempts to normalize the title locally, and look up an item for that title. It fails.
  • Wikibase asks MediaWiki to normalize the title according to the rules of that wiki. ($siteObj->normalizePageName( $page ) in SpecialItemByTitle)
  • $siteObj is a MediaWikiSite (pure guess, but feels likely?), and to normalize the title, it actually uses an API request to the other site (MediaWikiSite::normalizePageName calls MediaWikiPageNameNormalizer::normalizePageName).
  • The API request returns empty data, or some error, or whatever – in any event, MediaWikiPageNameNormalizer::normalizePageName has plenty of opportunities to return false.
  • The false is passed through all the way back to SpecialItemByTitle, where it causes an error because the only declared return type for all of this was string, never bool.

As far as I can tell, this will happen for any Special:ItemByTitle request for a page that doesn’t exist on the remote wiki, since action=""> (the query that MediaWikiPageNameNormalizer::normalizePageName issues) returns an empty response for such pages.

I hardly expect that this error has always happened – surely we would have noticed sooner? At a guess, I’d say that the most likely cause seems that the API request would in the past have returned a normalized title even for pages that don’t exist, and now it doesn’t anymore?

Please take all of this with a lot of grains of salt :)


TASK DETAIL

EMAIL PREFERENCES

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, MarcoAurelio, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to