[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-24 Thread MarcoAurelio
MarcoAurelio added a comment.
Thanks for your assistance TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lucas_Werkmeister_WMDE, MarcoAurelioCc: Dereckson, mmodell, gerritbot, thiemowmde, Lucas_Werkmeister_WMDE, MarcoAurelio, Aklapper, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g, Krenair___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-09 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.
See https://gerrit.wikimedia.org/r/425076 (I didn’t add a link to this task because I don’t think it’s really a part of this anymore, just a follow-up).TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lucas_Werkmeister_WMDECc: gerritbot, thiemowmde, Lucas_Werkmeister_WMDE, MarcoAurelio, Aklapper, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g, Krenair___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-09 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.
I don't think it should return the unnormalized original string.

Well, at least I see no reason not to return the normalized string when the API actually gave it to us, just because the page happens to be missing. But I guess that’s a separate change.TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lucas_Werkmeister_WMDECc: gerritbot, thiemowmde, Lucas_Werkmeister_WMDE, MarcoAurelio, Aklapper, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g, Krenair___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-08 Thread gerritbot
gerritbot added a comment.
Change 424849 merged by jenkins-bot:
[mediawiki/core@master] Fix (MediaWiki)Site::normalizePageName return type

https://gerrit.wikimedia.org/r/424849TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, thiemowmde, Lucas_Werkmeister_WMDE, MarcoAurelio, Aklapper, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g, Krenair___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-08 Thread gerritbot
gerritbot added a comment.
Change 424629 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Handle normalizePageName() returning non-string values

https://gerrit.wikimedia.org/r/424629TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, thiemowmde, Lucas_Werkmeister_WMDE, MarcoAurelio, Aklapper, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g, Krenair___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-08 Thread thiemowmde
thiemowmde added a comment.
What would be the alternative when we remove all return false from MediaWikiPageNameNormalizer::normalizePageName? I don't think it should return the unnormalized original string. In my opinion it would need to throw an exception – which means all code that currently expects false would need to be rewritten. I suggest to document the methods returning false.TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: thiemowmdeCc: gerritbot, thiemowmde, Lucas_Werkmeister_WMDE, MarcoAurelio, Aklapper, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g, Krenair___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-08 Thread gerritbot
gerritbot added a comment.
Change 424849 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/core@master] Fix (MediaWiki)Site::normalizePageName return type

https://gerrit.wikimedia.org/r/424849TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, thiemowmde, Lucas_Werkmeister_WMDE, MarcoAurelio, Aklapper, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331, Jay8g, Krenair___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-06 Thread gerritbot
gerritbot added a comment.
Change 424629 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Handle normalizePageName() returning non-string values

https://gerrit.wikimedia.org/r/424629TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: gerritbotCc: gerritbot, thiemowmde, 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


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-06 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.
Also, what do we do now? Do we update the documentation of core’s normalizePageName functions to make clear that they can also return false, and change SpecialItemByTitle to deal with the false possibility; or should they be changed to not return false anymore?TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lucas_Werkmeister_WMDECc: thiemowmde, 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


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-06 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.
Sorry, I used the API sandbox incorrectly, the API does return something. But the case is very simple – if the API reports that the page is missing, then MediaWikiPageNameNormalizer::normalizePageName returns false.

The only open question is why this hasn’t come up before? I can’t see any recent changes in the most closely related lines of code. But according to Logstash this first started happening at 2018-03-14…TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lucas_Werkmeister_WMDECc: 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


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-06 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.
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?

On a local install, such a request returns a proper title. And my MediaWiki is fairly up to date, so perhaps this is a regression in wmf.27 that was already fixed in master?TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lucas_Werkmeister_WMDECc: 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


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-06 Thread Lucas_Werkmeister_WMDE
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 DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Lucas_Werkmeister_WMDECc: 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


[Wikidata-bugs] [Maniphest] [Commented On] T191634: 2018-04-06 13:43:57: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"

2018-04-06 Thread MarcoAurelio
MarcoAurelio added a comment.
Another instance:

https://www.wikidata.org/w/index.php?title=Special%3AItemByTitle=enwiki=Protecci%C3%B3n+de+datos
[Wsd6uwpAADgAAICpXDMAAACP] 2018-04-06 13:48:44: Fatal exception of type "Wikimedia\Assert\ParameterTypeException"TASK DETAILhttps://phabricator.wikimedia.org/T191634EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: MarcoAurelioCc: 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