Wikipedia:Village pump (technical)
Policy | Technical | Proposals | Idea lab | WMF | Miscellaneous |
If you want to report a JavaScript error, please follow this guideline. Questions about MediaWiki in general should be posted at the MediaWiki support desk. Discussions are automatically archived after remaining inactive for five days.
Frequently asked questions (see also: Wikipedia:FAQ/Technical) Click "[show]" next to each point to see more details.
|
invalid returnUrlToken?
[edit]My bot just started getting an error "invalid returnUrlToken" when it tries to edit. Anybody know what this is related to? Presumably there's been a recent change to Mediawiki, because this only started happening a few days ago. —scs (talk) 03:38, 20 March 2025 (UTC)
Hmm. Per a question just above, there's a good change it has something to do with SUL3. —scs (talk) 03:43, 20 March 2025 (UTC)
- Bots should generally use either OAuth or bot passwords, not the web interface for login.
- That said, can you check what URLs your bot is hitting (including redirects)? Tgr (WMF) (talk) 10:37, 20 March 2025 (UTC)
- @Tgr (WMF): What, not scrape the web interface? Oh, don't I know it. (Over the years I've made several desultory attempts to use the API, like a regular botherd. Pretty sure now's the time to do that for real.)
- Anyway, yes, checking the actual URLs is my next step, when I have time to dig into it. (My bot uses a crufty old framework that I can barely remember the details of.)
- Thanks very much for the pointers to OAuth and bot passwords. One of those is probably just what I need. —scs (talk) 11:53, 20 March 2025 (UTC)
- Keep in mind, oauth/bot passwords are certainly a good idea, but the main change would be to use the api vs screenscraping the webui. — xaosflux Talk 12:46, 20 March 2025 (UTC)
- FWIW
returnUrlToken
is used for top-level autologin, a chain of redirects when you visit Special:Userlogin. It's not SUL3 related per se but there have been some small changes to its behavior recently. As a quick workaround, you can avoid autologin by setting theCentralAuthAnonTopLevel=1
cookie or thecentralAuthAutologinTried=1
URL parameter when visiting Special:Userlogin. The login UI and workflow is changing in other ways, though, and will probably break your bot soon anyway if it uses web scraping. Tgr (WMF) (talk) 12:54, 20 March 2025 (UTC)- @Tgr (WMF): Thanks. For what it's worth, I tried adding
¢ralAuthAutologinTried=1
to the URL when fetchingSpecial:Userlogin
, and it successfully worked around the "invalid returnUrlToken" issue, but it left the bot not logged in at all. (Perhaps that's what you meant by "avoid autologin".) —scs (talk) 03:04, 28 March 2025 (UTC)- @Scs: you can try adding
&usesul3=0
to the URL on top of that. --Tgr (WMF) (talk) 19:14, 28 March 2025 (UTC)- @Tgr (WMF): Mirabile dictu, that seems to have worked. Thank you again.
- The bot is working again, for now, although I realize full well that it is living on borrowed time. If I'm lucky, I'll manage to get it rewritten to use the API before the next domino falls. —scs (talk) 00:35, 29 March 2025 (UTC)
- @Scs: you can try adding
- @Tgr (WMF): Thanks. For what it's worth, I tried adding
edit api with oauth javascript (not nodejs) (not mediawiki js) example
[edit]Hello, https://www.mediawiki.org/wiki/API:Edit#JavaScript actually is nodejs. Could you please share with me an example, that allows to auth using OAuth and create a page with content I have in my variable in JavaScript, for client-side in-browser JavaScript without involving nodejs? It will be outside of wiki page, so I won't have access to mw.utils and the like. Could you please share a few examples? (I've asked here also hoping for faster replies here.) Gryllida (talk, e-mail) 04:27, 21 March 2025 (UTC)
- @Gryllida You're in luck, because this was just recently made possible thanks to @Lucas Werkmeister's work. See the links in this comment and below, there are code examples: T322944#10590515. Matma Rex talk 16:33, 21 March 2025 (UTC)
- I could only find nodejs examples there? Gryllida (talk, e-mail) 09:48, 22 March 2025 (UTC)
- This example runs in the browser, you just need Node to either serve or build it (because it was easier to set up this way). Lucas Werkmeister (talk) 10:46, 22 March 2025 (UTC)
- Hi Lucas
- It looks too complicated for me, as I am not familiar with the corresponding libraries used nor with npm. I have code like this: (there actually is more, as user generated page content from a few other variables in my app, but this is the part I am having trouble with) What is the code to insert afterwards to get this content added to the page with this pageName on that wiki?
var pageName='Gryllida Test 2'; var url = 'http://test.wikipedia.org'; var content='Hello world';
- Regards, Gryllida (talk, e-mail) 00:44, 23 March 2025 (UTC)
- @Leaderboard Gryllida (talk, e-mail) 20:05, 25 March 2025 (UTC)
- I'm not familiar with this, sorry. From what I understand, you need to install node.js (https://nodejs.org/en/download) and install the dependencies locally on your system? Looks like the app would run locally as a result. Leaderboard (talk) 04:49, 26 March 2025 (UTC)
- @Gryllida: This should work, once you have the OAUTH 2.0 access token:
- @Leaderboard Gryllida (talk, e-mail) 20:05, 25 March 2025 (UTC)
- This example runs in the browser, you just need Node to either serve or build it (because it was easier to set up this way). Lucas Werkmeister (talk) 10:46, 22 March 2025 (UTC)
- I could only find nodejs examples there? Gryllida (talk, e-mail) 09:48, 22 March 2025 (UTC)
Extended content
|
---|
var pageName='Gryllida Test 2';
var url = 'http://test.wikipedia.org';
var content='Hello world';
var summary='API test';
const oauthToken = "OAUTHAccessToken";
var apiEndpoint = url + '/w/api.php';
var params = {
action: 'query',
meta: 'tokens',
format: 'json',
formatversion: '2',
crossorigin: ''
};
var queryURL = new URL(apiEndpoint);
queryURL.search = new URLSearchParams(params);
fetch(queryURL, {method: 'GET', headers: {'Authorization': 'Bearer ' + oauthToken}})
.then(function(response){return response.text()})
.then(function(text){try {const data=JSON.parse(text);return data} catch (e) {return text}})
.then(function(data){
var csrfToken = data?.query?.tokens?.csrftoken;
if (csrfToken) {
console.log(csrfToken);
params = {
title: pageName,
text: content,
summary: summary,
format: 'json',
formatversion: '2',
token: csrfToken
};
var body = new URLSearchParams(params);
queryURL = new URL(apiEndpoint);
queryURL.search = new URLSearchParams( {action: 'edit', crossorigin: ''} );
fetch(queryURL, {method: 'POST', headers: {'Authorization': 'Bearer ' + oauthToken}, body: body})
.then(function(response){return response.text()})
.then(function(text){try {const data=JSON.parse(text);return data} catch (e) {return text}})
.then(function(data){
var result = data?.edit?.result;
if (result) {
console.log(result);
} else {
console.error("Error posting edit!");
console.error(data);
}
});
} else {
console.error("Error retrieving CSRF token!");
console.error(data);
}
});
|
--Ahecht (TALK
PAGE) 20:35, 26 March 2025 (UTC)
- Thank you, I will try it out. Gryllida (talk, e-mail) 22:58, 26 March 2025 (UTC)
- Is the `oauthToken = "OAUTHAccessToken"` unique to my account? What if I would like multiple different users to use this app? Like flickr2commons app. (cc Ahecht) Regards, -- Gryllida (talk, e-mail) 03:33, 30 March 2025 (UTC)
- nvm, i found oauth infos described on wikidata wiki Gryllida (talk, e-mail) 09:33, 30 March 2025 (UTC)
- Actually:
- It worked, the token is for my user account only. I was following this guide.
- I've added another request for another token that allows multiple accounts, if I understand correctly it will auth users separately and prompt them to agree. I'd like it to be for multiple accounts, like flickr2commons. This is currently still unsolved question for me. I will see how it works after my oauth thingy request is approved.
- I'm concerned the 'token' is published in JavaScript app and there is no way to hide it from users as all JavaScript is visible on client side. Is this correct? This is unsafe, right?
- Regards, -- Gryllida (talk, e-mail) 10:18, 30 March 2025 (UTC)
- For the second point, I got it approved, however, it only provides "application key" and "application secret". There is no "OAuth token" provided. Gryllida (talk, e-mail) 10:22, 30 March 2025 (UTC)
- If you want to let different users make requests, you will have to go through the full OAuth authorization flow, as demonstrated in the example mentioned above. (There's also a note there now about the visibility of the OAuth credentials.) Lucas Werkmeister (talk) 12:39, 30 March 2025 (UTC)
- Sorry, which example? Gryllida (talk, e-mail) 21:07, 30 March 2025 (UTC)
- I mainly meant the client-side example (this is the new functionality that @Matma Rex was referring to), though if you want to keep the OAuth client confidential, then you’d need the server-side example instead – or, if you prefer, just write the server-side part in a different language altogether. (Wikitech has a few examples for OAuth-based tools, such as My first Flask OAuth tool, but seemingly not for Perl or PHP – My first PHP tool doesn’t cover the OAuth part.) Lucas Werkmeister (talk) 23:53, 30 March 2025 (UTC)
- I'm seeing last paragraph at this repo you linked includes reference to the m3api server side example. The main issue is that I have experience with Perl and with PHP, but not with npm nor with m3api, and for the task I need the provided example is too big. Ideally, I'd've liked someone to guide me from a 1-line hello world example and help me to gradually grow it to do specifically my task. Is that something that you would like to do over an audio call, or do you know someone else who can? Or perhaps you (or someone you know) can write such a tutorial incrementally? Many thanks. (Please note I am on live chat, IRC, with nick 'gry'.) Regards, -- Gryllida (talk, e-mail) 21:47, 30 March 2025 (UTC)
- Sorry, which example? Gryllida (talk, e-mail) 21:07, 30 March 2025 (UTC)
- If you want to let different users make requests, you will have to go through the full OAuth authorization flow, as demonstrated in the example mentioned above. (There's also a note there now about the visibility of the OAuth credentials.) Lucas Werkmeister (talk) 12:39, 30 March 2025 (UTC)
- For the second point, I got it approved, however, it only provides "application key" and "application secret". There is no "OAuth token" provided. Gryllida (talk, e-mail) 10:22, 30 March 2025 (UTC)
Wikimedia log in
[edit]Hi. This happened once before and as I recall the answer was check back later. I am trying to reach the Wikipedia Library for a couple days. The Wkimedia log in page gives me the error: Incorrect username or password entered. Please try again.
-SusanLesch (talk) 18:23, 24 March 2025 (UTC)
- @SusanLesch If you use a password manager, and you have several accounts in Wikimedia-adjacent projects (e.g. something like Phabricator), double-check that it's filling in the password for the correct account. Recent changes to logins (see recent Tech News entry) have made it easier to mix them up. Matma Rex talk 18:55, 24 March 2025 (UTC)
- Thank you for the link to the news. I do use a password manager, and double checked the entry. But no luck. -SusanLesch (talk) 19:40, 24 March 2025 (UTC)
- I'm locked out for the second time today. -SusanLesch (talk) 21:24, 24 March 2025 (UTC)
- Thank you for the link to the news. I do use a password manager, and double checked the entry. But no luck. -SusanLesch (talk) 19:40, 24 March 2025 (UTC)
I would like to please access the Wikipedia Library. Can anybody here help? -SusanLesch (talk) 18:04, 25 March 2025 (UTC)
- @SusanLesch Hi, we've reviewed the system logs related to logins to your account to try to get to the bottom of this. They indicate that your password was changed earlier this year. I may be able to share more details with you, but I don't think I should share them on this public page, so please feel free to contact me by email if that would help you (I have the address on my WMF user page, or you can use Special:EmailUser). As far as we can tell, this is not caused by any problem with the Wikipedia Library or with the new login system. --Matma Rex / Bartosz Dziewoński (WMF) (talk) 19:21, 25 March 2025 (UTC)
- Resolved. Truly bizarre. I was able to sign in but cannot account for the failures of a well-respected password manager. Thank you for your help, Matma Rex. -SusanLesch (talk) 22:31, 29 March 2025 (UTC)
Infobox templates seem to push images down the page.
[edit]In Beryllium the long infobox on the right size seems to prevent any images on the left side. The result is that all the images in the page are pushed to start at the end of the infobox, far away from the content they are related to. I've seen this in other articles as well. Any hints? Thanks! Johnjbarton (talk) 03:20, 27 March 2025 (UTC)
- You can left-align images against an infobox (although probably best not to have such a long infobox). What does push images down is a right-aligned image above them. However, I'm not seeing any pushing in Beryllium, the first left-aligned image is after the infobox. CMD (talk) 05:37, 27 March 2025 (UTC)
- Having left aligned images opposite an infobox is normally discouraged, per MOS:SANDWICH. 86.23.109.101 (talk) 11:13, 27 March 2025 (UTC)
- That recommendation is needed because infoboxes do not push left-aligned images down the page. CMD (talk) 11:53, 27 March 2025 (UTC)
- Johnjbarton identifies a long-standing annoyance about layout, which becomes increasingly problematic as one's window gets wider. Chipmunkdavis, I think you are mis-understanding the terms "left" and "right" in this context. A "left-aligned" image is one that is on the left of the screen, not adjacent to the left edge of another floating item. The Beryllium article is a great example of that: where do you see the "Solar Activity Proxies" graph? It's not displayed in the Isotopes and nucleosynthesis section where the source actually has it. Adjusting screen-width maintains the incorrect vertical placement vs that section; editing that section itself confirms that it's not a bug in that section itself.
- But it does appear to relate to image-stacking on the right, in a subtle way. If there is no image in the article that is right-aligned (other than the infobox object) prior to the left-aligned image, then the left-aligned image does display in the correct section. Does this revision display correctly for everyone? The situation seems to be that objects cannot display in inverted order compared to the source: if an File:A is after File:B in the source, layout cannot place File:A earlier than File:B. Because the metal-lump image on the right is stacked and pushed down by the infobox, the graph-image on the left that is after the metal-lump image in the source can't display any earlier than the metal-lump image. DMacks (talk) 13:58, 27 March 2025 (UTC)
- Yes, the version of DMacks solves the problem with "Solar Activity Proxies", thanks!
- Is it possible to not stack the right-align images? So the metal-lump image would be right of the text and left of the infobox?
- I checked the Beryllium page and the sandwich is not a serious problem.
- Johnjbarton (talk) 15:09, 27 March 2025 (UTC)
- See Template:Stack for the normal fix. It requires the right-aligned elements to be stacked are consecutive in the code so you would have to move image code up to the infobox code. PrimeHunter (talk) 15:29, 27 March 2025 (UTC)
- I mean it's a fix to the original problem where a left-aligned image is pushed down. PrimeHunter (talk) 15:35, 27 March 2025 (UTC)
- See Template:Stack for the normal fix. It requires the right-aligned elements to be stacked are consecutive in the code so you would have to move image code up to the infobox code. PrimeHunter (talk) 15:29, 27 March 2025 (UTC)
The situation seems to be that objects cannot display in inverted order compared to the source: if an File:A is after File:B in the source, layout cannot place File:A earlier than File:B.
That's right. If you want the exact words of the relevant CSS specification, it's item #5 at https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#float-rules. Anomie⚔ 00:19, 28 March 2025 (UTC)- The exact words: "5. The outer top of a floating box may not be higher than the outer top of any block or floated box generated by an element earlier in the source document." If the source order is Infobox, File:B, File:A, then Template:Stack can make Infobox and File:B part of the same floating box. This enables File:A to be displayed above File:B (but not above Infobox). PrimeHunter (talk) 12:58, 28 March 2025 (UTC)
- At least in the case of the Elements pages, using {{Stack}} would not be a good choice. We want the images to be next to the content, whether are left or right align to the text.
- The design we want is for the combo of images and text to flow around the infobox anchor which is anchored to the right. Johnjbarton (talk) 16:02, 28 March 2025 (UTC)
- That's exactly what {{Stack}} achieves for left-floating images which can otherwise be pushed below the infobox. We don't allow your wanted layout with both a left-floated image, text, and a "right-floated" image to the left of an infobox. That would give poor results on too many screens without enough room. PrimeHunter (talk) 20:54, 28 March 2025 (UTC)
- Well I'm confused. If I use "left" then things work, I don't need {{Stack}}. If I use "right" things "fail" -- meaning the images are out of position -- with or without Stack. Why do I need Stack? (I get that we don't want |Left Image| Text |Right Image| |Infobox|, but that is not what we are looking for). Johnjbarton (talk) 21:10, 28 March 2025 (UTC)
- You came here for help because left did not work in [1] where the code for the plot image is in the "Isotopes and nucleosynthesis" section but the image is pushed down below the infobox. I'm saying {{Stack}} could have fixed that. You made a different fix [2] where the code for another image was moved below the plot image code. After that change {{Stack}} was no longer needed. Here is the fix with {{stack}}. I'm not judging which fix is best in this case but just demonstrating how stack works. PrimeHunter (talk) 23:37, 28 March 2025 (UTC)
- Thanks! Your result is what I expected based on your explanation. It is not what we want: putting images below the infobox means they won't be with the text they are related to. It would be ok if the images where just extra stuff related to the infobox.
- I think the best compromise is to Left all images that fall before the end of the infobox. Sadly this will be a continual maintenance issue and require guessing the common page width to start default/right images. Johnjbarton (talk) 00:37, 29 March 2025 (UTC)
- We cover most of this at WP:MFOP. --Redrose64 🌹 (talk) 12:27, 29 March 2025 (UTC)
- Thanks. If I understand correctly, the infobox counts as an 'image' in the discussion at WP:MFOP? Johnjbarton (talk) 15:47, 29 March 2025 (UTC)
- Yes. If it helps, don't think of images and infoboxes as distinct concepts - think of both of them as boxes, or even as objects. Objects that are aligned to the left margin or to the right margin. The order in which these objects are displayed is the same as the order in which they occur in the page source. --Redrose64 🌹 (talk) 19:38, 29 March 2025 (UTC)
- Thanks. If I understand correctly, the infobox counts as an 'image' in the discussion at WP:MFOP? Johnjbarton (talk) 15:47, 29 March 2025 (UTC)
- We cover most of this at WP:MFOP. --Redrose64 🌹 (talk) 12:27, 29 March 2025 (UTC)
- You came here for help because left did not work in [1] where the code for the plot image is in the "Isotopes and nucleosynthesis" section but the image is pushed down below the infobox. I'm saying {{Stack}} could have fixed that. You made a different fix [2] where the code for another image was moved below the plot image code. After that change {{Stack}} was no longer needed. Here is the fix with {{stack}}. I'm not judging which fix is best in this case but just demonstrating how stack works. PrimeHunter (talk) 23:37, 28 March 2025 (UTC)
- Well I'm confused. If I use "left" then things work, I don't need {{Stack}}. If I use "right" things "fail" -- meaning the images are out of position -- with or without Stack. Why do I need Stack? (I get that we don't want |Left Image| Text |Right Image| |Infobox|, but that is not what we are looking for). Johnjbarton (talk) 21:10, 28 March 2025 (UTC)
- That's exactly what {{Stack}} achieves for left-floating images which can otherwise be pushed below the infobox. We don't allow your wanted layout with both a left-floated image, text, and a "right-floated" image to the left of an infobox. That would give poor results on too many screens without enough room. PrimeHunter (talk) 20:54, 28 March 2025 (UTC)
- The exact words: "5. The outer top of a floating box may not be higher than the outer top of any block or floated box generated by an element earlier in the source document." If the source order is Infobox, File:B, File:A, then Template:Stack can make Infobox and File:B part of the same floating box. This enables File:A to be displayed above File:B (but not above Infobox). PrimeHunter (talk) 12:58, 28 March 2025 (UTC)
- Having left aligned images opposite an infobox is normally discouraged, per MOS:SANDWICH. 86.23.109.101 (talk) 11:13, 27 March 2025 (UTC)
- Thanks for all of the help here! Johnjbarton (talk) 19:47, 29 March 2025 (UTC)
Toolforge problem?
[edit]https://randomincategory.toolforge.org/All_articles_with_a_promotional_tone?site=en.wikipedia.org
Gave this error
404 Not found
nginx
—Mint Keyphase (Did I mess up? What have I done?) 13:17, 27 March 2025 (UTC)
- Works fine for me. – DreamRimmer (talk) 13:24, 27 March 2025 (UTC)
Yes - Problem exists
- I just got this message.
- "Not found
- The URL you have requested, https://afdstats.toolforge.org/afdstats.py?name=Maile66&max=&startdate=&altname=, doesn't seem to actually exist.
- If you have reached this page by following a link
- This URL is managed by the afdstats tool, maintained by 0xDeadbeef, Ahecht, APerson, Legoktm, Scottywong, Σ.
- Perhaps its files are on vacation, or the link you've followed doesn't actually lead somewhere useful?
- You might want to look at the list of tools to find what you were looking for. If you're pretty sure this shouldn't be an error, you may wish to notify the tool's maintainers (they are listed above) about the error and how you ended up here."
— Maile (talk) 13:52, 27 March 2025 (UTC)
- Looks like everything is OK now. — Maile (talk) 14:41, 27 March 2025 (UTC)
- I just went to that link, and it does exist (however, it took some time to load). SeaDragon1 (talk) 14:51, 27 March 2025 (UTC)
- @DreamRimmer, @Maile66: For the first one, the logs show that the redis service on Toolforge went down, which brought the randomincategory webservice down as well. Randomincategory can take some time to load on larger categories (the one in the example has 22,000+ pages), but category contents are cached for 10 minutes so subsequent requests should be faster.
- The logs for afdstats show that it was shut down and restarted twice recently, probably due to the same Toolforge server issues. It can be slow as it has to retrieve each AfD page and process it so it can take a while for someone with almost 1,000 AfDs. Somewhere on my to-do list is a future project to do some caching with that tool as well to speed it up. --Ahecht (TALK
PAGE) 19:21, 27 March 2025 (UTC) - Works fine for me now as well. However, it does load for longer than usual. —Mint Keyphase (Did I mess up? What have I done?) 02:58, 28 March 2025 (UTC)
Toolforge problem -the latest, 29 March 2025
[edit]Here we go again. "Webservice is unreachable. The tool responsible for the URL you have requested, https://afdstats.toolforge.org/afdstats.py?name=Maile66&max=&startdate=&altname=, is not currently responding." — Maile (talk) 12:16, 29 March 2025 (UTC)
- @Maile66: I can access it. – DreamRimmer (talk) 12:19, 29 March 2025 (UTC)
- Works for me now. — Maile (talk) 12:27, 29 March 2025 (UTC)
Is there a way of getting overall page views per day of every article a user has contributed to?
[edit]Hi all
I've seen the pageview counter on the new HomePage feature but this only seems to be showing statistics for the past 60 days. Is there a way of seeing pageviews of all articles a user has contributed to since their account was created? For someone who has been around for a while, this could be 1000s of articles.
Thanks
John Cummings (talk) 14:10, 27 March 2025 (UTC)
- Hi @John Cummings, I'm the Product Manager for the Growth team, which developed the Homepage and Impact Module that displays these statistics. As far as I know, there isn't currently an easy way to view the pageviews of all articles a user has contributed to since their account was created. The Impact Module was originally designed with new editors in mind, which is why it’s limited to 60 days and only reflects a user's most recent 1,000 edits.
- That said, we’ve been actively exploring ways to make the Impact Module more valuable for experienced editors, as outlined in T341599 and T388558. This includes the possibility of increasing the upper limit of the underlying query and adding additional statistics. While we can likely adjust the time period and the number of edits tracked, we'll still need a reasonable upper limit to ensure these improvements are balanced with system performance considerations.
- I’d love to hear your thoughts—do you have any specific feedback on the Impact Module? Are there particular types of data that would be especially useful to you? Also, if you haven't already, you can access your Impact data directly here: Special:Impact.
- I apologize if this isn't exactly what you were hoping for, but I hope it's at least nice to know that a WMF team is thinking of improvements that might help (at least partially) address this question. :) Best, -- KStoller-WMF (talk) 23:05, 27 March 2025 (UTC)
- Hi KStoller-WMF thanks very much for your message, I'll reply by email. John Cummings (talk) 09:45, 28 March 2025 (UTC)
Why formatversion=2?
[edit]Can somebody ELIF why the action API has a choice of formatversion=1 or formatversion=2? As far as I can tell from trying both (version 1, version 2), v2 gives you the same information but in a data structure which is more complicated and more difficult to navigate. What am I missing here? RoySmith (talk) 00:49, 28 March 2025 (UTC)
- See mw:API:Data formats#JSON parameters. – DreamRimmer (talk) 01:08, 28 March 2025 (UTC)
- Following a couple of links from that page, I found mw:API:JSON version 2#Changes to JSON output format, which I think more directly answers the question, although maybe we could document the reasons for the changes in more detail. I've always felt that version 2 is the easier one to use, can you say more about what makes you feel the opposite way? Matma Rex talk 09:22, 28 March 2025 (UTC)
- While that link has a good summary of what the differences are, the "why" is that we wanted to clean up a bunch of odd quirks in the API output but didn't want to just break most things using the API. Thus the new
formatversion
parameter, so old clients aren't broken but new clients can opt-in to the new format. I'm also curious as to what you see as more complex in the version 2. Anomie⚔ 12:59, 28 March 2025 (UTC)- The most confusing change is adding an extra array level (see this result). After (to use python notation)
result['query']['pages']
, I'm left with an array of one value, so I need to do[0]
. What's the point of that? If I got back multiple pages, there's no indexed way to find the one I want, so I'd have to do a linear search of all the array elements to find the one with the rightpageid
value. RoySmith (talk) 13:11, 28 March 2025 (UTC)- PS, I'm totally on board about using an explicit version specifier when making the format change. RoySmith (talk) 13:14, 28 March 2025 (UTC)
- There's no extra level. With formatversion=1 you'd have to do
result['query']['pages']['79457898']
rather thanresult['query']['pages'][0]
. The point of it is to have the same result structure whether you happened to receive one page or multiple pages in the response (note it's not really possible for the server generating the response to know whether the client doingtitles=Foo
really intended to query exactly one page or if it happened to have just one page in its array of pages to request). RegardingIf I got back multiple pages, there's no indexed way to find the one I want
, that's true but most queries are bytitle
rather thanpageid
so clients would still have to iterate to find the one they want, and for the single-page case it allows for doing direct access by[0]
instead of having to iterate or run it through some sort ofvalues()
function first. Anomie⚔ 13:37, 28 March 2025 (UTC)- If I query for multiple pages, are the results guaranteed to come back in the same order as the were in the request? RoySmith (talk) 14:05, 28 March 2025 (UTC)
- Regarding "most queries are by title rather than pageid so clients would still have to iterate to find the one they want", I assume what comes back in the "title" slot is the canonicalized title, so I'd need to canonicalize my original search key to do that comparison? RoySmith (talk) 14:51, 28 March 2025 (UTC)
- Yes, but the API does give you an explanation of the normalization it did. There's a
normalized
field underquery
that you could use to translate your inputs for said iteration, without having to manually do any canonicalization viamw.Title
or whatever. - (You'd have to do this in either
formatversion
, of course, since you wouldn't know thepageid
to check in the result.) DLynch (WMF) (talk) 16:40, 28 March 2025 (UTC)
- Yes, but the API does give you an explanation of the normalization it did. There's a
- No. Probably the results will be reordered. The order likely depends on the database query that is done. Anomie⚔ 20:08, 28 March 2025 (UTC)
- OK, this is starting to make a little more sense, thank you everybody. RoySmith (talk) 18:25, 29 March 2025 (UTC)
- Regarding "most queries are by title rather than pageid so clients would still have to iterate to find the one they want", I assume what comes back in the "title" slot is the canonicalized title, so I'd need to canonicalize my original search key to do that comparison? RoySmith (talk) 14:51, 28 March 2025 (UTC)
- If I query for multiple pages, are the results guaranteed to come back in the same order as the were in the request? RoySmith (talk) 14:05, 28 March 2025 (UTC)
- The most confusing change is adding an extra array level (see this result). After (to use python notation)
- While that link has a good summary of what the differences are, the "why" is that we wanted to clean up a bunch of odd quirks in the API output but didn't want to just break most things using the API. Thus the new
Archive search
[edit]Can someone add one of those archive search boxes to Wikipedia:Requests for page protection/Archive? Thanks! Polygnotus (talk) 04:48, 29 March 2025 (UTC)
Username in template paths
[edit]I have several templates in userspace that I'd like to start using for real. However, they're not ready for general use, so need to stay where they are. This means that in order to use one of them, I have to type {{subst:user:Musiconeologist/ }}
before I even get to the name of the template. Using a relative path won't help outside of my own user space, since it's relative to the page calling the template.
So, is there some variable, parser function, shortcut or similar that replaces the User:Musiconeologist
part of that? So far I've not been able to find anything. Basically something that acts as a path prefix. Musiconeologist • talk • contribs 14:18, 29 March 2025 (UTC)
- You should not use templates in your userspace outside of your own userspace. Move them to template namespace if they are being used elsewhere. You can always edit them as and when required. —CX Zoom[he/him] (let's talk • {C•X}) 14:25, 29 March 2025 (UTC)
- Is this correct? My understanding is that you shouldn't transclude them outside of your userspace (for pretty obvious reasons), but that substituting is fine. I'll check the guidelines again, but I'm pretty sure it's something like "if you use them outside your own userspace, always substitute them". Musiconeologist • talk • contribs 14:34, 29 March 2025 (UTC)
- It's fine if you're substing them and the substed output is clean. User:CX Zoom apparently overlooked that part of your question. As for the original question, I don't think there's any magic to replace having to type out
subst:User:Musiconeologist
; the best you might do is add a user script to add your templates to the CharInsert gadget, assuming you don't have that gadget disabled and don't use VE. Anomie⚔ 14:39, 29 March 2025 (UTC)- Thanks! The first part of that is a relief, and the second part is as I feared. I hoped there might be a
{{#me:}}
parser function or something. My solution will probably be a shortcut in SwiftKey, then, but I'll investigate that gadget too. Musiconeologist • talk • contribs 14:55, 29 March 2025 (UTC)- @Anomie Actually the gadget looks as though it might be exactly the right solution. Thanks :-) Musiconeologist • talk • contribs 15:12, 29 March 2025 (UTC)
- If you are using the 2017 wikitext editor, this userscript would make it so that anytime you typed
!SUB
it'd fill all that in for you. DLynch (WMF) (talk) 15:55, 29 March 2025 (UTC)
- Thanks! The first part of that is a relief, and the second part is as I feared. I hoped there might be a
- I'm sorry. Yes, substituting outside your userspace is fine. Transcluding is not. —CX Zoom[he/him] (let's talk • {C•X}) 14:40, 29 March 2025 (UTC)
- It's fine if you're substing them and the substed output is clean. User:CX Zoom apparently overlooked that part of your question. As for the original question, I don't think there's any magic to replace having to type out
- Is this correct? My understanding is that you shouldn't transclude them outside of your userspace (for pretty obvious reasons), but that substituting is fine. I'll check the guidelines again, but I'm pretty sure it's something like "if you use them outside your own userspace, always substitute them". Musiconeologist • talk • contribs 14:34, 29 March 2025 (UTC)
- I believe
{{subst:User:{{subst:REVISIONUSER}}/the_template}}
answers the question, though I don't guarantee you'll find it useful. -- zzuuzz (talk) 15:00, 29 March 2025 (UTC)- Seems worth a try. Maybe if I wrap it in something shorter . . . Oh but then that's in my userspace itself, with a long name. I'll play around with that, though. Thanks! Musiconeologist • talk • contribs 15:21, 29 March 2025 (UTC)
- You could also use Help:CharInsert#Customization to make a button which inserts
{{subst:User:Musiconeologist/}}
and places the cursor after the slash. You can add this to your common JavaScript: // Add custom CharInsert entries per [[Help:CharInsert#Customization]] window.charinsertCustom = { "Wiki markup": 'Custom: {\{subst:User:Musiconeologist/+}\}', };
- PrimeHunter (talk) 23:33, 29 March 2025 (UTC)
- @PrimeHunter Ah now this looks excellent. I'm often editing in desktop view on a phone, so getting the cursor where I want it can be a bit of a pain which this solves. Plus it's nice and compact in the JavaScript, making it helpful in ten years' time when I've forgotten what's in there and why. Musiconeologist • talk • contribs 01:32, 30 March 2025 (UTC)
- You could also use Help:CharInsert#Customization to make a button which inserts
- Seems worth a try. Maybe if I wrap it in something shorter . . . Oh but then that's in my userspace itself, with a long name. I'll play around with that, though. Thanks! Musiconeologist • talk • contribs 15:21, 29 March 2025 (UTC)
redirects
[edit]I just had to create a redirect from La Republica (Costa Rica) to La República (Costa Rica), which surprised me, I actually wondered if I'd screwed something up that the link was red. And then minutes later had to do it again, creating a redirect from Magon Prize to Magón National Prize for Culture when there's already a redirect at Magón Prize. I thought our search function could handle this stuff, is there a reason why in these cases it didn't? Thanks for any help! Valereee (talk) 19:43, 29 March 2025 (UTC)
- When you say search, what do you mean? My understanding is that all of our searches whether of the Special:Search or the "auto displayed results" do take into account character folding (which is the special phrase for "it looks like a U so it should be a U" in search). Maybe you mean something somewhere else? Particularly, links are not red or blue based on search, they're red or blue based on whether they exist in the database, and that doesn't (and shouldn't, for a few reasons) do character folding by itself (e.g. WP:BLP concerns that we already have with people red linking names that turn blue later but it's a completely different person). Izno (talk) 20:04, 29 March 2025 (UTC)
- In this case I typed into the article (in English alphabet, so u instead of ú in La República (Costa Rica) and Magon Prize instead of Magón Prize) what I assumed would be an existing redirect and placed brackets around it, and the link was red. It was very weird. I've done a bit of work in other alphabets because I work a lot on foods that are rendered in several alphabets, and I haven't had this happen before. Always, if there's an existing article, using the English alphabet finds it. But this happened twice in a few minutes. Valereee (talk) 20:14, 29 March 2025 (UTC)
- So yes, your case is the second case: article text ("red link") is a check against the database and not the search system. You just found names that didn't have a redirect is all. Izno (talk) 21:22, 29 March 2025 (UTC)
- @Izno, but why wouldn't La Republica (Costa Rica) automatically redirect to La República (Costa Rica) without me having to create that redirect? I apologize if I'm being obtuse, not intentional. Valereee (talk) 21:29, 29 March 2025 (UTC)
- As above,
they're red or blue based on whether they exist in the database, and that doesn't (and shouldn't, for a few reasons) do character folding by itself (e.g. WP:BLP concerns that we already have with people red linking names that turn blue later but it's a completely different person).
- It's just not something the system does. And there are non-0 reasons for it not to do so. Izno (talk) 21:32, 29 March 2025 (UTC)
- There are no automatic redirects for page titles. There are automatic redirects for namespaces - this is why we can use WP:Village pump (technical) interchangeably with Wikipedia:Village pump (technical), this is something built into the MediaWiki software and configured on a per-site basis. --Redrose64 🌹 (talk) 22:14, 29 March 2025 (UTC)
- MediaWiki allows separate pages for a title with and without diacritics, e.g. José and Jose. Then I think it makes sense that the latter link would be red if the page doesn't exist. Imagine it was an automatic redirect to José. Then somebody creates a new page at Jose and the existing links suddenly get a new target. That would be confusing. And what if there is more than one potential target by changing diacritics? PrimeHunter (talk) 22:36, 29 March 2025 (UTC)
- Again sorry for being dense, just trying to understand things like why Germknodel, which redirects to Germknödel, was created by a bot in 2008. La República (Costa Rica) was only created in February. Is it just that the bot hasn't gotten around to it? Hm...but Magón Prize was created manually in 2008. Maybe the bot ignores redirects? Or deals with an umlaut but not with these accented vowels? And whichever it is, the learning for me is when I end up with a red link that I'm sure should be blue while in article text, check the search box and manually create the redirect? Valereee (talk) 12:23, 30 March 2025 (UTC)
- Eubot, which created the Germknodel redirect, stopped editing in 2008. La República (Costa Rica) was created in 2025, so obviously it never touched it. It's botmaster Eugene stopped editing in 2013. The bot had permission to make redirects for scientific names and abbreviated titles. Bots do not run forever. Snævar (talk) 12:52, 30 March 2025 (UTC)
- Wikipedia:Article titles#Special characters says "provide redirects from versions of the title that use only standard keyboard characters". RjwilmsiBot made many in 2016. I don't know whether any bot has done it since. PrimeHunter (talk) 13:07, 30 March 2025 (UTC)
- Thank you all very much! Would it maybe be useful to make a stop at WP:Bot requests? It seems like a useful timesaver. Valereee (talk) 14:02, 30 March 2025 (UTC)
- (edit conflict) User:AnomieBOT creates redirects for titles with en-dashes. If we have a current consensus I can point to that a bot should create these redirects, and a clear definition of how to determine the corresponding "only standard keyboard characters" title (maybe map all these characters and strip any Combining Diacritical Marks, then see if the result is ASCII?), I could have AnomieBOT do these in much the same way. Anomie⚔ 16:17, 30 March 2025 (UTC)
- Sounds like there are concerns that would need to be dealt with before we could get consensus, but it's something I'd definitely at least want to see a discussion on. Valereee (talk) 19:38, 30 March 2025 (UTC)
- Wikipedia:Article titles#Special characters says "provide redirects from versions of the title that use only standard keyboard characters". RjwilmsiBot made many in 2016. I don't know whether any bot has done it since. PrimeHunter (talk) 13:07, 30 March 2025 (UTC)
- Eubot, which created the Germknodel redirect, stopped editing in 2008. La República (Costa Rica) was created in 2025, so obviously it never touched it. It's botmaster Eugene stopped editing in 2013. The bot had permission to make redirects for scientific names and abbreviated titles. Bots do not run forever. Snævar (talk) 12:52, 30 March 2025 (UTC)
- Again sorry for being dense, just trying to understand things like why Germknodel, which redirects to Germknödel, was created by a bot in 2008. La República (Costa Rica) was only created in February. Is it just that the bot hasn't gotten around to it? Hm...but Magón Prize was created manually in 2008. Maybe the bot ignores redirects? Or deals with an umlaut but not with these accented vowels? And whichever it is, the learning for me is when I end up with a red link that I'm sure should be blue while in article text, check the search box and manually create the redirect? Valereee (talk) 12:23, 30 March 2025 (UTC)
- As above,
- @Izno, but why wouldn't La Republica (Costa Rica) automatically redirect to La República (Costa Rica) without me having to create that redirect? I apologize if I'm being obtuse, not intentional. Valereee (talk) 21:29, 29 March 2025 (UTC)
- If you know you aren't using the correct spelling of the name, you really shouldn't link with the redirect. La Republica is not La República. Gonnym (talk) 18:04, 30 March 2025 (UTC)
- Not sure I understand, Gonnym. La Republica (Costa Rica) seems like it should redirect to La República (Costa Rica)? Valereee (talk) 18:24, 30 March 2025 (UTC)
- I was referring to you saying
what I assumed would be an existing redirect and placed brackets around it
, if you know you are using an incorrect name, there is no reason to use that redirect. I'll also be opposed to any bot mass creating these redirects unless they also convert each usage when they are used in articles. Gonnym (talk) 18:28, 30 March 2025 (UTC)- Well, I mean, to save time when writing would be a reason. You might not think it's a good reason, but I have an extremely short attention span and generally need to write as fast as I can before my brain goes "Squirrel!" Valereee (talk) 19:25, 30 March 2025 (UTC)
- I was referring to you saying
- Not sure I understand, Gonnym. La Republica (Costa Rica) seems like it should redirect to La República (Costa Rica)? Valereee (talk) 18:24, 30 March 2025 (UTC)
- So yes, your case is the second case: article text ("red link") is a check against the database and not the search system. You just found names that didn't have a redirect is all. Izno (talk) 21:22, 29 March 2025 (UTC)
- In this case I typed into the article (in English alphabet, so u instead of ú in La República (Costa Rica) and Magon Prize instead of Magón Prize) what I assumed would be an existing redirect and placed brackets around it, and the link was red. It was very weird. I've done a bit of work in other alphabets because I work a lot on foods that are rendered in several alphabets, and I haven't had this happen before. Always, if there's an existing article, using the English alphabet finds it. But this happened twice in a few minutes. Valereee (talk) 20:14, 29 March 2025 (UTC)
CharInsert missing on Vector Legacy (2010) edit page
[edit]Hi, this seems to be a problem only affecting Firefox as when I tried it on a different computer using Chrome or Microsoft Edge it showed up, but for some reason on my home computer whenever I try editing pages, the CharInsert bar no longer shows up. I looked it up on here but the most recent thing I could find was from 2012 so I'm not sure if that would still apply. Has anyone else using Firefox experienced this problem or is my best option right now while doing edits that need that bar, to use another browser? VampireKilla (talk) 21:53, 29 March 2025 (UTC)
Works for me Firefox 136.0.4 (64-bit). --Redrose64 🌹 (talk) 22:12, 29 March 2025 (UTC)
Residential IPs in San Francisco getting banned for "botting"
[edit]moved from Wikipedia talk:Village pump (technical)
Hi there, it has come to my attention that a block of residential IPs in San Francisco are getting banned for botting when no such thing has happened - it would seem that a bunch of Pokemon Go players wrecked things by spoofing these IPs for years and now the new residents are quite confused. Any assistance would be appreciated. Thanks! Signingup1234 (talk) 02:23, 30 March 2025 (UTC)
- What's the IP range? Remsense ‥ 论 03:01, 30 March 2025 (UTC)
Locked out?
[edit]![]() | Production incident was occurring, see summary (resolved) |
This is weird. I'm logged in here on another browser, but it won't let me edit at all -- "Invalid CSRF token". It also won't let me log out. And it won't let me log in on this browser. Clues, anyone? -- a confused User:Jpgordon. 173.17.120.108 (talk) 03:22, 31 March 2025 (UTC)
- phab:T390512. 2604:3D09:A67B:8D50:79CB:52F6:43ED:B0EA (talk) 03:24, 31 March 2025 (UTC)
- thanks -- hamterous1 24.192.250.185 (talk) 03:28, 31 March 2025 (UTC)
- I am experiencing the same issue :( -- hamterous1 24.192.250.185 (talk) 03:24, 31 March 2025 (UTC)
- I think we have the same issue, User:Miminity via 143.44.132.208 (talk) 03:33, 31 March 2025 (UTC)
- Login appears to be back up and running. Jay8g [V•T•E] 03:38, 31 March 2025 (UTC)
I cannot save my edit and log out
[edit]Hello everyone. I'm User:Miminity and currently using incognito mode to ask for help, I cannot save my edit on my account despite I'm not blocked or anything. When I try to save it it shows Sorry! We could not process your edit due to a loss of session data. Please try saving your changes again. If it still does not work, try logging out and logging back in.
and when I tried to log out it shows Sorry! We could not process your edit due to a loss of session data. Please try saving your changes again. If it still does not work, try logging out and logging back in.
and when I tried to log in, it says There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form. You may receive this message if you are blocking cookies.
, I was trying to log in using another browser. I tried doing the same with my phone and still same result. 143.44.132.208 (talk) 03:31, 31 March 2025 (UTC)
- The developers are investigating. https://www.wikimediastatus.net/incidents/1w3rq4d2zljj -- 70.67.252.144 (talk) 03:32, 31 March 2025 (UTC)
- fixed Justjourney (talk | contribs) 03:38, 31 March 2025 (UTC)
- Thanks Warm Regards, Miminity (Talk?) (me contribs) 03:42, 31 March 2025 (UTC)
- fixed Justjourney (talk | contribs) 03:38, 31 March 2025 (UTC)
Can't log in
[edit]I was editing and had to leave my laptop for a few minutes. When I came back I was logged out. When I tried to log back in I got the following message; "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form. You may receive this message if you are blocking cookies." But I specifically allowed cookies from auth.wikipedia.org. What should I do? 2601:207:701:3E30:F9FC:455F:4CD6:86F5 (talk) 03:46, 31 March 2025 (UTC)
- There was a Wikimedia-wide issue, it appears to be sorted now, see Wikipedia:Administrators'_noticeboard#Various_ongoing_errors_with_my_account. DuncanHill (talk) 03:49, 31 March 2025 (UTC)
Rearranged my home page
[edit]Something strange since the above happened. My home page and talk page seem all rearranged. Affected all browsers - Chrome, Firefox and Microsoft Edge. — Maile (talk) 12:02, 31 March 2025 (UTC)
- Can you be more descriptive about how it is different? Have you changed skins, if using Vector-2022 collapsed elements or toggled the wide-view setting? — xaosflux Talk 13:15, 31 March 2025 (UTC)
- I took care of this. It wasn't skins or anything like that. Just some kind of fluke, so I got everything back as it was. — Maile (talk) 17:23, 31 March 2025 (UTC)
Redlinked dated maintenance category problem of the week
[edit]I've had to edit 2024–25 Olympiacos F.C. season three times this month alone, because a table in it keeps regenerating redlinked "Articles with unsourced statements from DD March 2025" categories that don't and can't exist — the maintenance queue for unsourced statements problems only categorizes articles by month, not by month-and-day, so any category transcluded by the table has to be month only.
The issue is a table in the page that was most recently coded as
{{#invoke:sports rbr table|table|legendpos=b|header=Matchday |label1= Ground | res1=H/A/H/A/H/A |label2= Result | res2=W///// |label3= Position | res3=1/1/1/1// <!-- --> |text_H=Home|text_A=Away |color_W=green2|text_W=Win |color_D=yellow2|text_D=Draw |color_L=red2|text_L=Loss |color_10-=green1|color_20-=red1 |source= |updated= |date=30 March 2025 }}
, where to make the bad category go away I had to take the 30 out of the date; the two prior times it was 2 March and 12 March. And because it's an extremely long page which had four other instances of "30 March 2025" in the text besides the one that was actually causing the problem, it took me an unreasonably extended amount of spelunking time to even figure out which one I had to modify.
Since this appears to be a module I don't know how to edit, could somebody with module editing skills edit this module to ensure that it ignores any DD in the date field and only generates the month-year category from now on? Thanks. Bearcat (talk) 17:49, 31 March 2025 (UTC)
- @Bearcat I added some date formatting code to the sandbox. Give Module:Sports_rbr_table/sandbox a try. If that fixes the issue, I can merge it into the main module. --Ahecht (TALK
PAGE) 19:36, 31 March 2025 (UTC) - Better questions may be "why is that module being used directly instead of via a template?" and "who keeps screwing up the date parameter, and can they be told how to not do that?". Anomie⚔ 22:39, 31 March 2025 (UTC)
- They aren't screwing up, I believe the date is also used for an access date which needs to be a full date and not the partial.
- As for direct module use, WP:TLIMIT on a number of pages which has either spread directly or indirectly without consideration for necessity, if even a template was created as a 'frontend'. Izno (talk) 23:01, 31 March 2025 (UTC)
Tech News: 2025-14
[edit]Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Updates for editors
- The Editing team is working on a new Edit check: Peacock check. This check's goal is to identify non-neutral terms while a user is editing a wikipage, so that they can be informed that their edit should perhaps be changed before they publish it. This project is at the early stages, and the team is looking for communities' input: in this Phabricator task, they are gathering on-wiki policies, templates used to tag non-neutral articles, and the terms (jargon and keywords) used in edit summaries for the languages they are currently researching. You can participate by editing the table on Phabricator, commenting on the task, or directly messaging Trizek (WMF).
- Single User Login has now been updated on all wikis to move login and account creation to a central domain. This makes user login compatible with browser restrictions on cross-domain cookies, which have prevented users of some browsers from staying logged in.
View all 35 community-submitted tasks that were resolved last week.
Updates for technical contributors
- Starting on March 31st, the MediaWiki Interfaces team will begin a limited release of generated OpenAPI specs and a SwaggerUI-based sandbox experience for MediaWiki REST APIs. They invite developers from a limited group of non-English Wikipedia communities (Arabic, German, French, Hebrew, Interlingua, Dutch, Chinese) to review the documentation and experiment with the sandbox in their preferred language. In addition to these specific Wikipedia projects, the sandbox and OpenAPI spec will be available on the on the test wiki REST Sandbox special page for developers with English as their preferred language. During the preview period, the MediaWiki Interfaces Team also invites developers to share feedback about your experience. The preview will last for approximately 2 weeks, after which the sandbox and OpenAPI specs will be made available across all wiki projects.
Detailed code updates later this week: MediaWiki
In depth
- Sometimes a small, one line code change can have great significance: in this case, it means that for the first time in years we're able to run all of the stack serving maps.wikimedia.org - a host dedicated to serving our wikis and their multi-lingual maps needs - from a single core datacenter, something we test every time we perform a datacenter switchover. This is important because it means that in case one of our datacenters is affected by a catastrophe, we'll still be able to serve the site. This change is the result of extensive work by two developers on porting the last component of the maps stack over to kubernetes, where we can allocate resources more efficiently than before, thus we're able to withstand more traffic in a single datacenter. This work involved a lot of complicated steps because this software, and the software libraries it uses, required many long overdue upgrades. This type of work makes the Wikimedia infrastructure more sustainable.
Meetings and events
- MediaWiki Users and Developers Workshop Spring 2025 is happening in Sandusky, USA, and online, from 14–16 May 2025. The workshop will feature discussions around the usage of MediaWiki software by and within companies in different industries and will inspire and onboard new users. Registration and presentation signup is now available at the workshop's website.
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
MediaWiki message delivery 00:02, 1 April 2025 (UTC)
URL status language change request
[edit]![]() | This section contains material that is kept because it is considered humorous. Such material is not meant to be taken seriously. |
I find the use of |url-status=dead
to describe link rot overly morbid. Wikipedia citations depend on countless sadly defunct links, and we owe it to these dearly departed URLs to describe them in a more dignified manner. Personally, if I were an expired website, being called "dead" wouldn't exactly make me eager to come back. Frankly, our current terminology is an insult to the memory of every formerly living thing in history.
So if the parameter language must be changed, that begs the question, to what? |url-status=resting in peace
might not accurately describe links that have met more violent fates, and the phrasing of |url-status=pushing up the daisies
is starting to get a little too flowery. After much thought, I've decided that |url-status=dodoesque
is the way to go.
Of course, this change will involve modifying a few million articles, which can be achieved easily via bot. Some might object that such edits would be cosmetic, to which I'd respond that bestowing dignity on links that have rung down the curtain and joined the choir invisible sometimes requires cosmetic treatment. Also, it presents us with an opportunity to beautify watchlists via visually pleasing edit summaries, such as those containing bird emojis to embody the dodo spirit.
I'm eager to get started, and given the lack of visible change to readers the potential for disruption seems minimal, so I'm contemplating bold implementation. But I figured I'd offer a 24-hour opportunity for you wizened souls to comment, just in case any of you has an idea for even better wording. Sdkb talk 02:17, 1 April 2025 (UTC)[April Fools!]
|url-status=shuffled off its mortal coil
|url-status=pushing up the daisies
|url-status=metabolic processes are now history
- -- GreenC 02:57, 1 April 2025 (UTC)
- Moved from Help talk:Citation Style 1 to avoid any WP:FOOLR #1 issues. Sdkb talk 03:11, 1 April 2025 (UTC)
- I prefer dishonesty to avoid the harsh realities of our collective mortality:
|url-status=chasing sheep on a farm upstate
|url-status=just sleeping
|url-status=at dog college
- Regards, Rjjiii (talk) 03:51, 1 April 2025 (UTC)
- What, no
|url-status=nailed to the perch
??? – Jonesey95 (talk) 05:16, 1 April 2025 (UTC)
- What, no
- I prefer dishonesty to avoid the harsh realities of our collective mortality:
- I'm concerned that
|url-status=dodoesque
would be too likely to be confused with|url-status=dadaesque
. Anomie⚔ 11:48, 1 April 2025 (UTC)
- Can we please not encourage this april fools nonsense? Wikipedia is a serious encyclopedia, and this page is a serious helpdesk, not for frivolity. --Redrose64 🌹 (talk) 07:52, 1 April 2025 (UTC)
- It is well within WP:R4F, and very clearly a joke, should be easy to distinguish from non-joke discussions. —Mint Keyphase (Did I mess up? What have I done?) 08:45, 1 April 2025 (UTC)
Is there a script to move template-defined refs back to the article?
[edit]So that it would be friendly for VE? I refer to "This reference is defined in a template or other generated block, and for now can only be edited in source mode." like what can be seen in Florian Znaniecki. For additional context, I have my students translate content from en wiki to others, and since they are not masochists, they generally prefer VE, which means they struggle with articles that rely on VE-incompatible cites. Znaniecki is an older GA of mine anyway, and I'd be happy to make it VE friendly, but doing so manually for that many footnotes, well, I am also not a masochist :P (These days I just use one ref for a book and then {{rp}}, much less code and hassle). Piotr Konieczny aka Prokonsul Piotrus| reply here 06:26, 1 April 2025 (UTC)
- Piotrus, I checked the list of user scripts and User:DaxServer/BooksToSfn could have helped you if you had all the refs defined in text and used the {{reflist}} template. It uses {{sfn}} not {{rp}}. So I'd advise to check Wikipedia:User_scripts/List#References_2, maybe there could be something useful for you.
- I think {{sfn}} is superior. You have a ton of references to Zygmunt Dulczewski (1984) and to other authors only differing by pages. For these cases, I like using {{sfn}} template; just define the citation the first time, even in-text (but you can leave the citation in the references, it's all right), and then use sfn to create a shortened ref, which will show the full ref once you hover over or (on mobile) click on it. It will show as
Dulczewski 1984, pp. 41-42
This will greatly reduce the wikitext size and it is neater to read in source code, I think even neater than just copy-pasting refs to create<ref name="Dulczewski1984-5253"/>
and then appending {{rp}}. IMHO the ref name is hideous, but that's just me. - So as far as I can see from a rather superficial search, you will have to do this manually. Szmenderowiecki (talk) 11:15, 1 April 2025 (UTC)
- Piotrus, I recall a previous discussion we had in which I wrote a script to do something like this. I can't locate it at the moment but if you can remind me of the discussion I can probably find it and see if it works on your article. Mike Christie (talk - contribs - library) 11:37, 1 April 2025 (UTC)
- @Piotrus It should be enough to change the
{{reflist|refs=…}}
template to use the<references>…</references>
syntax instead. You don't need to move reference definitions into the article text. VE will not add new references in this format, but it can understand it. I edited this article as an example: [4]. Matma Rex talk 13:07, 1 April 2025 (UTC)- This is indeed a workaround. Haven't known about it. Szmenderowiecki (talk) 13:24, 1 April 2025 (UTC)
- In general, you should always use
<references>...</references>
or<references />
, as {{reflist}} is not visual editor friendly and can lead to issues if the page approaches the WP:PEIS limit. --Ahecht (TALK
PAGE) 13:53, 1 April 2025 (UTC)- The PEIS limit issue appears to be only confined to pages in userspace and Wikipedia space Szmenderowiecki (talk) 14:15, 1 April 2025 (UTC)
- In general, you should always use
- This is indeed a workaround. Haven't known about it. Szmenderowiecki (talk) 13:24, 1 April 2025 (UTC)
- Since I am not a masochist I still use the source editor. I am sure that VE will eventually be ready for prime time, but it's not there yet. It's nice for really simple things, but it still has limitations I'm not willing to deal with, although I admit to trying it from time to time.
- I find using {{sfn}} and awkward, since they put location data in the running text instead of the references section. What I really want is subreferencing with appropriate inheritance of the metadata. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 14:36, 1 April 2025 (UTC)