[01:27:42] hi, guys. I'm having a problem. After I migrated mediawiki 1.25.1 to 1.25.2, Special:RecentChanges just showed up few hours, how can I get the older changes back? [01:53:43] pity: for you or for everyone? [01:56:30] you may want to check the value of https://www.mediawiki.org/wiki/Manual:$wgRCLinkDays if everyone, or check preferences if just you [02:02:29] hi [02:02:53] I just installed mediawiki 1.25 from git and I have a hard time loading VisualEditor properly [02:02:58] it used to work on 1.23 [02:03:33] kind of loads... The edit button gets renamed as "edit wikicode". [02:03:43] But the "Edit" button doesn't show anymore... [02:04:39] I find no clue in mediawiki debug file nor php logs.. [02:05:35] is your wiki public? [02:07:16] Krenair: no [02:07:51] open your JS console [02:10:58] see what $( 'html' ).hasClass( 've-available' ); returns [02:11:41] false [02:12:08] $( 'html' ).hasClass( 've-not-available' ); [02:12:09] ? [02:12:35] true [02:12:46] ok [02:12:57] mw.user.options.get( 'visualeditor-enable' ); [02:13:09] 1 [02:13:41] Just for your informations I got VisualEditor from git too [02:13:50] mw.config.get( 'wgUserName' ) === null [02:13:55] I changed its branch to REL1.25 [02:14:07] did the submodule --init [02:14:16] and changed ve branch to REL1.25 too [02:14:36] returns false [02:16:02] $.inArray( new mw.Title( mw.config.get( 'wgRelevantPageName' ) ).getNamespaceId(), mw.config.get( 'wgVisualEditorConfig' ).namespaces ) !== -1 [02:16:26] false [02:16:40] what namespace are you trying it in? [02:17:34] Krenair: Didn't define any I know of?! [02:17:47] what? [02:17:50] okay [02:17:58] what is the full name of the page you are trying it in? [02:18:14] http://wikihost/wiki/Accueil [02:18:28] main namespace, ok [02:18:32] mw.config.get( 'wgVisualEditorConfig' ).namespaces [02:18:33] the behaviour is the same for any page.. [02:18:51] returns [] [02:18:57] there's the problem [02:19:04] ok? [02:19:21] what config in LocalSettings.php do you have related to VE? [02:19:42] Not any configuration is related to VE [02:19:54] But I didn't use to have any in 1.23 and it was working [02:20:53] can you run `php maintenance/eval.php` (from MW core) and tell me what var_dump( $wgVisualEditorAvailableNamespaces ); says? [02:22:09] Undefined variable: wgVisualEditorAvailableNamespaces [02:22:10] NULL [02:25:58] hi, guys. I'm having a problem. After I migrated mediawiki 1.25.1 to 1.25.2, Special:RecentChanges just showed up few hours, how can I get the older changes back? [02:26:48] DeeJayTwo, uh, right. So that variable wasn't actually used in 1.25, okay :) [02:26:55] What about $wgVisualEditorNamespaces ? [02:26:56] c: Sorry, I just saw your reply, I'm checking the link. [02:27:36] Krenair: Not defined either. [02:28:03] how are you loading VE? [02:28:17] including VisualEditor.php? [02:28:23] wfLoadExtension? [02:28:42] Yes loading [02:28:52] wfLoadExtension [02:28:53] what? [02:28:54] ok [02:29:21] But $wgVisualEditorNamespaces is undefined? [02:30:03] no sorry [02:30:09] array(0) { } [02:30:13] pity: cool! [02:31:56] DeeJayTwo, try adding this to your LocalSettings.php: [02:31:57] $wgVisualEditorNamespaces = array_merge( $wgContentNamespaces, array( NS_USER ) ); [02:34:30] Krenair: : Yay it works :) [02:34:40] Krenair: THank you! :) Now I have a parsoid 401 error...:/ [02:34:57] 401? [02:35:10] 401 Unauthorized [02:35:29] Did you not configure MW to send cookies to parsoid? [02:36:11] $wgVisualEditorParsoidForwardCookies = true; [02:36:13] this is set... [02:36:50] do you use VRS to connect to parsoid? [02:37:22] like do you mess with $wgVirtualRestConfig['modules']['parsoid'] or anything [02:39:14] yeah...I messed with it... [02:39:17] just commented it ;) [02:39:24] thank you, it's all working now :) [02:39:33] oh [02:39:47] all you needed to do was set 'forwardCookies' => true in that vrs module defniition [02:39:51] definition* [02:39:54] but sure [02:40:07] * Krenair sleeps [02:41:32] Good nite :) [02:46:38] Hi all. Anyone else seeing English wikipedia as down? [02:46:55] c: I got it! Thank you! [02:47:02] pity: sure [02:49:01] mww113: Error [02:49:02] Our servers are currently experiencing a technical problem. This is probably temporary and should be fixed soon. [02:49:05] Please try again in a few minutes. [02:52:12] pity: that's what I was seeing too. seems it's back though now [02:52:48] on an unrelated topic, has anyone ever dealt with a mediawiki instillation that won't properly render CSS sheets? [02:53:16] at first I thought it was Apache rewriting calls to load.php, but it seems that's not the case. [02:53:54] mww113: yeah, it's back now [04:03:02] Anyone know why https://meta.miraheze.org/wiki/Request_features this still has tags? [04:03:24] (i mean there not supposed to be there, a translated version should be there) [04:32:17] Hello [04:43:51] Hi. [04:43:58] hi [05:32:24] Reception|away: 1) You did not click the "mark this page for translation" link at the top of the /header page https://meta.miraheze.org/w/index.php?title=Special%3ALog&type=pagetranslation&user=&page=Request+features&year=&month=-1&tagfilter=&hide_tag_log=1&hide_thanks_log=1 [05:32:57] No you did, my bad https://meta.miraheze.org/w/index.php?title=Special%3ALog&type=pagetranslation&user=&page=Request+features%2Fheader&year=&month=-1&tagfilter= [05:33:48] The I correct myself, 1) You have to mark the page for translation again (e.g. after adding a space somewhere) so that https://meta.miraheze.org/w/index.php?title=Request_features/header/en gets created [05:34:52] 2) In https://meta.miraheze.org/wiki/Request_features?action=edit§ion=0 , {{:Request features/header}} must become {{:Request features/header/en}} [05:36:10] 3) Because (1) is the first known case of https://phabricator.wikimedia.org/T56579 outside WMF wikis, please mention the case there and describe your setup (you presumably have a DB slave?) [06:49:53] hello [06:50:06] I am unable to view pics from commons [06:50:17] I have set instantcommons as true [06:59:21] Help!!! [07:18:30] hi [07:18:45] I cannot write space, when log in WCommons [07:19:02] do we know what is behind this problem? [08:35:43] hello [08:38:36] i am currently researching something, and so far i typed down everything in some markdown files, downloaded pictures in a seperate directory and pointed to them in the textfiles via name. now i would need links to link from one article to another so i can organize my stuff better. only today i thought: maybe i should use mediawiki! some questions to make sure its really what i want: i prefer having every [08:38:42] thing i files, so i can easily back them up. and i like markdown because then i can reuse my text and use pandoc to create an epub or whatever i want in the future. is this possible with mediawiki? the backing up, and using it from different computers is quite important for me. for example sometimes i continue to write in my markdown fiels from work, so i just ssh into my home computer and do that [13:07:34] anybody knows where apache logs are located in mediawiki-vagrant VM? [13:08:20] there is /var/log/apache2, but I get "Permission denied" when I try to access it [13:08:38] zeljkof: Can't you become root in the VM? [13:08:44] mobrovac: maybe you know? ^ [13:09:04] Katie: actually, I can [13:09:07] let me try again [13:09:08] :-) [13:09:25] I did not know if I knew the password, but apparently, it is "vagrant" :) [13:10:11] aren't logs @ /vagrant/logs ? [13:10:24] hm maybe not the apache logs [13:10:38] but, in the vm, sudo su gets you root without a pass [13:10:46] mobrovac: looking there... apache logs did not actually have what I needed [13:10:59] mobrovac: thanks, did not know that [13:11:31] what I actually want to do is to check some headers that the machine received [13:11:57] HTTP headers? [13:11:58] not sure if it is in apache log, mediawiki log, or somewhere else [13:12:14] yes [13:12:17] You can inspect HTTP headers in a Web browser. [13:12:31] Both request and response headers can be grabbed from Chrome or Firefox developer tools. [13:12:34] In the network tab. [13:13:05] well, the thing is, I am using phantomjs :) [13:13:14] * zeljkof will be right back [13:13:21] phantomjs is gross. [13:16:11] zeljkof: you can log them in apache, but you'll need to set up your own logging scheme for that [13:17:18] * zeljkof is back [13:17:33] http://httpd.apache.org/docs/current/mod/mod_log_config.html [13:17:59] we are moving a job from phantom to chrome, but it is broken in phantom, I have to fix it first to see if the problem is in the job or if there is a bug [13:18:10] https://gerrit.wikimedia.org/r/#/c/239912/ [13:18:48] for now, I just need to check if the current code actually sends the X-CS header [13:19:19] I am looking for the easiest thing to do, I thought the requests (and headers) will be logged somewhere [13:20:01] Katie: hm, but I could switch the test to Chrome and inspect the headers [13:20:08] in the dev tools [13:20:55] yeah, but the problem there is that chrome and phantomjs have different APIs for setting custom headers, will probably loose some time figuring it out, while it is already working in phantom [13:21:02] or at least, it used to work :) [13:23:09] zeljkof: afaik, mw-vagrant already sets up CustomLog entries for apache, all you have to do is stick %{X-CS}i on that line and run vagrant provision [13:23:13] easier than this ... [13:23:29] mobrovac: actually, that does sound easy, let me try that [13:25:24] Hey Katie! I would appreciate help with fixing https://en.wikipedia.org/wiki/Wikipedia_talk:Database_reports#Wikipedia:Database_reports.2FUnused_file_redirects I can't figure out the SQL here. [13:30:55] mobrovac: /etc/apache2/apache2.conf says... [13:31:05] LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined [13:31:05] LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined [13:31:05] LogFormat "%h %l %u %t \"%r\" %>s %O" common [13:31:05] LogFormat "%{Referer}i -> %U" referer [13:31:05] LogFormat "%{User-agent}i" agent [13:31:15] Hi Niharika. [13:31:38] oops, sorry, wanted to send it like a link to pastebin, still getting used to irccloud [13:31:56] not sure where to put %{X-CS} [13:32:37] the above lines are under this comment in the file # The following directives define some format nicknames for use wit a CustomLog directive. [13:32:54] Niharika: What's confusing? [13:32:58] I'm looking at https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Unused_file_redirects/Configuration [13:34:05] Hello Katie. Oh, the code is available. Sorry, my bad. I didn't see it in dbreps and thought Svick didn't make it public. Thanks! [13:34:15] No problem. [13:34:28] zeljkof: you need to find the customlog directive and then add it there, or append it to any of these (but ensure the alias you stick it in gets output to a file) [13:34:41] Katie, mobrovac: found it in mediawiki-wiki-debug.log! [13:34:50] cool! [13:34:58] even easier :D [13:35:24] mobrovac: ok, one problem solved, at least I know if the headers are sent or not [13:35:51] the problem is that I do not know if the problem is in the mediawiki or in the test :) [13:35:57] but one step at a time... [13:46:12] :) [13:50:32] if anybody wants to follow along... https://phabricator.wikimedia.org/T113463 [14:08:24] Hi, I want to create an extension which basically loads some new UI elements via JavaScript and does some magic there. Are there any example extensions which are JS-only? [14:08:42] Niharika: You won't 100% do JS only [14:08:47] You'll probably need minimal PHP [14:08:58] If you want an extension, that is. [14:09:04] You can make a JavaScript gadget or user script. [14:09:06] Reedy: Thought so, but still, like, mostly JS? [14:09:17] What are you trying to do? [14:09:32] Katie: Well I'm actually trying to convert a gadget into an extension. https://phabricator.wikimedia.org/T110160#1662435 [14:10:25] Niharika: Should that need JavaScript? [14:10:55] Katie: The gadget is completely in JS right now and I don't want to break it completely by trying to port it to PHP all at once. [14:11:00] Have you looked at the boilerplate extension? [14:11:13] Porting it to PHP is basically what making it an extension means. [14:11:15] https://de.wikipedia.org/wiki/MediaWiki:Gadget-revisionjumper.js [14:11:19] I think. [14:11:48] Reedy: Not carefully, I thought it was just for placing the basic elements of an extension. [14:11:50] * Reedy blinks [14:12:09] I mean, you can have an extension that just loads JavaScript. But eh. [14:12:25] Katie: I guess it helps offloading i18n stuff to twn [14:12:36] And we still don't have global gadgets, sure. [14:12:37] Yeah. That's the aim. [14:12:39] But like... [14:12:45] So examples? [14:12:56] VisualEditor basically does this. [14:13:03] It's a little bit more complex [14:13:05] But it's probably not a great example. [14:13:33] You'd just do a ResourceLoader hook, I think? [14:13:47] Yeah, that's what I was meaning by minimal PHP [14:13:48] And dump the JavaScript into a versioned file. [14:14:14] And do the extension boiler plate. [14:14:54] Okay. That's helpful. But do let me know if you can think of any examples! [14:18:27] I'm sure there were a couple [14:18:46] Bingo [14:18:48] Niharika: https://github.com/wikimedia/mediawiki-extensions-Popups [14:19:08] That's very much the same basic idea [14:19:25] The PHP code is very much boilerplatey [14:19:26] Ah, thanks Reedy! I didn't think of Hovercards. [14:19:27] Rest is CSS/JS [16:55:06] Hi, I'm restoring a pretty big wiki (295k pages) from an SQL backup. Due to technical reasons it was not possible to restore the user table too - because of that, rev_user/log_user entries are broken now. I fixed this for the revision table (is there a maintenance script for that? I used raw SQL which is imho bad), but I don't know how to fix it for the [16:55:06] logging table [16:55:38] Because sometimes log_params contains an associated log_user id too. Do you have any ideas? Is there a maintenance script for this? [17:05:32] The log_user_text of the logging table is fine. I just need a solution that updates the log_user field (and if needed the "userid" field of log_params) [17:07:24] Something like UPDATE `logging` SET log_user = (SELECT user_id from user, logging WHERE log_user_text = user_name); [17:07:36] And then the same for log_params [17:12:52] SPF|Cloud: well you could perhaps parse the data and recreate it in sql but that sounds painful :D might be easiest to run a php script to fetch everything, derserialize/fix/reserialize/update. either way kinda painful :( [17:13:24] brion: there's no maintenance script for this yet? :) [17:13:41] alas no :D [17:14:07] okay [17:14:24] Are you sure updating userid (log_params) and log_user is enough? [17:14:44] And what should I do with log_params and log_user if the user doesn't exist? [17:15:34] when in doubt, reset to 0. it might not explode ;) or just trim them out but then you lose some history [17:16:02] Why is stuff so difficult [17:16:18] But okay, I'll do it. [17:16:35] good luck! [17:16:43] last question: do entries in logging/revision get updated after a user registers? [17:16:56] nope [17:16:59] shrug [17:17:04] that's very bad [17:17:26] system is not designed to lose data in this particular way :( [17:17:40] I wonder how import (xml/importDump) works then? [17:17:57] sets to id 0 if not recognized, iirc [17:17:57] That should set rev_user = 0 too, but that gets updated upon registration..? [17:18:08] no, wouldn't get updated unless you performed some manual db update [17:18:31] joke? [17:18:41] no? [17:18:48] urgh [17:24:16] https://github.com/wikimedia/mediawiki/blob/master/includes/Import.php#L1666 is interesting [17:29:33] brion: I guess that if log_user = 0, it still checks if a user with the name log_user_text exists, doesn't it? [17:30:36] Iirc IDs are optional in dumps, the username is primary in most things [17:30:57] So the id in the table gets filled out at import time from a lookup of existing users [17:31:17] This lets you import data from another wiki that might have the same users but not same IDs [17:33:20] yes, but if I import an XML dump, and afterwards a user (who edited on the 'dumped wiki') registers, then the rev_user id will never be changed? k? [17:34:32] rev_user and log_user actually [17:35:18] If that's true, then it should be fine to run a script that sets log_user = 0 and rev_user = 0 on revision/log entries where the user doesn't exist [17:35:52] I mean, then it should be fine to run it for one time only, and then never again [17:40:22] Yes I think the worst case is those entries don't hook up to the user ? [17:41:42] When you look at log entries or difflinks MediaWiki checks if the user exists, and adjusts the user tool links if the user does exist. That shouldn't change because I imported the wiki in an unusual way [19:39:30] hello! [19:39:42] hi! [19:42:37] howdy reedy [19:43:07] so i was wondering if anyone can help.. i'm trying to set up a new mediawiki site but i am running into errors... like: [19:43:10] Error: 1146 Table '90wiki.wiki_l10n_cache' doesn't exist (localhost) [19:58:01] jfive: at what stage? [20:36:40] Reedy: actually nm, sorry [20:36:47] i gave up on that and just did a fresh install [20:36:53] so i have that all working now :) [20:37:02] i do have another question though, how do i add new users? [20:38:01] not like a mysql user or anything, just a user who can sign in and make edits [20:38:09] Special:CreateAccount [20:38:41] ahhh, nice thanks man [20:55:56] I'm trying to install MediaWiki 1.25.2 with PHP 5.6.13 but I am getting this error "MediaWiki 1.25 requires at least PHP version 5.3.3, you are using PHP 5.6.13." Anybody have any ideas? [20:56:30] o_0 [20:56:45] That's awesome [20:59:26] Hmmm. [21:00:34] I initially thought maybe the Web process is using a different version of PHP, but it seems to be reporting correctly... maybe the comparison logic is goofy? [21:00:35] Reedy: thank you for digging out my old stuff [21:00:53] saper: it's gerrit cleanup day! [21:00:56] Katie: Yeah [21:01:03] I'm looking. [21:01:09] includes/PHPVersionCheck.php, I guess. [21:01:10] Reedy: ah didn't know [21:02:11] Reedy: which astronomic event triggers those celebrations? some comet arrived? Or only photos from Pluto :) [21:02:17] Maybe PHP's version_compare logic? [21:02:31] confused92: Did you do a git clone or grab a tarball? [21:02:55] saper: "gerrit is in a mess" [21:02:57] I dunno really [21:02:59] version_compare( $phpVersion, $minimumVersionPHP ) [21:03:13] tarball [21:03:17] https://github.com/wikimedia/mediawiki/commit/b3f9120af5fc883b38d5e7b55368ff61c2bbdd09 [21:03:20] Do we blame Paladox? [21:03:20] xD [21:03:34] http://releases.wikimedia.org/mediawiki/1.25/mediawiki-1.25.2.tar.gz [21:03:54] why doesn't paladox use irc? [21:04:12] GEOFBOT|dontbugm: I'd like to keep it that way [21:04:29] Be nice. [21:04:34] I'm reading this diff. [21:04:39] :) [21:05:10] That's not in 1.25 though [21:05:28] Hmmmmm. [21:05:32] Is PHP_VERSION a string? [21:05:32] https://github.com/wikimedia/mediawiki/blame/REL1_25/includes/PHPVersionCheck.php [21:06:54] > var_dump( PHP_VERSION ); [21:06:55] string(23) "5.3.10-1ubuntu3.19+wmf1" [21:07:37] What happens if version_compare isn't available? [21:07:52] I hate code. [21:08:21] kinda strange though; paladox has been around for awhile and probably knows his way around the community, yet still insists on using phab and gerrit as sole way of comm [21:08:39] Katie: it'd fatal [21:08:45] I did find this https://phabricator.wikimedia.org/T102094, but I'm not sure I totally follow it [21:09:02] I'm not sure REL1_25 is what 1.25.2 is using. [21:10:49] Katie: it should be... [21:12:16] confused92: do you have the vendor repo?\ [21:12:25] /have you run composer? [21:13:22] Doesn't it come with the tarball? [21:13:25] I was not clear if I needed to or not. I thought I read that it was included in the download. [21:13:30] I've no idea [21:13:37] Can't remember the last time I looked at a mw tarball [21:13:39] I have stuff in my vendor folder [21:14:40] confused92: Do you have command-line access to PHP? [21:14:45] Could you run a small snippet? [21:14:59] I have command-line access [21:16:17] echo version_compare( PHP_VERSION, "5.3.3") . "\n"; [21:16:36] You can try putting those lines in a file and executing the file. [21:16:42] Might help debug where the issue is. [21:17:02] ok [21:17:05] Also, could you pastebin the output of "php --version"? [21:17:38] pastebin? [21:17:47] https://dpaste.de or similar. [21:17:59] A place to store snippets of text without pasting into the channel (like I did :-( ). [21:18:19] If it's a short of amount of text, you can just paste in here. [21:18:35] Katie: you're the worst [21:18:40] Yes. [21:19:01] Reedy: My guess is that PHP broke version_compare, but who knows. [21:20:29] php --version outputs PHP 5.6.13 (cli) (built: Sep 3 2015 15:14:39) and some copyright information [21:20:57] Okay. [21:21:04] confused92: What do those two echo statements return? [21:21:18] 1 and 1 [21:21:26] Hmmm. [21:22:46] So many extensions in the tarball. [21:23:09] vendor/ is definitely included. [21:27:58] confused92: I see... [21:27:59] !file_exists( dirname( __FILE__ ) . '/../vendor/autoload.php' ) [21:28:11] Do you have an "autoload.php" in your vendor directory? [21:28:46] Yes I do [21:29:17] Reedy: Do you have any thoughts? [21:29:32] I was thinking file permissions, but clearly includes/PHPVersionCheck.php can be read and executed... [21:35:17] You could hack up includes/PHPVersionCheck.php to figure out which conditional is failing. [21:42:58] how do I test the file_exists in a test .php file? I think that is what is failing but I don't know how to test !file_exists( dirname( __FILE__ ) . '/../vendor/autoload.php' by itself [21:44:59] although I think MediaWiki was working until I installed PHP 5.6.13 [21:52:54] I downloaded PHPVersionCheck.php from here https://phabricator.wikimedia.org/F2629207 and it looks like it is indeed failing to find autoload.php, but I'm not sure why because it is definitely in the vendor folder. Any ideas? [21:59:12] maybe a permissions issue? I found some sample code to test if a file exists, and every file I check for comes back as not existing. [22:04:52] confused92: Yeah, maybe permissions. [22:05:04] You can do "ls -l" (ell) to view file permissions. [22:05:09] And file ownership. [22:05:22] Maybe the vendor files have weird permissions? [22:06:14] Should print an integer. [22:08:07] that didn't give me an integer, just a blank line [22:08:56] I'm trying just to check if my test.php exists and it says it doesn't. I've set the permissions so that everyone has read access to that file but still it says it doesn't exist. [22:16:00] What code are you executing? [22:16:04] And how are you executing it? [22:16:27] It sounds like maybe the process/user the Web server is running under doesn't have permissions/ownership? [22:16:31] But I dunno. [22:17:48] if (file_exists($filename)) { [22:18:03] echo "The file $filename exists"; [22:18:08] } else { [22:18:14] echo "The file $filename does not exist" . "\n"; [22:18:20] } ?> [22:18:34] then I'm running php test2.php from a powershell prompt [22:19:18] maybe a windows specific issue? [22:21:13] weird thing too is it was working before I upgraded to PHP 5.6.13 [23:00:07] looks to be an issue with file_exists, but I can't figure out what [23:11:24] anyone hae suggestions for putting mediawiki as root? [23:11:37] we're dedicating a server to documentation for our company. [23:11:48] documentation.host.com