[01:08:11] does anyone know how to grab the logged in user's session ID? [01:13:55] the only way i've been able to get it is to just read it from the cookie via $context->getRequest()->getCookie [03:47:36] I started learning pyside today morning. Installed the latest version. I was trying out the sample code shown in the documentation but it didn't work as expected. A window was created but the hello world label was missing. I even tried copy pasting the code. But didn't help. same issue persists. I tried another example using the qml code. But that too have the same issue. what should i do? [03:54:26] anyone? [04:24:11] quit [07:02:18] hello~ [07:02:21] 하이~ [07:02:27] 한국인도 있나요? [13:17:08] Hi [13:18:34] Hi [13:19:01] Can somebody help me with a translate problem? [13:19:38] I'd like to rework the user hub page, and need some help with the tranlaste-tags [13:19:45] translate [13:28:56] I have made a patch and pushed for review by git review -r and jenkins-bot gave me +1 main build test succeded but I made few changes in commit name after some time and uploaded it again then it gave me -1 and returned an error Merge Failed. [13:28:56] This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. it gave cannot merge due to the above error can anyone help me out [13:29:38] rammanoj_: you have to manually rebase your patch against the master branch [13:30:09] the error is telling you that a change you made is conflicting with a change someone else made to the same line in some file [13:30:32] but I have already run git pull origin master before amending the patch then why did it returned an error? [13:31:10] because git pull will not automatically rebase the branch you are on [13:31:40] you can do checkout master, pull, tehn cherry-pick [13:32:00] or fetch, and then rebase origin/master [13:32:07] (not just master, if you didn't do a pull or reset on master) [13:57:22] Does anyone know how to grab the logged in user's session ID? [13:59:43] @DanielK_WMDE I tried doing cherry pick but is returning error when i type git cherry-pick --continue it returned error: no cherry-pick or revert in progress [13:59:43] fatal: cherry-pick failed [14:51:36] rammanoj_: yes, it fails because of the conflict. you have to resolve the conflict, then add, then commit [14:51:41] you can resolve it using git mergetool [14:55:20] okay thankyou [16:46:35] hi. how i can use #show with this https://en.wikipedia.org/wiki/Wikipedia:Articles_with_slashes_in_title [17:01:41] hi [18:14:03] Hello ! When someone sign up, how to make mail require ? [18:16:56] Simon2001, Possibly this? https://www.mediawiki.org/wiki/Manual:$wgEmailConfirmToEdit [18:17:23] I try but it's don't work. [18:19:06] Simon2001: "doesn't work" how? [18:19:31] DanielK_WMDE: It doesnt' answer his question [18:19:41] He asked at signup, not at editing [18:20:11] oh.. [18:20:12] "requires people to supply an email address when registering" [18:20:14] interesting [18:20:16] yea :) [18:20:44] ...maybe that bit is broken now... [18:21:25] lol [20:05:58] Hello, I am using GoogleLogin extension in mediawiki. I want a single google button for both login and signup. Currently it's a 2 step process [20:06:28] is it possible? [20:13:02] should all extensions extend a built-in class? [20:13:58] mobi9: No. [20:16:01] FoxT thanks. should extensions generally be in their own class then? [20:17:47] I would very much suggest so. This is more a general consideration though and nothing imposed by MW. There are many extensions not using classes. [20:21:10] If you're writing special pages or api modules.. Generally you will be extended built in classes [20:23:57] i've been trying to read through some existing extensions to get best practices [20:24:13] are there any examples of extensions which are up to date and follow current best practices? [20:24:42] cause i'm seeing a lot of extensions use $wgRequest and $wgUser instead of the requestcontext and other things but it works i guess [20:24:58] Reedy: Well, yeah, there is that. :) [20:25:18] mobi9: Mostly just old extensions that haven't updated [20:25:24] Or in static functions where it's harder [20:29:15] heh [20:30:45] what I'm trying to do is grab the session ID, and I've found WebRequest::getSessionId(), but it's saying it's "private For use by MediaWiki\Session classes only" - yet the getSessionId in the Session class says it's only for use by a WebRequest class [20:31:22] so I was thinking of creating a new instance of the WebRequest class, but the manual says "You should not create additional instances of this class." [20:31:37] mobi9, what are you trying to achieve? [20:31:55] to grab the session ID [20:32:00] what do you need it for? [20:32:16] a persistent random value that stays across multiple page refreshes [20:32:52] just generate a random yourself and store it in session [20:33:14] session IDs are an implementation detail [20:33:37] oh, so i'm not supposed to dig them out for something else? [20:34:09] there's a reason they're not public [20:34:16] :/ [20:34:51] if I pick a random and store it in session, I'd also have to store it in the database and check to see if it's expired and all that [20:35:14] they're obviously random as otherwise your session wouldn't be safe, however no properties of that randomness are guaranteed [20:35:48] I guess I was hoping to not have to create additional tables and use the database to store my own randoms and was thinking using the session ID would avoid that [20:36:32] storing stuff in session works just as well [20:37:09] note that sessions aren't forever so they're not an equal alternative to database [20:38:29] so it would be frowned upon for me to get the sessionID by reading the mediawiki-session cookie ._. [20:39:17] that's even more hackery [20:41:14] ya, so setting my own random in session it is then [20:41:56] you can create your own random and use your own cookie name [20:42:37] should I just use PHP to do that ($_SESSION["randomstring"] = "cat";) or use mediawiki's built-in functions to do that, if it exists? [21:03:00] mobi9: how persistent do you want this ID to be? Sessions expire at arbitrary times -- for example a user that checks the "remember me" box will probably have more than one session ID assigned to them over the course of their browsing while logged in [21:03:52] it may last one browser session, it may last 10 browser sessions, but it probably won't last 100 [21:08:07] if that's ok with you, and you have access to the WebRequest object, $request->getSession() gets you a session object which you can ->get() and ->set() session data with [21:08:43] it's recommended to prefix keys in session data with your extension as a means of disambiguation [21:09:28] if you want it less persistent than a session (i.e. want it to for sure go away when the user closes their browser), you can set a cookie that goes away when the browser is closed [21:09:38] if you want it more persistent, a db table is probably what you need [21:17:08] Skizzerz I thought MediaWiki session IDs changed when the cookie expired as set by $wgCookieExpiration [21:17:28] i.e. you'd get the same session ID for the duration of your login [21:19:09] mobi9: usually, yes [21:19:21] not guaranteed though [21:19:34] if, say, a cleanup process purges session info [21:20:02] (PHP sessions are stored in /tmp by default, so if you have something that cleans up files in /tmp on a regular basis, you may be killing off the backend session store for a session) [21:20:48] I'm not 100% sure on how mediawiki handles that occurrence; it may end up logging you out (in which case your assumption is true under all cases), or it may have enough info in the cookie to reconstruct a brand new session and keep the user logged in [21:25:50] configuring PHP sessions in /tmp is a very bad idea, unless systemd PrivateTmp is used [21:27:02] re: skizzerz is this one of those where it's true for 99.999% of the time things and session IDs not matching browser sessions is the exception ? [21:28:15] yeah, probably; you're likely safe assuming that the session ID will last as long as the user remains logged in [21:28:32] Vulpix: lots of people don't change defaults :) [21:28:40] and the default is /tmp [21:29:01] (for zend php at least, dunno about hhvm) [21:42:40] wait but according to stack exchange a php session ends when the user closes the browser