[11:47:14] Hi, we changed the logo for our wiki a long time ago, with `1x`, `1.5x`, and `2x` PNGs in `$wgLogos` but the previous (also custom) logo still shows up under some resolution even though it isn’t in `LocalSettings.php` anymore. Is there a cache to be cleared manually? [12:21:25] yvanzo: inspect the HTML of the page where the logo appears and see where it comes from. Maybe it's defined in a site's CSS file or inserted directly on a page [12:25:40] hi everyone! question: [12:25:40] i'd like to send a patch for the Gadgets extension [12:25:41] but i'd like to build on top of this patch https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Gadgets/+/960156 [12:25:41] which hasn't been merged yet [12:25:42] whats the procedure ? [12:25:42] what im thinking is [12:25:43] 1. git review -d 960156 [12:25:43] 2. git pull (because there's been some localization updates since) [12:25:44] 3. Code some magic [12:25:44] 4. git commit -a -m "Whatever" [12:25:45] 5. git review [12:25:45] will this do? [12:26:33] Hi Sophivorus! I think you're talking about https://www.mediawiki.org/wiki/Gerrit/Advanced_usage#Create_a_dependency. Does that help? [12:27:04] that seems like it, thanks ! [12:27:13] no problem [12:27:39] Sophivorus: ftr, do not do the git pull. if you want to work both on top of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Gadgets/+/960156 and on top of master, rebase https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Gadgets/+/960156 on top of master, then follow the procedure I linked. [12:28:08] thanks, will do [12:31:08] Thanks Vulpix but there is no CSS file mentioned in the source page. The only `link rel="stylesheet"` do reference `/load.php`. The skin is MonoBook. The CSS selector used by the rule applying the old logo is `@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (min-resolution: 2dppx), (min-resolution: 192dpi) #p-logo a` [12:34:54] I couldn’t find/grep any file under `/var/lib/mediawiki` containing the old log filename either. [12:35:11] old log*o [12:35:40] is there a hook I can use to hide a field from Special:Preferences? [12:35:49] yvanzo: does the issue happen when you visit the wiki from another browser (or an incognito session)? [12:36:18] urbanecm: Yes, and not only for me. [12:38:36] answering myself: GetPreferences does what I want to do [12:38:38] It also affects every page, even new pages, so it cannot be due to an external cache like a gateway. [12:38:39] taavi: hmm... https://www.mediawiki.org/wiki/Manual:Hooks/GetPreferences comes to my mind (setting `type` to `api` on the preference should do the trick), but that might not work if one extension is introducing the field and another one is hiding it (assuming both use GetPreferences hook to introduce the preference). [12:38:51] meh, i took too long to write that [12:39:15] but yeah, for GrowthExperiments (which introduces its preferences via GetPreferences hook), that wouldn't work, as it'd be depending on the hook execution order [12:39:50] so it kind of depends on "which preference" (if an arbitrary one, GetPreferences is not the answer) [12:39:55] yvanzo: inspect using the developer tools. Press the F12 key, and it has a tool to inspect an element by clicking on it. That will display the HTML code and all CSS rules applied to it [12:40:08] and where they come from [12:40:58] Vulpix: This is how I found the above CSS selector. The file it comes from is `load.php`. [12:41:21] urbanecm: for context, I'm trying to hide the 'your email address was confirmed on ... [12:41:31] yvanzo: ok, it may be a MediaWiki: css page, then [12:41:42] ' thing from https://wikitech.wikimedia.org/wiki/Special:Preferences, so a simple `unset( $preferences['emailauthentication'] );` in that hook seems to work perfectly :-) [12:41:44] grew won't find them, because it's in the database [12:41:47] *grep [12:43:18] Vulpix: Bingo, it comes from the page MediaWiki:Common.css indeed, thank you! [12:44:00] taavi: i see. well, that doesn't come from a hook, so it should be fine :). however, that fully un-declares it, not sure if that's what you intend? [12:44:25] (aka it's not a frontend-only change) [12:44:34] it's a `'type' => 'info',` fake preference, so I think that should be fine? [12:44:59] ahh! never mind then. [12:54:18] Vulpix, urbanecm: Thank you both, issue resolved after self-granting special rights for editing interface and updating the page MediaWiki:Common.css accordingly. [20:00:13] hi, how can I completely delete certain deleted revisions from database? [20:02:29] Generally we don't "completely delete" anything [20:03:14] https://www.mediawiki.org/wiki/Help:RevisionDelete - suppression/oversight [20:05:26] Reedy: I created lots (100k+) of ~200kb pages on my wiki and as a result I caused "No space left on device".. so I changed my mind and want to delete those pages completely [20:05:55] I mean from database.. cause it takes 20GB or so [20:07:04] There's a purgeOldText.php, but that would cause some collateral damage on other pages with multiple revisions [20:09:17] I need something like deleteArchivedRevisions.php that I can run for specific pages only [20:10:31] It's not the best way of doing it.. But you could modify (create a copy etc) the script, depending if there's any pattern/similar to your created pages [20:11:48] Reedy: well I never learned php and don't plan doing so :) [20:12:05] You probably don't need to learn PHP [20:15:22] I simply don't really understand the content if the php script, I can only program in python, lua and javascript [20:15:52] and little bash, sed, awk etc :) [20:17:00] Things like "->where( '*' )" really aren't much more than psuedo code [20:18:16] You can just run the same SQL queries yourself [20:18:49] DELETE FROM archive WHERE (some condition that gives you your list of pages you actually want to delete) [20:22:59] I would need to filter either all archived revisions from today/yesterday or all revision of pages that start with Module:Name [23:11:14] it seems that deleteArchivedRevisions.php does not delete the revision text from the 'text'.. which would actually reduce the database size completely.. am I right? [23:11:27] I mean from the *text table [23:11:46] what happens if I delete the revisions from the text table?