Wikidata / SQID

A tool to analyse, browse and query Wikidata
http://tools.wmflabs.org/sqid/
Apache License 2.0
84 stars 17 forks source link

Authorization of Widar + Edit Label Function + Primary Sources #102

Closed guenthermi closed 7 years ago

guenthermi commented 8 years ago

This adds functions to edit labels in the Item View. Moreover, proposals for statements and references from primary sources will be included and can be approved or rejected if a user has authorized SQID to do edits on Wikidata

mkroetzsch commented 7 years ago

On https://tools.wmflabs.org/sqid/dev/#/view?id=Q1121732 when uncollapsing the genre statements, I receive an error on the console:

Error: [$parse:lexerr] Lexer Error: Unterminated quote at columns 743-770 [');$event.stopPropagation()] in expression [reject('%7BNaNd%22%3A36274%2C%22mainsnak%22%3A%7B%datavalue%22%3A%7B%22type%22%3A%22wikibase-entityid%22%2C%22value%22%3A%7B%22entity-type%22%3A%item%22%2C%22numeric-id%22%3A2187392%7D%7D%2C%22property%22%3A%22P136%22%2C%snaktype%22%3A%22value%22%7D%2C%22qualifiers%22%3A%7B%7D%2C%22rank%22%3A%22normal%22%2C%22type%22%3A%claim%22%2C%22references%22%3A%5B%7B%snaks%22%3A%7B%22P854%22%3A%5B%7B%datavalue%22%3A%7B%22type%22%3A%string%22%2C%22value%22%3A%22http%3A%2F%2Fbuycdnow.ca%2Fproducts%2FNow-You'Re-Gone%253A-The-Album-Bass-Hunter-(Audio-CD)-EAN%253A-5051275016727.html%22%7D%2C%22property%22%3A%22P854%22%2C%snaktype%22%3A%22value%22%7D%5D%7D%2C%snak-order%22%3A%5Bnull%5D%7D%5D%2C%source%22%3A%22PrimarySources%22%7D');$event.stopPropagation()].
http://errors.angularjs.org/1.5.0/$parse/lexerr?p0=Unterminated%20quote&p1=s%20743-770%20%5B')%3B%24event.stopPropagation()%5D&p2=reject('%257B%id%2522%253A36274%252C%2522mainsnak%2522%253A%257B%datavalue%2522%253A%257B%2522type%2522%253A%2522wikibase-entityid%2522%252C%2522value%2522%253A%257B%2522entity-type%2522%253A%item%2522%252C%2522numeric-id%2522%253A2187392%257D%257D%252C%2522property%2522%253A%2522P136%2522%252C%snaktype%2522%253A%2522value%2522%257D%252C%2522qualifiers%2522%253A%257B%257D%252C%2522rank%2522%253A%2522normal%2522%252C%2522type%2522%253A%claim%2522%252C%2522references%2522%253A%255B%257B%snaks%2522%253A%257B%2522P854%2522%253A%255B%257B%datavalue%2522%253A%257B%2522type%2522%253A%string%2522%252C%2522value%2522%253A%2522http%253A%252F%252Fbuycdnow.ca%252Fproducts%252FNow-You'Re-Gone%25253A-The-Album-Bass-Hunter-(Audio-CD)-EAN%25253A-5051275016727.html%2522%257D%252C%2522property%2522%253A%2522P854%2522%252C%snaktype%2522%253A%2522value%2522%257D%255D%257D%252C%snak-order%2522%253A%255Bnull%255D%257D%255D%252C%source%2522%253A%2522PrimarySources%2522%257D')%3B%24event.stopPropagation()
    at https://tools.wmflabs.org/sqid/dev/lib/angular.js:68:12
    at Lexer.throwError (https://tools.wmflabs.org/sqid/dev/lib/angular.js:13458:11)
    at Lexer.readString (https://tools.wmflabs.org/sqid/dev/lib/angular.js:13549:10)
    at Lexer.lex (https://tools.wmflabs.org/sqid/dev/lib/angular.js:13396:14)
    at Object.ast (https://tools.wmflabs.org/sqid/dev/lib/angular.js:13581:30)
    at Object.compile (https://tools.wmflabs.org/sqid/dev/lib/angular.js:14040:31)
    at Parser.parse (https://tools.wmflabs.org/sqid/dev/lib/angular.js:14927:29)
    at $parse (https://tools.wmflabs.org/sqid/dev/lib/angular.js:15035:39)
    at Object.compile (https://tools.wmflabs.org/sqid/dev/lib/angular.js:24542:20)
    at applyDirectivesToNode (https://tools.wmflabs.org/sqid/dev/lib/angular.js:8740:32)

Is this related to the suggestions?

mkroetzsch commented 7 years ago

Again on https://tools.wmflabs.org/sqid/dev/#/view?id=Q1121732, many genres are listed several times, since they have several references. We had already discussed this. However, I also find that the first of the statements listed always shows "Reference" while the subsequent ones show "Reference (Proposal)" for this section heading. Even if we have statements with three references listed three times, they should at least look the same in all cases.

Better yet would be to merge them and have controls as in the PrimarySources gadget for Wikidata (there, one can approve the statement alone, and any of the references, so a statement with three proposed references has four proposal controls).

mkroetzsch commented 7 years ago

Accessing the dev installation on labs now, I receive several errors on the console related to SPARQL and PrimarySources. Moreover, I cannot see any edit button for changing the label, although I am shown to be logged in properly.