[08:02:31] Aleksey_WMDE: in case you are around, I eventually your patch for the csrf bad token issue [09:52:15] hashar: Hi. Sorry, you what? :) [11:18:11] Aleksey_WMDE: you had an issue with some mw api call failing due to csrf tokens https://phabricator.wikimedia.org/T160519 [11:18:13] should be fixed now [11:18:43] and I guess the patch in mediawiki core will be rewritten / tweaked [11:34:06] hashar: I've noticed already. Thank you very much! [11:49:25] JeroenDeDauw: Aleksey_WMDE: https://github.com/wmde/WikibaseDataModelSerialization/pull/218 [11:52:59] Thiemo_WMDE: One thing only. Other is ok [11:53:18] PHP does not have named arguments. [11:53:43] What I did in this patch was switching the two existing constructor calls. one with false, the other with the default. [11:54:18] I would prefer a string argument like `no-hashes` nowadays, but do not want to change the signature now. [12:02:29] Aleksey_WMDE: Aleksey_WMDE a string 'no-hashes' seems kinda odd. Why not a constant? [12:03:16] I mean just define a local variable [12:03:24] Thiemo_WMDE: ^ [12:05:01] I know you like this, but I feel this makes the code more complicated and harder to read in a lot of cases, this included. A local variable $serializeWithHashes = false; one line above the constructor might be ok. [12:05:06] ah, this thing is package private. Not a huge deal there are no consts then [12:05:46] I think in this case the issue is really minor [12:05:52] It's annoying in the diff [12:05:59] Since you can't click on SnakSerializer [12:06:05] But if you actually work with the test... [12:12:02] Aleksey_WMDE: Done. [12:51:06] Lydia_WMDE: Auregann_WMDE FYI interwiki sorting is once again being done by the InterwikiSorting extension everywhere :) [13:34:20] Hey folks. I'm trying to re-render a wikidata item so that it includes *all* label/description/alias translations. [13:34:40] But using api.php?action=parse always reads my language fallback and picks the "best" translations [13:35:29] Essentially, I'm looking for a way to get the HTML for an item that has "All entered languages" and all "# references" bits expanded. [13:45:17] E.g. this returns all translations and references: https://www.wikidata.org/wiki/Special:EntityData/Q18627581.json [13:45:28] But in json. I'd love to have the HTML rendering with all this. [15:05:47] someone who can help me to write statements with php addwiki [15:05:50] someone who can help me to write statements with php addwiki ? [15:14:52] Hanno_: Don't ask to ask, just ask. :) [15:15:15] Noone knows until you ask your followup question, I'm afraid... [15:27:22] I can set a statement with a stringvalue, but don't succeed to set a statement with a QID. I currently have ->addNewStatement(new PropertyValueSnak(PropertyId::newFromNumber( '31' ), new EntityIdValue( new ItemId( 'Q5' ) ))); [15:29:16] My bot can write qids like this one: https://www.wikidata.org/wiki/Q28948413 but I want to write that the qid is a human [15:30:55] addshore: ah cool. thanks :) [15:31:35] addshore: see Hanno_'s question [15:31:53] halfak: Thiemo_WMDE and Jonas_WMDE might be bale to help but they are afk [15:32:34] Lydia_WMDE, gotcha thanks :) [16:07:18] Thiemo_WMDE & Jonas_WMDE, please ping when you get back. :) [16:38:43] halfak: I'm afraid what you are asking for does not exist. The terms section is dynamically created via JavaScript from JSON. You have to do the same. [16:39:26] Thiemo_WMDE, gotcha. So it looks like we'll need to write some wikidata rendering code :/ [16:40:07] So, I guess people without JS just can't edit the labels/descriptions/aliases. [16:40:43] Sure you can. You can call Special:SetLabel/en with any language. [16:40:55] Or better Special:SetLabelDescriptionAliases/en [16:41:31] The "edit" link will point to this page in case JS is disabled. [16:42:07] For what do you need such a "rendering"? [16:42:30] There is also a gadget on wikidata.org you can enable to quickly see all labels/descriptions/aliases. [16:45:02] Thiemo_WMDE, we're having people label the quality of Wikidata items. Translation coverage is an important characteristic. We're re-rendering Wikidata items in a labeling interface. [16:45:11] We're hoping to not do an iframe. [16:45:20] In the case of Wikipedia articles, we can use the HTML from the API [16:45:28] but with Wikidata, the HTML from the API is insufficient. [16:55:03] Well. Wikidata is not just the one article somebody wrote. It's a database. The HTML you see on wikidata.org is just one way to look at the data. What you need sounds very different from what the UI on wikidata.org currently aims for. [16:55:13] So yes, you need to render your own HTML. [16:56:03] Thiemo_WMDE, re. db, I'm not sure what you mean. An item is a pretty clear unit. I want everything in an item rendered so that it can be reviewed. [16:56:09] Should not be that hard. Just retrieve the JSON via the API, iterate it and wrap the strings in a table. jQuery helps. [16:56:29] What do you mean with "cleat unit"? [16:56:59] "Rendered" how? This heavily depends on your use case. There is just not *the* one way to render items. [16:57:19] Rendered where all of the data captured in the item is presented to the user. [16:57:28] When I say "item", I mean "item JSON blob" [16:57:51] Again the same question: "presented" how? This depends on the use case. [16:57:57] HTML in a browser [16:58:20] It's hard to tell if your questions are nit picking details or leading somewhere... [16:58:27] The canonical representation we give you is the JSON. [16:58:49] My questions are more rhetorical questions to help you understand. [16:58:59] What would you like me to understand? [16:59:19] There is no canonical HTML representation on a wikidata item. [16:59:38] Of course there isn't. I don't see what that is an issue. I never used the term "canonical" [17:00:46] It's what I understood what you are asking for. [17:01:06] I want an HTML view that shows all of the data in the item. [17:01:49] That would be a canonical HTML representation of an item. [17:02:16] It would be one of many potential representations that matches the constraints that all data values are apparent. [17:02:30] E.g. you could have a mobile view and a desktop view, etc. [17:02:41] I don't think there's any API now that provides HTML rendering of an item, besides the Wikidata GUI output itself [17:02:50] You could just show the item IDs (that wouldn't be good enough for me) or you could look up labels in a user's language. [17:03:00] SMalyshev, action=parse [17:03:09] We do lookup labels. What are we talking about now??? [17:03:18] But it doesn't output the labels and descriptions. [17:03:42] It does. [17:03:53] Not all of them [17:03:58] Only one actually [17:04:04] halfak: hmm I don't see action=parse working [17:04:29] SMalyshev, what? https://www.wikidata.org/w/api.php?action=help&modules=parse [17:04:36] Again, I still believe you are on a wrong train and are probably assuming something that does not hold for a database that stores unstructured data, in contrast to wikitext. [17:04:49] halfak: ahh, sorry, misunderstood you... let me see [17:04:52] Theimo, I'm looking for all of the data in the JSON blob [17:05:01] I don't understand what the problem is with this. [17:05:10] Then request the JSON blob. [17:05:12] You can see what I want if you expand all of the things on an item page. [17:05:18] But I want HTML rendered :) [17:05:25] Thats JavaScript, not HTML from the parser cache. [17:06:21] What you get is HTML from the parser cache. This HTML is exclusively build to feed the editing UI on wikidata.org. It is not for consumers like you. If it fits, then use it, this is fine. But if it doesn't fit, you have to render your own HTML. [17:07:26] Right. I thought maybe I could ask for a full list for when I have javascript disabled. [17:08:03] Again, this exists, and it gives you JSON. [17:08:44] That's not OK for a user. But I understand you that this is not available and I'll need to do it myself. [17:09:12] Sure thats not ok for an end user. [17:14:28] OK I think I understand what I must do. Thanks for your help Thiemo_WMDE [17:16:50] FYI Amir1 ^ [17:17:12] Looks like we're going to need to either use an iframe or implement our own rendering of item JSON blobs. [17:52:32] halfak: https://www.wikidata.org/wiki/Q23?action=render ? [17:53:13] halfak: i have tried to read back on your discussion, but i didn't get your use case. [18:07:08] o/ DanielK_WMDE [18:07:31] SO I want to show items to users and have them rate the quality inside of Wikilabels. [18:07:44] halfak: yea, Thiemo_WMDE is telling me about it now [18:07:44] In order to do that, I need to show all language translations [18:07:47] kk [18:09:05] halfak: yea... that's a bit tricky, since it would mess with the parser cache. we'd need to have a fake "all" language, or something like that. [18:09:17] but it seems you guys found a hack :) [18:10:47] iframes are shameful, but they'll help solve this problem, I think. [18:17:34] halfak: that's probably the only viable short term solution. for the Real Solution (pm), we'd probably want a dedicated API module, or action handler. IF you want to aim for this, please file a ticket describing your use case and requirements. [18:17:47] *tm. [18:17:49] whatever. [18:18:06] DanielK_WMDE, gotcha. Can do. [18:18:15] * DanielK_WMDE has been writing too much about project managers and product managers and program managers and... [21:15:50] Hi everyone! :) [21:16:10] Is there anyone available to solve some doubts/problems with Wikibase? [22:05:26] Ivanhercaz: don't ask to ask, just ask :) [22:05:48] Okay pintoch :) [22:06:05] (I'm not saying I'll be of any help ^^) [22:06:42] I sent the doubt to wikitech but I haven't received any response, so I want to try again here [22:07:03] my doubt is about the configuration of Wikibase Repo and Client in the same MediaWiki installation [22:07:54] I am having some errors that hinder me to work in my project [22:08:45] If anyone could help me, I will share here the errors to check it together