[04:02:43] [[Tech]]; Killiondude; /* Restore old edit buttons bar */ cmt; https://meta.wikimedia.org/w/index.php?diff=18577780&oldid=18576868&rcid=12714492 [09:07:19] [[Tech]]; Hugo.arg; /* Restore old edit buttons bar */; https://meta.wikimedia.org/w/index.php?diff=18578341&oldid=18577780&rcid=12715434 [09:49:23] Morning [09:49:41] I've found a technical issue. [09:50:16] For various reasons I won't go into here, I set up an enforced wiki-break on Wikipedia [09:50:24] (and on Commons) [09:50:46] However, I wanted to continue editing on other wikis [09:51:19] Currently the script concerned, logs me out of the entire SUL sphere [09:51:49] rather than logging me out only on the project I wanted the wiki-break to apply to [09:51:53] What script is this? [09:52:00] How did you install it? [09:52:40] Sveta: I'll have to log out first.. but [09:52:47] I'll look [09:53:40] https://en.wikipedia.org/w/index.php?title=User:ShakespeareFan00/common.js&diff=prev&oldid=867942350 [09:53:56] It's a directly installed Wiki-break enforcer... [09:54:05] I've got the same code at Commons [09:55:08] https://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/WikiBreak_Enforcer [09:55:17] Is where the script came from [09:55:58] In my Wikipedia common.js I also have a 'namespace' specfic block script [09:56:58] (which I hadn't used to 'hide' the edit button in all namespaces, as it was still highly experimental and could have led to me being unable to remove it from my own userspace..) [09:57:43] The other script being - https://en.wikipedia.org/wiki/User:Zchrykng/Scripts/FileEditBlock.js [09:58:39] Ideally, the two scripts could be combined.. [09:59:12] Under normal circumstances the next step would be to seek the assistance of a someone to get them combined. [09:59:20] But this isn't urgent [09:59:43] Apologies for the wall of text. [10:00:15] One of my concerns here is that although here the issue is one of inconvenience.. [10:00:54] (And after all no-on forced me to install either script), was that a variant on this [10:01:16] could be used for less good faith actions. [10:01:40] *no-one [11:21:54] /!\ ATTN: Tһⅰs ϲhaᥒneⅼ haѕ mоⅴеd to irϲ.freenode.ᥒet #/ϳοiᥒ ⧸︕﹨ [15:04:08] duesen__: o/ o/ hello! I'm not sure if you have much further interest in that dinosaur random bug we found (T208909). If you do, your historical knowledge and input would surely be praised on the fix it script here: https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/472596/14/maintenance/resetPageRandom.php [15:04:09] T208909: [Bug] Update old nonuniformly distributed page_random values - https://phabricator.wikimedia.org/T208909 [15:06:48] duesen__: we don't have much experience writing these. Any pro tips you have on how long a script like this might take to run or how we can actually execute this thing would be invaluable. [15:08:05] you're updating a few hundred thousand to a few million page rows? [15:08:18] I wouldn't worry about how long it takes [15:08:34] just do it right [16:15:45] When is the best time to ask a technical question? [16:15:52] I have a a problem with a query [16:16:13] Any time? [16:16:18] And I'm not sure if it's a database issue or a misunderstanding of mine in regard to a query [16:16:22] There's a tech questions meeting, thats a garunteed good time [16:16:26] Why should there be a bad time to ask a technical question? [16:16:38] but generally what andre said [16:16:46] andre__: Well a bad time as in no one around to answer it [16:16:52] ShakespeareFan00: Nobody knows if they can help, until you have asked your actual question. [16:16:59] !ask | ShakespeareFan00 [16:17:05] andre__: [16:17:07] (Meh. That bot does not seem to be here.) [16:17:17] The other day I was trying to cross refernece some tables [16:17:38] https://quarry.wmflabs.org/query/31002 [16:17:45] https://quarry.wmflabs.org/query/30997 [16:18:22] I.e I was trying to cross reference between the pages table and the images table , to get the names of users who had uploaded certain media [16:18:32] (which was in certain categories) [16:18:44] I was using a JOIN [16:19:05] But was getting considerably fewer results than I would have expected for the type of query [16:19:19] thanks Krenair (sorry i missed your message earlier!). that's right, about 1.6 million rows across all wikis [16:19:23] ShakespeareFan00: Inner Join or outer join? [16:19:45] zchrykng: My understanding suggested an INNER join (via image links) [16:20:03] but this gave considerably fewer links so I changed it to a LEFT join [16:20:22] Some questions need the attention of particular people in particular timezones [16:20:40] which produced more results, but had several NULL entries where I was expecting there to have reasonably been results. [16:21:00] Via imagelinks? [16:21:03] yes [16:21:12] if you're getting weird NULLs in actor/comment/content fields, check the relevant deletion field [16:21:16] * bawolff opens query first before talking [16:21:33] Imagelinks is the table that cross references images and pages correct? [16:21:44] bawolff: There are two queries.. [16:21:46] yeah [16:22:04] One with an Inner join, one with a LEFT (to see if I'd misunderstood my query) [16:22:09] ShakespeareFan00: Inner joins will have fewer results. A left join would include everything that matches the query in the first table and insert NULL for everything in the second table that couldn't be matched. [16:22:17] So the first one [16:22:30] Yeah that's where I got concerned [16:22:53] you are only querying images that have a self-link on the image description page [16:23:14] is that what you're meaning todo? [16:23:32] Well.. I was trying to find stuff like the first entry in [16:23:38] https://quarry.wmflabs.org/query/30997 [16:24:21] It's in a specfic category, and as a file description page should be including a media file with the same name [16:25:01] However, I'm not seeing any information in the part of the query that would come from the images table [16:25:54] I may have misunderstood something, but there should be at least one entry in images/imagelinks for an image that is used on a File Description page? [16:26:12] Or have I misunderstood that aspect of how Mediawiki works.. [16:26:57] I am trying to get the uploader names, so can I 'batch' concerns into a single talk page message to a user rather than a wall of notifcations done per file with TWINKLE etc.. [16:27:35] (Although for other reasons, I might not now be actually sending such messages, and instead generating reports in my own userspace) [16:28:19] Without the username (gained from the images table), I can't apply a SORT BY to sort the returned entries by user. [16:28:53] The user names aren't stored in the pages table, so I have to cross reference into images somewhow.. [16:29:05] Sorry for the lengthy explanation.. [16:29:50] I'm trying to ONLY look at the 'titular' images, not links to every single image that may appear on a file description page, (such as icons in templates and so on) [16:29:51] When you say media link, do you mean [[media:foo.ogg]] [16:30:06] as thats not in imagelinks but pagelinks table [16:30:33] I am trying to cross-reference in a query between [[media:foo.ogg]] [16:30:44] and the username that uploaded it [16:31:09] The pages table doesn't store uploader user id's [16:31:20] The images table does. [16:31:37] i think what you actually want is to join page_title = img_name AND page_namespace = 6 [16:31:57] and not use the imagelinks table [16:32:25] But still join the images table and page table? [16:32:39] I didn't think it could be done directly [16:33:05] I'm at this point as I'm on a semi wiki-break from enwikipedia anyway [16:33:22] prepared to let someone else come up with a "better" query [16:33:56] As in: select img_user_text, ... from page inner join image ON img_name=page_name AND page_namespace=6 [16:34:16] Okay [16:34:21] err is it page_title or page_name. Cant remember but you get the point [16:36:08] If you really want to do the media: link thing, you probably want pagelinks table and look for pl_namespace = -2 (or is it normalized to 6. Probably not) [16:37:15] https://quarry.wmflabs.org/query/31081 [16:37:25] That is closer to the desired result [16:37:28] Thanks [16:38:00] It only returns 50 results by design at present [16:39:39] Hmm [16:39:46] I still don't understand queries [16:40:04] As chaning the logic of some of the other joins makes it yield zero results [16:40:22] As I said, someone probably needs to rethink the whole query [16:42:12] If I change the second categorey links JOIN to an INNER I get no results at all [16:42:26] suggesting the query logic is STILL flawed, but in a different way [16:44:22] https://quarry.wmflabs.org/query/31081 if you want to look [16:44:27] but I need to take a break [16:47:05] Nothing strikes me as immediately wrong [16:48:59] ShakespeareFan00: if you change the second category join to an inner it wont work, as that means find all entries that are both in the category and not in the category [16:49:29] its impossible for something to be both in and not in [16:49:43] so 0 results get returned [16:50:53] ShakespeareFan00: INNER means get only things that match the join. LEFT join means get things that both match and dont match [16:51:00] Okay [16:51:25] ShakespeareFan00: in where clause you have a IS NULL [16:51:27] I'm still not sure the category inclusion/exclusion is correct [16:51:44] which means exclude all the rows that match that join [16:51:55] Yes.. [16:52:04] I am trying to exclude items in a given category [16:52:25] so when cnot is a left join it gets both and then the where filters out all the things actually in that category [16:52:26] but include those which are in ONE specifc categroy [16:52:34] Ah.. [16:52:39] light bulb [16:52:49] if cnot changes to inner than you are filtering both ways [16:53:04] Which means no results :) [16:53:09] yep [16:53:23] * ShakespeareFan00 understands why the other queries may have broken [16:53:58] I could change the IN to a NOT IN ? [16:54:57] which may make it run faster [16:56:11] You are trying to exclude items in some categories except if they are also in a different category [16:56:13] ? [16:56:24] Yes.. [16:56:34] I don't need to look at redirects [16:56:50] or non-free media [16:56:50] or do you want the things in a specific category minus stuff in certain categories [16:57:20] Things in a specfic category, excluding certain categories [16:57:48] I.E No machine source, but exclude redirects because they are obviously not going to have a source field [16:58:02] So what you have should do that i think [16:58:21] the first categorylinks join is for machinereadable [16:58:32] Now to exclude certain user names [16:58:35] and then cnot does the exclusions [16:59:13] that you could probably do with img_user_text NOT IN (... [16:59:21] in the WHERE clause [17:36:47] bawolff: Actually, given the nature of this query [17:37:13] It should also be looking for the same things an "Exclusion compliant" bot should be... [17:37:35] When I next get the chance I'll ask Theo what his bot does. [17:52:50] bawolff: Thanks [17:53:03] Although there must be a better way of having an opt-out [17:53:09] then a MASSIVE list of usernames