Skip to content
This repository has been archived by the owner on Oct 14, 2019. It is now read-only.

'Create <person name>' button not working at the reconcile step #169

Closed
rich-cassidy opened this issue Jun 27, 2018 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@rich-cassidy
Copy link

image

The button just isn't doing anything.

Encountered whilst verifying the Deputies of Sicily and the Regional Councillors for Milan.

@rich-cassidy
Copy link
Author

Create button worked on this verification-page: https://www.wikidata.org/wiki/User:Graemebp/verification/ca/ontario

I think for statement 232277344018967

@tmtmtmtm tmtmtmtm added the bug Something isn't working label Jun 28, 2018
@mhl
Copy link
Contributor

mhl commented Jul 11, 2018

The error here is at:

item: result.entity.id,
- result has no entity element. e.error indicates it's a "inconsitent-language" error.

This looks like it's because the person is being created with this data:

{
  "labels": {
    "it": {
      "language": "it",
      "value": "Elena Pagana"
    }
  },
  "descriptions": {
    "it": {
      "language": "en",
      "value": "Italian politician"
    }
  },
  "claims": [
    {
      "mainsnak": {
        "snaktype": "value",
        "property": "P106",
        "datavalue": {
          "value": {
            "entity-type": "item",
            "numeric-id": 82955
          },
          "type": "wikibase-entityid"
        }
      },
      "type": "statement",
      "rank": "normal"
    }
  ]
}

I guess it's because of the descriptions element having an it key, but the language in the value object being en.

I think that can probably be fixed by changing the label.lang here to description.lang:

data.descriptions[label.lang] = {
language: description.lang,
value: description.value,
};

@mhl
Copy link
Contributor

mhl commented Jul 12, 2018

Also, if checkForError were added looking at the result of creating the item, I think that more helpful error should be propagated up.

@gbp
Copy link
Member

gbp commented Jul 12, 2018

Confirmed the same issue as diagnosed by @mhl. Just adding checkForError isn't enough to catch these errors so have created a new issue.

@gbp gbp closed this as completed in #266 Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants