[Wikidata-bugs] [Maniphest] [Commented On] T181885: Links open in the current tab despite Ctrl+click or Shift+click
Zorglub27 added a comment. ooh I didn't see the preview button, but yes, just adding a href to query.wikidata.org#SELECT... URLs and not preventing default on click events when opened outside shouldn't be too hard(?) and of great value for tabs extensive users :)TASK DETAILhttps://phabricator.wikimedia.org/T181885EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Zorglub27Cc: Jonas, Smalyshev, Zorglub27, Aklapper, Lahi, Gq86, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, FloNight, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T181885: Links open in the current tab despite Ctrl+click or Shift+click
Zorglub27 added a comment. yes, the examples dialog, but mostly the links to the example queries themselves: every layout that has the possibility to be built from the URL (so for example queries that would be https://query.wikidata.org/#[the serialized SPARQL]), should ideally offer the possibility to be open outside) Use case: there is that SPARQL pattern I'm not totally familiar with, I want to browse 5 different examples at once to understand how it's used in example queries, so I will go in the examples list and Ctrl+click the 5 corresponding URLs in new tabs, giving me the possibility to easily switch between them with Ctrl+Tab. The current way to do that is to open 5 tabs, enter 5 times in the example list, filter 5 times the list to find the desired queries, and finally click the desired example query to make it load in the current page.TASK DETAILhttps://phabricator.wikimedia.org/T181885EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Zorglub27Cc: Smalyshev, Zorglub27, Aklapper, Lahi, Gq86, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Edited] T181885: Links open in the current tab despite Ctrl+click or Shift+click
Zorglub27 updated the task description. (Show Details) CHANGES TO TASK DESCRIPTION...**Possible reason this behave this way**: you might be calling [`preventDefault`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) on all click events, in which case you need to filter-out events that correspond to an open outside click, see this [`isOpenOutside`](https://github.com/inventaire/inventaire-client/blob/8e3df86/app/lib/utils.coffee#L65-L83) filter functionTASK DETAILhttps://phabricator.wikimedia.org/T181885EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Zorglub27Cc: Zorglub27, Aklapper, Lahi, Gq86, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Created] T181885: Links open in the current tab despite Ctrl+click or Shift+click
Zorglub27 created this task.Zorglub27 added a project: Wikidata-Query-Service.Herald added a subscriber: Aklapper.Herald added projects: Wikidata, Discovery. TASK DESCRIPTIONCurrent behavior: when Ctrl+clicking a link (for instance in the examples list) to open it in a new tab, it actually opens the example in the current tab, replacing the SPARQL request we might have been working on. Expected behavior: mimic the default web pages behaviors: Ctrl+click (or Cmd+click on Mac): open in a new tab (let the current page intact) Shift+click: open in a new window (let the current page intact) Possible reason this behave this way: you might be calling preventDefault on all click events, in which case you need to filter-out events that correspond to an open outside click, see this isOpenOutsideTASK DETAILhttps://phabricator.wikimedia.org/T181885EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Zorglub27Cc: Zorglub27, Aklapper, Lahi, Gq86, Lucas_Werkmeister_WMDE, GoranSMilovanovic, QZanden, EBjune, merbst, Avner, debt, Gehel, Jonas, FloNight, Xmlizer, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Edited] T168057: create slide deck with Wikidata showcases
Zorglub27 updated the task description. (Show Details) CHANGES TO TASK DESCRIPTION...* inventaire https://inventaire.io https://wiki.inventaire.io/wiki/Books-data * Wikidata Game https://tools.wmflabs.org/wikidata-game/distributed/...TASK DETAILhttps://phabricator.wikimedia.org/T168057EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Zorglub27Cc: Framawiki, Planemad, Jonas, Spinster, Magnus, Multichill, NavinoEvans, Zorglub27, Lucie, Tpt, Andrawaag, Fnielsen, Pigsonthewing, Lucas_Werkmeister_WMDE, Lea_Lacroix_WMDE, johl, Aklapper, Lydia_Pintscher, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, aude, Mbch331___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T85101: create index for each dump
Zorglub27 added a comment. Copying here the suggestion I made in the mailing list A plea for incremental dumps thread: I think Apache CouchDB would be a great fit to address the issue of keeping up to date with the whole database. Quoting Wikipedia article: Main features [...] Distributed Architecture with Replication CouchDB was designed with bi-direction replication (or synchronization) and off-line operation in mind. That means multiple replicas can have their own copies of the same data, modify it, and then sync those changes at a later time. Wikimedia could run a CouchDB instance updated live, or, if not possible, on the same regularity as dumps. People interested could either run their own instance live mirroring Wikimedia master instance (using replication), or simply from time to time make a request to know which entities changed (using the _changes endpoint) I guess the first replication will take more time/be more resource intensive than a simple file dump, but that would be compensated quickly on the following differential updates. This would be beautiful :) Let me know if I can help on making it happen Bests, Maxime The _change endpoint I mention would provide the desired list of IDs that changed, plus a few goodies such as the include_docs or filter optionsTASK DETAILhttps://phabricator.wikimedia.org/T85101EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Zorglub27Cc: Zorglub27, Chaotix63, JanZerebecki, Aklapper, hoo, mschwarzer, Avner, debt, Gehel, D3r1ck01, Jonas, FloNight, Xmlizer, Izno, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Deskana, Manybubbles, Mbch331___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Created] T142850: wbgetentities doesn't find entities when given Wikipedia redirected titles
Zorglub27 created this task.Zorglub27 added a project: Wikidata.Herald added a subscriber: Aklapper. TASK DESCRIPTIONhttps://en.wikipedia.org/wiki/Angus_and_Robertson is redirected to https://en.wikipedia.org/wiki/Angus_%26_Robertson but https://www.wikidata.org/w/api.php?action=""> fails to find this redirection : any chance this could get fixed or is there something blocking the redirection resolution?TASK DETAILhttps://phabricator.wikimedia.org/T142850EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Zorglub27Cc: Zorglub27, Aklapper, D3r1ck01, Izno, Wikidata-bugs, aude, Mbch331___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T133026: [Bug] WDQS GUI caching
Zorglub27 added a comment. @JanZerebecki oh sorry, that should be published now TASK DETAIL https://phabricator.wikimedia.org/T133026 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Smalyshev, Zorglub27 Cc: Zorglub27, gerritbot, daniel, TerraCodes, Gehel, Lydia_Pintscher, JanZerebecki, Jonas, Aklapper, Avner, Lewizho99, Maathavan, debt, D3r1ck01, FloNight, Izno, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Deskana, Manybubbles, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T133026: [Bug] WDQS GUI caching
Zorglub27 added a comment. Hi! Following today's issue with the query GUI, I had a look at the code and thought of some optimizations, without being aware of this discussion, leading to the writing of a simple building script <https://gerrit.wikimedia.org/r/#/c/288250/>. Given I did it without this conversation in mind, feel free to ignore it or just take is as inspiration. If you want to use a more elaborate build process, particularly fast in development mode, I would recommend having a look at brunch <http://brunch.io> which is specialized in building this kind of front app. See here how it relates to Grunt, Gulp and others <https://github.com/brunch/brunch-guide/blob/master/content/en/chapter01-whats-brunch.md#brunch-vs-others> TASK DETAIL https://phabricator.wikimedia.org/T133026 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Smalyshev, Zorglub27 Cc: Zorglub27, gerritbot, daniel, TerraCodes, Gehel, Lydia_Pintscher, JanZerebecki, Jonas, Aklapper, Avner, Lewizho99, Maathavan, debt, D3r1ck01, FloNight, Izno, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Deskana, Manybubbles, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T123777: calendarmodel URL triggers a abusefilter-warning-URL error
Zorglub27 added a comment. thanks @hoo for the quick answer, I opened a discussion here <https://www.wikidata.org/wiki/Wikidata_talk:Abuse_filter#impossible_to_add_a_calendarmodel_URL_due_to_abusefilter-warning-URL_.27URLs_within_label.2Fdescription.2Falias.27.2C_34> TASK DETAIL https://phabricator.wikimedia.org/T123777 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: hoo, Zorglub27 Cc: hoo, Aklapper, StudiesWorld, Zorglub27, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Created] T123777: calendarmodel URL triggers a abusefilter-warning-URL error
Zorglub27 created this task. Zorglub27 added a subscriber: Zorglub27. Zorglub27 added a project: Wikidata. Herald added subscribers: StudiesWorld, Aklapper. TASK DESCRIPTION I'm having difficulties with the [[ https://www.wikidata.org/w/api.php?action=help&modules=wbeditentity | wbeditentity API ]] action: for time datavalue, it expects a calendarmodel but when passed a URL, I get this error ``` { servedby: 'mw1235', error: { code: 'failed-save', info: '', messages: [ { name: 'abusefilter-warning-URL', parameters: [ 'URLs within label/description/alias', 34 ], html: { '*': 'Warning: Please don\'t insert URL into the label, description or alias field. If you are trying to spam, you may get blocked. For adding sitelinks scroll down.' } } ], '*': 'See https://www.wikidata.org/w/api.php for API usage' } } ``` and trying to pass only the qid (Q1985727) instead of the full URL (http://www.wikidata.org/entity/Q1985727) also returns an error ``` servedby: 'mw1134', error: { code: 'modification-failed', info: 'Malformed URL: Q1985727', messages: [ { name: 'wikibase-validator-bad-url', parameters: [ 'Q1985727' ], html: { '*': 'Malformed URL: Q1985727' } } ], '*': 'See https://www.wikidata.org/w/api.php for API usage' } } ``` So how should a calendarmodel URL be passed? TASK DETAIL https://phabricator.wikimedia.org/T123777 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Zorglub27 Cc: Aklapper, StudiesWorld, Zorglub27, Wikidata-bugs, aude, Mbch331 ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T109175: wbcreateclaim API gives confusing error messages regarding how to pass a csrf token
Zorglub27 added a comment. ok, so I came to solve all my problems, including the very nasty '{"servedby":"mw1200","error":{"code":"badtoken","info":"Invalid token","*":"See https://www.wikidata.org/w/api.php for API usage"}}' } which wasn't a problem from the token but in fact from the cookies: I was just using the last cookies while a composition of 2 of 'set-cookie' responses from the 3 steps of this authentification madness where required. At this point you might spit on both my development skills and javascript libs cookie management but there are at least 2 things to learn from my lost 12 hours: - the documentation and the API error messages are incomplete, cf the parameters that should be passed in the body and not in the query, and the body that had to be x-www-form-urlencoded and not json - one day everything will be json and API keys instead of cookies, and that will be good... until the next generation of developers comes with a new shiny thing ;) thank you Adam for your help! TASK DETAIL https://phabricator.wikimedia.org/T109175 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore, Zorglub27 Cc: Addshore, Zorglub27, Aklapper, Wikidata-bugs, aude, jayvdb, Anomie, Legoktm, Malyacko ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T109175: wbcreateclaim API gives confusing error messages regarding how to pass a csrf token
Zorglub27 added a comment. so that's the code I'm using, with everything in the body, that created the `noentity` error breq = require 'bluereq' Promise = require 'bluebird' _ = require './utils' getCsrfToken = require './get_csrftoken' base = "https://www.wikidata.org/w/api.php"; module.exports = (args...)-> getCsrfToken .then createClaim.bind(null, args) createClaim = (args, authData)-> [entity, property, value] = args { cookie, token } = authData url = _.buildUrl base, action: 'wbcreateclaim' format: 'json' body = token: token value: value entity: entity property: property snaktype: 'value' # CANT SEND A PROPER TOKEN IN THE BODY return breq.post requestParams(url, cookie, body) requestParams = (url, cookies, body)-> headers = 'Cookie': cookies 'User-Agent': "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0" headers['content-type'] = "application/json" headers['accept'] = "application/json" return req = url: url body: body headers: headers TASK DETAIL https://phabricator.wikimedia.org/T109175 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore, Zorglub27 Cc: Addshore, Zorglub27, Aklapper, Wikidata-bugs, aude, jayvdb, Anomie, Legoktm, Malyacko ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T109175: wbcreateclaim API gives confusing error messages regarding how to pass a csrf token
Zorglub27 added a comment. nop :( now, passing the parameters in the body, I get { servedby: 'mw1189', error: { code: 'noentity', info: 'The entity parameter must be set', '*': 'See https://www.wikidata.org/w/api.php for API usage' } } TASK DETAIL https://phabricator.wikimedia.org/T109175 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore, Zorglub27 Cc: Addshore, Zorglub27, Aklapper, Wikidata-bugs, aude, jayvdb, Anomie, Legoktm, Malyacko ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Commented On] T109175: wbcreateclaim API gives confusing error messages regarding how to pass a csrf token
Zorglub27 added a comment. I have been trying with both that good ol' /usr/bin/curl and a NodeJs lib called request <https://github.com/request/request> (or a promise-wrapped version of it <https://github.com/maxlath/bluereq>) TASK DETAIL https://phabricator.wikimedia.org/T109175 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Addshore, Zorglub27 Cc: Addshore, Zorglub27, Aklapper, Wikidata-bugs, aude, jayvdb, Anomie, Legoktm, Malyacko ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Edited] T109175: wbcreateclaim API gives confusing error messages regarding how to pass a csrf token
Zorglub27 edited the task description. TASK DETAIL https://phabricator.wikimedia.org/T109175 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Zorglub27 Cc: Zorglub27, Aklapper, Wikidata-bugs, aude, Malyacko ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Edited] T109175: wbcreateclaim API gives confusing error messages regarding how to pass a csrf token
Zorglub27 edited the task description. Zorglub27 set Security to None. TASK DETAIL https://phabricator.wikimedia.org/T109175 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Zorglub27 Cc: Zorglub27, Aklapper, Wikidata-bugs, aude, Malyacko ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
[Wikidata-bugs] [Maniphest] [Created] T109175: wbcreateclaim API gives confusing error messages regarding how to pass a csrf token
Zorglub27 created this task. Zorglub27 added a subscriber: Zorglub27. Zorglub27 added a project: Wikidata. Herald added a subscriber: Aklapper. TASK DESCRIPTION hi, I try to use the wbcreateclaim API module but can't figure out how to pass the csrf token correctly: - when I set it in the query string, I get this error ``` { servedby: 'mw1129', error: { code: 'mustposttoken', info: 'The \'token\' parameter was found in the query string, but must be in the POST body', '*': 'See https://www.wikidata.org/w/api.php for API usage' } } ``` from what I could see, this is the normal behavior of the MediaWiki API, cf https://phabricator.wikimedia.org/T72656 - when I pass it in the POST body, either as plain text or json, I get : ``` { servedby: 'mw1128', error: { code: 'notoken', info: 'The token parameter must be set', '*': 'See https://www.wikidata.org/w/api.php for API usage' } ``` - when I pass it both in the query string and the body, I get the first error again. And now I'm confused. Any clue on what I might be doing wrong? Could the API module documentation include examples of how to pass the token? thanks in advance TASK DETAIL https://phabricator.wikimedia.org/T109175 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Zorglub27 Cc: Zorglub27, Aklapper, Wikidata-bugs, aude, Malyacko ___ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs