https://bugzilla.wikimedia.org/show_bug.cgi?id=63391
Bug ID: 63391 Summary: Unexpected non-MediaWiki exception encountered, of type "InvalidArgumentException" [c0399059] /wiki/Special:SetSiteLink Exception from line 78 of ChangeOpSiteLink.php Product: MediaWiki extensions Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: WikidataRepo Assignee: wikidata-b...@lists.wikimedia.org Reporter: aude.w...@gmail.com CC: wikidata-b...@lists.wikimedia.org Web browser: --- Mobile Platform: --- I added a setting for badgeItems: $wgWBRepoSettings['badgeItems'] = array( 'Q337', 'Q338' ); Then tried to use Special:SetSiteLink to add a badge, entering Q337 and encountered an uncaught exception. 1) not sure I am setting badgeItems correctly. It is not documented in docs/options.wiki nor does Wikibase.default.php (in repo/config) explain the setting. 2) I think a bit more handling of exceptions is needed in the special page to take care of edge cases and whatnot, like this. Unexpected non-MediaWiki exception encountered, of type "InvalidArgumentException" [c0399059] /wiki/Special:SetSiteLink Exception from line 78 of /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/ChangeOp/ChangeOpSiteLink.php: Only items specified in the config can be badges Backtrace: #0 /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/specials/SpecialSetSiteLink.php(458): Wikibase\ChangeOp\ChangeOpSiteLink->__construct(string, string, array) #1 /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/specials/SpecialSetSiteLink.php(159): Wikibase\Repo\Specials\SpecialSetSiteLink->setSiteLink(Wikibase\DataModel\Entity\Item, string, string, array, Wikibase\Summary) #2 /Library/WebServer/Documents/php-master/extensions/Wikibase/repo/includes/specials/SpecialModifyEntity.php(92): Wikibase\Repo\Specials\SpecialSetSiteLink->modifyEntity(Wikibase\DataModel\Entity\Item) #3 /Library/WebServer/Documents/php-master/includes/specialpage/SpecialPage.php(379): Wikibase\Repo\Specials\SpecialModifyEntity->execute(NULL) #4 /Library/WebServer/Documents/php-master/includes/specialpage/SpecialPageFactory.php(503): SpecialPage->run(NULL) #5 /Library/WebServer/Documents/php-master/includes/Wiki.php(285): SpecialPageFactory::executePath(Title, RequestContext) #6 /Library/WebServer/Documents/php-master/includes/Wiki.php(588): MediaWiki->performRequest() #7 /Library/WebServer/Documents/php-master/includes/Wiki.php(447): MediaWiki->main() #8 /Library/WebServer/Documents/php-master/index.php(46): MediaWiki->run() #9 {main} -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l