Lucas_Werkmeister_WMDE renamed this task from "Special:SetLabel and friends should not accept Labels or Forms as input" to "Special:SetLabel and friends crash on entities that do not support terms".
Lucas_Werkmeister_WMDE added a project: Wikimedia-production-error.
Lucas_Werkmeister_WMDE updated the task description. (Show Details)

CHANGES TO TASK DESCRIPTION
Special:SetLabel shoudl reject entity types that do not support labels., Special:SetDescription and Special:SetAliases all result in an `InvalidArgumentException` when called with a lexeme, sense or form ID.
{F27552620}
```counterexample
InvalidArgumentException from line 76 of /srv/mediawiki/php-1.33.0-wmf.8/extensions/Wikibase/repo/includes/Specials/SpecialSetLabel.php: $entity must be a LabelsProvider
#0 /srv/mediawiki/php-1.33.0-wmf.8/extensions/Wikibase/repo/includes/Specials/SpecialModifyTerm.php(289): Wikibase\Repo\Specials\SpecialSetLabel->getValue(Wikibase\Lexeme\Domain\Model\Lexeme, string)
#1 /srv/mediawiki/php-1.33.0-wmf.8/extensions/Wikibase/repo/includes/Specials/SpecialModifyTerm.php(212): Wikibase\Repo\Specials\SpecialModifyTerm->setValueIfNull(Wikibase\Lexeme\Domain\Model\Lexeme)
#2 /srv/mediawiki/php-1.33.0-wmf.8/extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php(294): Wikibase\Repo\Specials\SpecialModifyTerm->getForm(Wikibase\Lexeme\Domain\Model\Lexeme)
#3 /srv/mediawiki/php-1.33.0-wmf.8/extensions/Wikibase/repo/includes/Specials/SpecialModifyEntity.php(226): Wikibase\Repo\Specials\SpecialModifyEntity->setForm(Wikibase\Lexeme\Domain\Model\Lexeme)
#4 /srv/mediawiki/php-1.33.0-wmf.8/includes/specialpage/SpecialPage.php(569): Wikibase\Repo\Specials\SpecialModifyEntity->execute(string)
#5 /srv/mediawiki/php-1.33.0-wmf.8/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(string)
#6 /srv/mediawiki/php-1.33.0-wmf.8/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#7 /srv/mediawiki/php-1.33.0-wmf.8/includes/MediaWiki.php(862): MediaWiki->performRequest()
#8 /srv/mediawiki/php-1.33.0-wmf.8/includes/MediaWiki.php(517): MediaWiki->main()
#9 /srv/mediawiki/php-1.33.0-wmf.8/index.php(42): MediaWiki->run()
#10 /srv/mediawiki/w/index.php(3): include(string)
#11 {main}
```


Observed behavior: when clicking "set label"Special:SetLabelDescriptionAliases, on the other hand, “correctly” displays the form just re-appearsbut does nothing when you submit it.
Observed behavior: an error message saying that lexemes do not support label{F27552593}

Instead, they should all display a sensible error to the user, saying that this entity type does not support labels, descriptions, and/or aliase
s.

TASK DETAIL
https://phabricator.wikimedia.org/T195449

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Aklapper, daniel, Nandana, Mringgaard, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, D3r1ck01, Wikidata-bugs, aude, Darkdadaah, Jdforrester-WMF, Mbch331, Jay8g, Krenair
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to