[06:07:05] https://cdn.discordapp.com/attachments/407537962553966603/1556910649865543790/Screenshot_20261006-100614_Instagram.jpg?backend=b2&ex=6ac5e188&is=6ac49008&hm=39b11d11cb75207022abc209df11965ece1a7eb05c41ca6a5f57ec199f3ea868& [06:07:16] Hi! Where should I request enabling the TemplateData extension for my Miraheze wiki? The Tech:Noticeboard is protected, so I can't edit it. [06:53:44] You can enable the TemplateData extension on your wiki at ``Special:ManageWiki/extensions`` [06:58:28] if you're a bureaucrat, you should be able to enable it yourself; it's not restricted [06:58:40] if you aren't a bureaucrat, you should request it to be enabled from a bureaucrat [07:04:26] Thanks! [07:31:24] HOLD ON A FUCKING MINUTE [07:31:32] IS THE EXAMPLE SONG FROM THIS [07:31:35] https://youtu.be/b12dBv7EDjU?si=nNRJJe3ZNTAo0_Ia [12:20:22] hold on a fucking minute [14:10:00] [1/2] https://tolkiengateway.net/wiki/Main_Page [14:10:01] [2/2] the background is cool but hard to replicate :screaming: [14:27:53] [1/3] Since the external data thing was removed, would it be okay to periodically (i.e. once a week) fetch data from the external source via a bot account and save it to a wiki page? [14:27:53] [2/3] And if that's okay, what could be a good aproach (preferably one that doesn't require a 24/7 hosting and not costing much (or anything if avoidable)) and possible complications? [14:27:53] [3/3] I already have an account on the wiki that is designated as a bot, so I could use that for updating the wiki page in question. [14:32:16] external data was removed? why [14:32:35] security concerns [14:33:44] You can use GitHub Actions/GitLab CI which are both free [14:34:10] You can use it to run a scheduled bot run basically [14:35:00] found out why https://issue-tracker.miraheze.org/T15833 [14:42:42] Thought that this could be a possible option and also tested stuff, but got a 403 from Miraheze, which from what I gathered suggests that the aproach I tried via the action API may not be accepted? Or maybe GH IPs are blocked? [14:43:24] you need to carry something in your ua bc miraheze banned azure which serves both openai bots and github ci [14:43:28] Tho, even if that isn't the case, am I not experienced enough to make code to do what I would like to do here.... And I would like to avoid asking AI for stuff [14:43:30] You might need to contact a member of tech (or create a post in #support ) [14:43:36] [1/2] could you dm the bot's user agent [14:43:37] [2/2] GitHub actions shouldn't be blocked though [14:43:48] I set a user agent in the request tho. [14:44:09] dm a tech your ua [14:44:39] I've set `RailInfo-Wikisync/1.0` or smth like that... Sadly has been a while since I tested and I can't recall it completely :/ [14:45:00] better not here as ua is intended to be confidential [14:45:06] Speak to Jenny, she's a member of tech [14:45:25] Yeah, I seriously doubt that with how easily they are obtainable [14:45:26] @posix_memalign I did end up creating that PR after forgetting to do so, up to you if you think it's useful or not https://github.com/lihaohong6/MirahezeDevScripts/pull/26 [14:46:28] I need to try and make a test again with the bot stuff... time to find that Wikimedia page again xP [16:11:34] Are normal users no longer allowed to change a page's type by default? [16:12:09] Or do I need to create it now first to be able to change its type? [16:13:13] are you talking about content model? [16:13:23] that'll depend on the wiki's configuration [16:13:28] Yes [16:13:44] And I was able to previously change the page content model, but not anymore [16:13:58] And I don't think the people responsible for the wiki modified any changes [16:14:08] actually I don't ever remember it being possible to change the content model of a page that hadn't been created yet [16:14:18] it was [16:15:00] You visit a non-existant page, click "Page Information" on the side and were able to change it, which also created a blank page for it in the process. [16:15:03] Used that many times [16:15:42] Yeah, you need to make a page to change its type. Guess that was a bug that got fixed in a recent MW update [16:32:08] [1/21] Okay, I'm at a loss on what to do here... [16:32:09] [2/21] My python script fails to run properly here. Debugging it gives me the following data: [16:32:09] [3/21] ```{'error': {'code': 'missingparam', 'info': 'The "token" parameter must be set.'}, 'servedby': 'mw201'}``` [16:32:09] [4/21] What I find odd is, that I do set the token parameter in the request... Unless it for some reason needs to be set in the query params? [16:32:10] [5/21] I've set it like this based on a python example on the API:Edit wiki page of mediawiki: [16:32:10] [6/21] ```py [16:32:10] [7/21] result = session.post( [16:32:11] [8/21] WIKI_URL, [16:32:11] [9/21] data = { [16:32:11] [10/21] "action": "edit", [16:32:12] [11/21] "title": WIKI_PAGE, [16:32:12] [12/21] "format": "json", [16:32:13] [13/21] "text": content, [16:32:13] [14/21] "contentformat": "application/json", [16:32:14] [15/21] "contentmodel": "json", [16:32:14] [16/21] "bot": True, [16:32:15] [17/21] "token": csrf_token [16:32:15] [18/21] } [16:32:16] [19/21] ) [16:32:16] [20/21] ``` [16:32:17] [21/21] I even put token at the end, as the wiki suggests. [16:32:27] Not sure what happens here tbh [16:34:27] Yeah.... putting it in the query tells me I need to put it in the body... that API is kinda dumb ngl [16:34:59] does your token actually exist? and are you sure it's not being stripped out by something? [16:35:39] [1/2] The entire thing is here: [16:35:39] [2/2] [16:35:57] And maybe it's python acting weird with non-trailing commas [16:36:20] Because I recall you need to append commas in certain cases to tell it to treat it differently or smth [16:36:24] I can't really tell [16:37:24] try printing the token, since you get it from a different request [16:38:45] I think you need to use `json = ...` rather than `data = ...` [16:39:24] I don't know why but Python `requests` is a little silly [16:41:13] [1/2] I mean it's python... [16:41:13] [2/2] Being silly is fitting for a coding language that requires proper indentation [16:42:58] [1/2] Now it complains about "Expecting value: line 1 colum 1 (char 0)" [16:42:58] [2/2] I swear Python is almost a bigger pain to deal with than Lua [16:45:47] Ugh.... I'll deal with this after I had dinner... [17:06:03] [1/2] whats the css code string for changing the color of the popups extension preview stuff [17:06:04] [2/2] https://cdn.discordapp.com/attachments/407537962553966603/1557076486987452487/image.png?backend=b2&ex=6ac67bfb&is=6ac52a7b&hm=c44915f927a7d3e5d4f3b2beef5334ceacbf264a00131879954b2a4313341c00& [17:06:43] im trying to grab it by myself but doing so is super annoying cause the thing always goes away right before you can use web tools with your cursor to locate it [17:08:01] you should be able to grab the link itself and force the state or manually trigger the javascript event listener [17:10:29] `setTimeout(() => {debugger;}, 5000);` [17:18:51] <_lp_0> is text in "database cluster" a database name? [17:19:45] <_lp_0, replying to _lp_0> oh wait Im blind [17:37:27] Very new to all this I am trying to make a wiki for a book series I like so people can reference stuff easier would that fall under fandom or literature as a category when making a wiki request? [17:37:52] your call, I did fandom for mine, but I can see it being either [17:38:33] <_arawynn> either is fine for me and neither of them would be the one thing that decides on approve or decline [17:38:45] Alright thanks! [17:39:33] <_arawynn> allow yourself a bit of time for the reason for request field, in best case the AI can approve it right away [17:40:16] Alright will do [19:17:11] [1/3] I managed to get the stuff working after a bit of struggle. [19:17:11] [2/3] My final question now is: If the bot attempts to edit a page while the content is identical, will it simply return a success without changes, or would it give an error? [19:17:12] [3/3] Just in case I need to handle the edit a bit differently (i.e. check first if content differs) and what possible responses can be returned here. [19:32:57] [1/2] I'd recommend checking if the content is the same, and if so returning rather than trying to save the page [19:32:57] [2/2] I'm not sure what the output of trying to save it would be, but it's probably best to remove the uncertainty [20:13:25] Yeah, added a quick fetch of the page and json comparison using python's JSON lib to avoid strings being different due to different white spaces [23:23:21] miraheze went down [23:23:31] [1/2] getting bad gateway [23:23:31] [2/2] https://cdn.discordapp.com/attachments/407537962553966603/1557171476317339668/image.png?backend=b2&ex=6ac6d472&is=6ac582f2&hm=c5a63e9902078afcebf228ab6bf2adc5d9521552ddf3b716a3808e189f6a1c8a& [23:23:34] yup [23:23:35] i try to access a wiki and get "This wiki is temporarily unavailable" [23:23:44] same [23:24:01] I get a mix of a static .html page with that text and the regular Miraheze error [23:24:16] this literally just happened out of nowhere [23:25:15] and now its back [23:25:17] wtf [23:25:29] [1/2] temporarily got this which was funny [23:25:29] [2/2] https://cdn.discordapp.com/attachments/407537962553966603/1557171970293108756/image.png?backend=b2&ex=6ac6d4e8&is=6ac58368&hm=a950df3d2a413eed2188583ed1fe2d3b3ef1081e91f2891b28a6349624506a9f& [23:25:33] yeah seems all good now though? [23:26:17] <2uott8qr4> fixed faster than I could get here to complain [23:26:49] 1 minute bad gateway [23:27:00] https://cdn.discordapp.com/attachments/407537962553966603/1557172353501241364/image.png?backend=b2&ex=6ac6d543&is=6ac583c3&hm=f9b33d5294abd3696f939aca84a0928b0f70a9c33f480b0a41f81d9914bfb06e& [23:27:05] About 1/4 of all wikis might still be down. Should recover soon. [23:28:08] its still down for me tho [23:28:23] nvm [23:28:58] All wikis should be up now [23:31:20] :D