Page MenuHomePhabricator

Use correct validator in alias changeop and provide error messages if alias is too short
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:

  1. execute wbeditentity with {"aliases":{"en":{"language":"en", "value":""}}} as data

Actual Results:

{
    "error": {
        "code": "modification-failed",
        "info": "\u29fcwikibase-validator-label-too-short\u29fd",
        "messages": [
            {
                "name": "wikibase-validator-label-too-short",
                "parameters": [
                    "1",
                    ""
                ],
                "html": {
                    "*": "\u29fcwikibase-validator-label-too-short\u29fd"
                }
            }
        ],
        "*": "See https://wikidata.beta.wmflabs.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
    },
    "servedby": "deployment-mediawiki-09"
}

Expected Results:

{
    "error": {
        "code": "modification-failed",
        "info": "Alias must be at least one character long",
        "messages": [
            {
                "name": "wikibase-validator-alias-too-short",
                "parameters": [
                    "1",
                    ""
                ],
                "html": {
                    "*": "Alias must be at least one character long"
                }
            }
        ],
        "*": "See http://default.web.mw.localhost:8080/mediawiki/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
    },
    "servedby": "3f235d6776a2"
}

acceptance criteria

  • correct message key
  • English message for too short label, description and alias is available

Event Timeline

Change 510210 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Use correct validator and provide error messages

https://gerrit.wikimedia.org/r/510210

Change 510210 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use correct validator and provide error messages

https://gerrit.wikimedia.org/r/510210