[00:14:37] API:Compare returns formatted HTML with differences. How do I render the HTML? [00:15:15] (Using the default Mediawiki formatting.) [00:15:27] (/CSS) [00:50:46] eToThePiI: https://www.mediawiki.org/wiki/API:Parsing_wikitext [00:52:12] I've read that, and maybe I missed something, but isn't that talking about parsing, not rendering? [00:52:55] that's our terminology? [00:53:05] maybe I misunderstood what you wanted/ [00:53:06] ? [00:53:16] I probably didn't express it clearly. [00:53:48] The compare API returns HTML... [00:54:06] I want to display that HTML on a wiki page. [00:54:33] Or even just an autogenerated page. [00:54:41] Is that possible? [00:55:32] (by display, I mean render, with all the bells and whistles of HTML) [00:57:00] Because the HTML that's returned has some specific classes, like 'diff-marker', 'diff-context', and 'diff-deletedline'. [00:57:31] So that needs the wiki's CSS to render it presumably. [00:58:18] Of course, I could extract it, I suppose, and then use it to display the HTML. [00:59:44] But preferably, I would like to be able to display it within the wiki's context. [01:00:57] MaxSem: So hopefully that clarifies what I'm asking. If you can't help, that's fine. [01:02:25] no, that's not possible and my quick searching didn't find any extensions [01:17:35] Then what's the purpose of returning the specifically formatted HTML? I guess it's just assumed that it's simple enough to get the css stylesheet and use it how one desires. [01:36:22] Wait a minute, I just realized I can do what I want really simply. [01:37:01] MaxSem: Thanks for responding. [08:50:30] hi, i m creating a page on Mediawiki and try to upload some images on "Mediawiki commons" but it is showing some deletion warnings, please help me out i m sharing the page : https://commons.wikimedia.org/wiki/File:Patient_profile.jpg [11:23:04] is it possible to get the template type/name that a specific page uses? [15:16:20] when i try to go to special pages i get the following error: [b329310d02dcb0a33442555a] 2018-03-27 15:15:58: Fatal exception of type "Error" [15:19:23] kevindank, see https://www.mediawiki.org/wiki/Manual:How_to_debug if you are the wiki maintainer [15:33:50] hi guys! Are there any iis settings that could cause api.php to return user '0' for 'api.php?action=query&meta=userinfo'? [15:38:21] tespsam: that would happen if you are not logged in (no valdi session cookie) when calling that [15:40:47] tespsam: so, yes, any problem with the management of cookies or session data may cause this [15:41:27] I am logged in, editing main page. I use the upload button on wikieditor toolbar to launch the upload wizard. javascript correctly returns my username in debug alert but api.php returns user 0 [15:44:11] tespsam: maybe related to the cookie path. the path to the api entry point may be different from the path used for pages [15:44:31] e.g. on wikipedia, pages sit under /wiki/, while the api uses /w/api.pgp [15:44:50] if your cookies are restricted to /wiki/ in that scenario, they work for editing, but not for the api. [15:47:29] what setting defines cookie path? my site doesn't have a dir prefix [15:53:05] if my site is 'https://wikisite.com/index.php?title=Main_Page' and api is at 'https://wikisite.com/api.php?action=query&meta=userinfo' would $wgCookiePath need to be set? [15:57:56] I don't think this is a server config problem, I'm just trying to cover my bases. I'm using an SSO auth extension and it doesn't seem to handle the session setup properly. Unfortunately, there is zero documentation on how to do that correctly. [15:59:47] All the documentation for the new authmanager/sessionmanager stuff seems like it was written for people that already know how to use it and thus don't actually need it. [16:15:17] tespsam: yea, i don't know that stuff either. perhaps anomie can help. [16:16:18] tespsam: and no, with that setup, you don't need a cookie path. in fact, your cookie path *must* be /, which is the default. [16:16:43] yeah, that's what I figured. [16:16:53] anyway, perhaps verify that it's the extension's fault by disabling it [16:20:27] yeah, it definitely works just fine without the ext. [16:21:05] tespsam: I wouldn't say https://www.mediawiki.org/wiki/Manual:SessionManager_and_AuthManager#As_a_provider is written for people who already know how to use it. Although it is true that it doesn't hold your hand through implementing all the details. [16:26:00] auth_remoteuser (the ext in question) extends CookieSessionProvider which isn't mentioned on that page. You seen any extensions that successfully implement SSO functionality that I can crib from? [16:29:21] your best bet is likely checking the code CookieSessionProvider to see how it works with normal mediawiki cookies, so you have an idea of how your extension can override it to do your SSO [16:30:12] I haven't dealt with the session side of AuthManager yet (I've written an ext which acts as a PrimaryAuthenticationProvider), so I probably can't help you out too much in that regard :( [16:46:48] anomie: it's more a question of figuring out why an extension you are trying to use doesn't work any more. we had the same issue with wmde's internal wiki [16:46:55] (ladap auth) [16:46:59] ldap even [16:49:30] yeah, it's pretty confusing stuff. [16:51:52] if my context contains user 0, how do I flush it out and fill it with the correct user? [16:54:21] why does it have user 0 in the first place? where does that even come from? [16:55:16] maybe it is your user id [16:55:50] my user id is 4. [16:56:00] harmaahylje: no, 0 means "not logged in". [16:56:18] why [16:56:23] tespsam: i know ways to do it, but i don't know the *correct* way to do that, if there even is one. [16:56:26] is it not None, null, or just nothing? [16:56:40] it's 0 [16:56:42] no, uid of 0 = anon/logged out user [16:57:00] ok [16:57:22] harmaahylje: because php doesn't have None or nothing. It could be null. But it's not. And changing that after 15 years will break a ton of things. [16:57:28] tespsam: tgr seems to be around now; he may know more about your issue :) [16:58:07] DanielK_WMDE_: yeah sure :) [17:00:53] tespsam: CentralAuth extends CookieSessionProvider and implements SSO, I wouldn't recommend it as an example though [17:01:22] what does auth_remoteuser have to do with cookies anyway? [17:01:27] I'll have a look... [17:02:57] auth_remoteuser takes the username from $_SESSION and either associates it with an account or creates a new one and then logs the user in. [17:03:34] I have a list of Countries that i want to make Pages for...is there a way to bulk create new pages? [17:03:36] isn'tit supposed to take the username from an env variable? [17:05:54] kevindank: there are a bunch of API clients that can do it, e.g. pywikibot [17:06:44] ive never used an api client or bot before [17:07:02] tespsam: the thing is, CookieSessionProvider is way more complicated than session providers generally need to be, and CentralAuth's provider even more so [17:08:00] in almost all cases ImmutableSessionProviderWithCookie is what you'd want to subclass [17:08:55] it would be certainly nice to have a simple example of that in the docs [17:32:08] I second that documentation request. [18:24:04] I just downgraded my extension to a version which extends immutablesessionproviderwithcookie and now things are working properly. :/ [18:36:12] So i think im having an issue with script path...any time i try to add require_once in localsettings the site breaks...the logo does not display on my site either [18:36:26] the only extensions that work are ones that use wfloadextension [18:36:58] $wgResourceBasePath = $wgScriptPath; $wgLogo = "$wgScriptPath/resources/assets/wiki.png"; [18:37:15] that folder and image exist but not sure if the scriptpath is the issue