[02:42:41] Is there really no way to hook a third party wiki up to wikidata as a wikibase client (i.e. An equivalent to $wgUseInstantCommons but for wikibase)? [02:45:40] https://phabricator.wikimedia.org/project/profile/4604/ ? [02:46:37] That's sort of in the direction - but seems more a full federation and not really allowing you to be a simple client [02:47:27] unless i misunderstand [02:47:38] my question mark was not the sarcastic kind [02:47:42] I don't know either [02:49:06] The way they say "property" makes me think they just mean predicates and not items. Its a bit ambigious though [02:49:17] I suppose the best way for me to find out would be to try it and see [02:49:28] It's SDC except extended in some way [02:50:00] https://www.wikidata.org/wiki/Wikidata:Data_access is probably also relevant [02:50:14] where I don't see "set up your own client to access wikidata" [02:50:30] I'm more interested in just having the the lua data query functions work, to easily import templates that depend on wikidata [02:50:56] usually we've just worked around that by adding a boolean for whether you want Wikidata or not [02:51:05] you have access to Wikidata or not * [02:51:42] or a check for whether the Lua module exists [02:51:46] I think is more common [02:52:16] https://www.mediawiki.org/wiki/Wikibase/Installation/Advanced_configuration#Using_only_the_client_or_the_repository [02:52:20] ? [02:53:04] yeah, that requires db access (I think) [02:53:41] The big thing I'd like to do - is better document what precisely you have to do to copy some pages from wikipedia to your own mediawiki instance, and have them just work [02:53:54] sure [02:54:05] The current instructions say things like "install wikidata" [02:54:43] which seems kind of silly, if you can't hook it up to wikidata. I guess installing it makes the lua functions return "no results" for everything, which is good enough for a lot of purposes [02:54:56] Probably [02:55:16] alternatively, Lua throws errors because it expects mw.wikibase to exist but doesn't. [02:55:20] hence the above comment [02:55:25] yeah [13:34:11] Hey there,  i auto created around 500 text files for my private wiki, what is the best way to upload them? [13:38:59] i want to create pages using these txt files [13:44:48] Guest96: You can run a maintenance script from the server where MediaWiki is installed to create pages with that content. See https://www.mediawiki.org/wiki/Manual:Edit.php [13:50:20] that looks like a great solution ty [14:30:06] hi [17:25:46] 60085 Waukegan Illinois [19:07:04] if anyone can help here ( subbu ?), I recently added TemplateStyles to a Module:Message box on en.wp and it doesn't seem to be playing nice with https://en.wikipedia.org/wiki/User:Jackmcbarn/editProtectedHelper.js#L-266 . reported at https://en.wikipedia.org/wiki/User_talk:Jackmcbarn/editProtectedHelper . I have no idea how to troubleshoot it to see if that's the actual cause [19:09:24] ah .. it uses parsoid .. ok. [19:09:34] yeah [19:10:41] i'll have to dig into what this gadget does .. let me poke around a bit. [19:11:27] I can sketch it [19:12:01] but I think https://en.wikipedia.org/wiki/User:Jackmcbarn/editProtectedHelper gives a pretty obvious view to it [19:12:06] for overview [19:12:21] thanks. let me take a look and i'll ping you if i need any help. [19:12:26] you got it [19:21:19] while i am reading the code, so, parsoid html is now at version 2.5.0 ... but afaict so far, there is nothing in the code that depends on changes since 2.0.0 .. but, might be useful to update the gadget to pass a more recent header that is also a good signal that the gadget has been audited for version changes. [19:21:34] https://en.wikipedia.org/wiki/User:Jackmcbarn/editProtectedHelper.js#L-343 [19:31:06] So, https://en.wikipedia.org/w/index.php?diff=1097818674&oldid=1096947406&diffmode=source shows it worked on that sandbox page. Can you point me to a page where it doesn't work? [19:31:19] or maybe i should go look at the reports. [19:34:47] oh .. now, i don't see any of the respond buttons on that sandbox page. [19:35:00] oh good, glad it's broken for you too [19:35:01] :) [19:36:01] I assume the reason it broke there was because the page got purged with your edit [19:36:22] which tells me it almost is definitely Message box, I just don't know why that would impact Parsoid like that [19:37:29] Jack hasn't been around in a year and a half otherwise we'd be bothering him. [19:37:49] (and then he'd probably bother you :) [19:39:53] heh .. i'm going to take a look at the Parsoid output for the page ( https://en.wikipedia.org/api/rest_v1/page/html/User_talk:Jackmcbarn%2Fsandbox2 ) and see what the script is looking for. [19:40:37] the edit of interest was https://en.wikipedia.org/w/index.php?title=Module%3AMessage_box&type=revision&diff=1097616255&oldid=1086697916 which to me should be completely benign also [19:41:22] ah, i see what is going on. [19:43:03] The HTML for mboxes now look like this --> [19:43:21] so, the script is looking for $(.editrequest) and looking for data-mw on that node. [19:43:30] ah [19:43:45] but, with the addition of templatestyles, the templatestyle element now holds the data-mw since it is the first element of the transclusion conent [19:43:51] sure [19:44:07] so, the code needs to be made a bit more robust. [19:44:50] what would the check for data-mw been a double check for? [19:44:52] let me see where this code is hosted. [19:45:06] oh, i didn't check why he is looking for that. [19:45:33] oh, the console error was about likely unclosed elements up the page [19:46:16] oh, looks like data-mw info is used to infer the type of form to generate. see line 270 onwards in https://en.wikipedia.org/wiki/User:Jackmcbarn/editProtectedHelper.js#L-270 [19:46:25] so, without data-mw, the script won't work. [19:46:39] anyway, let me see where the code is hosted and how to update it. [19:46:55] well, I can hotfix the script directly even if it lives somewhere else [19:47:31] looks like it is entirely on wiki. [19:49:50] the irony is that you can file an edit request and it can't be answered with the edit request script [19:50:27] oh well I guess if the fixer fixes it and then responds it will work [19:51:58] :-) [19:52:07] you can host it temporarily in your user account. [19:59:47] while at it, let me actually understand the code fully and make sure i don't break anything else because of other assumptions. [20:03:54] we don't test our code, why would you do that [20:06:38] Izno: lies [20:06:41] Do you have any page handy with the older HTML that might not yet have been purged? [20:06:43] You're running it on english wikipedia [20:06:47] That's how you test code [20:06:49] :-) [20:07:00] do it in production baby [20:07:12] sec on request [20:08:31] try something in https://en.wikipedia.org/wiki/Category:Wikipedia_extended-confirmed-protected_edit_requests ? [20:08:38] ok [20:10:41] success on https://en.wikipedia.org/wiki/Talk:Bajaur_Campaign#editextendedprotected [20:10:55] yay [20:26:26] my jquery knowledge is stale. so, will need to go refresh that first. :) [20:28:00] fixed. [20:28:07] https://en.wikipedia.org/wiki/User:SSastry_(WMF)/editProtectedHelper.js [20:28:28] let me also update the spec version header [20:29:52] Izno: please test with https://en.wikipedia.org/wiki/User:SSastry_(WMF)/editProtectedHelper.js [20:30:35] hold on .. verifying if the saved wikitext is correct. [20:32:10] No, it is breaking something else. so, need to test more. [20:33:14] so, need to look at the save code paths now ... there are other assumptions baked in there, it appears. [21:09:55] sorry .. been distracted with some non-work matters that is claiming my attention. will be back at this in a little bit. [21:12:33] no worries, I have other things to do [21:12:41] not like I'm expect you to wait on me [21:12:47] expecting* [21:50:58] Izno: alright fixed it now ... use https://en.wikipedia.org/wiki/User:SSastry_(WMF)/editProtectedHelper.js ... please verify independently. I did a bunch of tests on https://en.wikipedia.org/w/index.php?title=User_talk:Jackmcbarn/sandbox2&action=history [22:27:04] subbu, I can manage to get a Firefox tab to stop working when I hit the remove request button [22:27:23] in Timeless, if that matters [22:28:02] edit doesn't go through [22:29:16] huh ... what page is that? [22:29:23] on that one [22:29:28] sandbox2? [22:29:29] now it worked, hmm [22:30:37] seems to fail trying to remove the level1 section (which I would guess is using `= level1 =`) [22:30:46] not a common case [22:30:48] so it might be ok [22:31:01] since I've now gotten it to work with level 2 headers and no headers [22:31:06] i should fix that too ... so, how do I repro this? [22:31:54] try to remove either the edit request associated with the 'one x' section or the 'level1' section [22:32:56] ok. [22:35:19] > since I... [22:35:38] I was only able to remove the first request in that section, trying to delete the whole section with remove request (which is what that one does with only one request) failed [22:42:00] i can reproduce it .. i need to understand this part of the code a bit more before i can fix it. [22:58:37] Izno .. i think this new version handles the level1 section properly. I used a debugger to stop before it saved. but, if you tried it it should work. [22:59:30] works with the one x heading as well. [23:02:13] supposed to take the heading with it [23:02:17] but at least that's something [23:07:41] oh i see ... :) [23:07:50] heh [23:08:09] the remove button is used for changes that look roughly like ```== change plx == I'm an IP ~~~~``` [23:08:13] I don't quite know what is supposed to happen, so working a bit blind. [23:13:54] will look at this tomorrow. but this should be mostly functional now. [23:14:19] thanks for flagging me and giving me a chance to look at gadgets.. :) [23:15:20] signing off for now. [23:17:24] tyvm