Wikipedia:Village pump (technical)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
 Policy Technical Proposals Idea lab Miscellaneous 
The technical section of the village pump is used to discuss technical issues about Wikipedia. Bug reports and feature requests should be made in Phabricator (see how to report a bug). Bugs with security implications should be reported differently (see how to report security bugs).

Newcomers to the technical village pump are encouraged to read these guidelines prior to posting here. 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.

Frequently asked questions (FAQ) (see also: Wikipedia:FAQ/Technical)
Click "[show]" next to each point to see more details.
If something looks wrong, purge the server's cache, then bypass your browser's cache.
This tends to solve most issues, including improper display of images, user-preferences not loading, and old versions of pages being shown.
No, we will not use JavaScript to set focus on the search box.
This would interfere with usability, accessibility, keyboard navigation and standard forms. See bug 1864. There is an accesskey property on it (default to accesskey="f" in English), and for logged in users there is a gadget available in your preferences.
No, we will not add a spell-checker, or spell-checking bot.
You can use a web browser such as Firefox, which has a spell checker.
If you have problems making your fancy signature work, check Wikipedia:How to fix your signature.
If you changed to another skin and cannot change back, use this link.
Alternatively, you can press Tab until the "Save" button is highlighted, and press Enter. Using Mozilla Firefox also seems to solve the problem.
If an image thumbnail is not showing, try purging its image description page.
If the image is from Wikimedia Commons, you might have to purge there too. If it doesn't work, try again before doing anything else. Some ad blockers, proxies, or firewalls block URLs containing /ad/ or ending in common executable suffixes. This can cause some images or articles to not appear.
For server or network status, please see Wikimedia Metrics.
« Archives, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177


Prosesize as gadget[edit]

Hello, I've rewritten User:Dr pda/prosesize.js to be more modern and maintainable at User:Galobtter/scripts/prosesize.js. Most of the changes are internal, with the main user-facing changes are to remove the arbitrary disabling of the script on certain skins (e.g timeless) when the script works just fine on all desktop skins and a fixing of a bug in the calculation of reference text size. As prosesize is a very widely used user script (>2000 uses [1]), it seems an ideal candidate to become a gadget. If this becomes a gadget, I also propose replacing the content of User:Dr pda/prosesize.js to be mw.loader.load( ['ext.gadget.prosesize'] ), i.e to load the gadget directly so the old code no longer needs to be maintained. Galobtter (pingó mió) 07:31, 14 November 2019 (UTC)

If this becomes a gadget, I'd instead suggest changing User:Dr pda/prosesize.js to: if ( mw.user.options.get('gadget-prosesize') === null ) new mw.Api().saveOption('gadget-prosesize', '1'); instead, so that the gadget gets enabled directly rather than get loaded via the user js page; and Special:GadgetUsage would also show an accurate number of usages. SD0001 (talk) 08:07, 14 November 2019 (UTC)
That seems reasonable. Galobtter (pingó mió) 18:00, 14 November 2019 (UTC)
There is a typo at <small><i>(See <a href="//">here</a> for details.)<i></small>; should be a closing </i> there. Also, color me salty about mw.notify( 'Prosesize does not work with the Visual Editor.' );, but can't do anything about that on my part. --Izno (talk) 23:23, 14 November 2019 (UTC)
Thanks, fixed. Word count should at least be workable with VE (html size cannot be due to the differing html used by VE and the regular editor); it is my intention to get prosesize working with VE eventually but the last time I tried to deal with anything VE it went badly so I'll need to find the time to do it properly. Galobtter (pingó mió) 05:52, 15 November 2019 (UTC)
Izno and Galobtter, there is a page at mw:VisualEditor/Gadgets that allegedly contains some useful information and a couple of worked examples, whenever you feel up to tackling it. Ping me if you get stuck, and I'll see if I can find someone who understands it for you. Whatamidoing (WMF) (talk) 00:19, 26 November 2019 (UTC)
Highlighting in the new script seems busted. Also, there's a (somehow blue) link to Wikipedia:Prosesize, which is obviously wrong/missing something. Headbomb {t · c · p · b} 23:35, 14 November 2019 (UTC)
Headbomb, oops, the code for loading the css was broken. I haven't created the page yet, but Wikipedia:Prosesize would be the page describing the gadget. Galobtter (pingó mió) 05:47, 15 November 2019 (UTC)
@Galobtter: working now, thanks. Headbomb {t · c · p · b} 05:50, 15 November 2019 (UTC)
Quick bump for more comments before this gets archived. Galobtter (pingó mió) 05:22, 19 November 2019 (UTC)
Support gadgetizing (gadgetifying?). User seems relatively inactive and community maintenance would be a good thing for the 2k users. Wug·a·po·des​ 03:41, 22 November 2019 (UTC)
  • Support. Popular userscripts that meet the WP:Gadget criteria are better off as gadgets (including in terms of maintainability and performance) - Evad37 [talk] 10:37, 24 November 2019 (UTC)
  • I was reading Evad's tech report and upon viewing Wikipedia:User scripts/Most imported scripts had the thought that the prose size scripts would make for good gadget candidates. Lo, the next paragraph was a link to this discussion! So, yes, support, but I have a few questions. "File size" is vague—if it's the size of the HTML document, call it "HTML document size" or "total size"? On USS Chesapeake (1799)'s text-only prose size, prosesize.js spits out "24 kB" and User:Shubinator/DYKcheck.js spits out "24986 characters"—should yours round up to 25 kB if it's going to leave off digits? (Would it be worth combining those DYK features into this one? I gave up on prosesize.js because DYKcheck.js was more human-readable: characters instead of kB.) And is there a reason why this function isn't baked into the sidebar's "Page information" link? (not watching, please {{ping}}) czar 01:16, 2 December 2019 (UTC)
    Yeah I have I renamed file size to "HTML document size" and rounded the bytes rather than truncated it - thanks for the suggestions! Galobtter (pingó mió) 06:16, 4 December 2019 (UTC)

Too often I get this "Edit conflict: Talk - Someone else has changed this page since you started editing it, resulting in an edit conflict."[edit]

Whenever I help out editing an article or talk page, I nearly always get this notification "Edit conflict: Talk - Someone else has changed this page since you started editing it, resulting in an edit conflict." I've learned to live with it and work around it:

  1. copy/pasting my text and then hit the blue "Publish changes" button a second time; sometimes it then publishes my text;
  2. if it doesn't, I have my text in the copy/paste memory of my computer and can again paste my text and then hit the blue "Publish changes" button a 3rd time and then mostly my changes are finally in the article or talk page.

Anybody know's what's going on? Is it because I have too many observations and reversed edits by moderators? I really study the reasons in case my additions are not accepted, at times I don't agree and I find the - how are these wikipedians called - I think "arbiters" - extremely blunt - especially when I've put 10 minutes to an hour of editing and documenting an article or clearly stated I wanted to start an article and need to park it somewhere to continue it later because my kids of wife walks in and need my attention. Anyway - thy. --SvenAERTS (talk) 08:27, 14 November 2019 (UTC)

It often happens to me when I've spent time making a single substantial edit while other editors are making many small edits. So, where possible, the solution is to reduce the size of your edits: work by making many small edits rather than a few longer ones, then you're less likely to be interrupted in this way. Where this isn't possible, you just have to get round it as you say you do. Peter coxhead (talk) 10:16, 14 November 2019 (UTC)
What's happening is described at Help:Edit conflict. If you're planning on making a long edit, make a small edit first to add the {{inuse}} tag to the top of the page. Don't forget to remove it afterwards, though. Yunshui  10:30, 14 November 2019 (UTC)
@SvenAERTS: This edit suggests that you clicked Publish changes twice, perhaps inadvertently - I have a mouse that sometimes double-clicks when I intended a single click, because of contact bounce. --Redrose64 🌹 (talk) 21:21, 15 November 2019 (UTC)
@Redrose64: @Peter coxhead: @Yunshui: thx all. By the way, what is the name of the coding language with these double accolades and piping - is that java or php or python? ThySvenAERTS (talk) 09:44, 19 November 2019 (UTC)
Technically it's a markup language rather than a programming/coding language - it's called Wikitext. Yunshui  09:47, 19 November 2019 (UTC)

Constant edit conflicts[edit]

So it seems, every time I make an edit, even if the last edit was months ago, that when I click "Submit", I get the edit conflict screen. I've disabled any of the functions in Beta and Preferences that might have caused it, and I still get it. Anyone know why? And for that matter, it seems the wiki software will immediately revert the edit in my name so I'll in in the history "PrussianOwl +380", and in the next line "PrussianOwl -380". I asked this at the Help Desk and they said to try asking here. Thanks, PrussianOwl (talk) 02:39, 15 November 2019 (UTC)

@SvenAERTS: especially when I've put 10 minutes to an hour of editing and documenting an article or clearly stated I wanted to start an article and need to park it somewhere to continue it later because my kids of wife walks in and need my attention.
In that case you should first flesh out the whole article in a subpage of your user page, either as a draft or in a sandbox, before submitting it for publishing in the main space. Guarapiranga (talk) 11:02, 22 November 2019 (UTC)
PrussianOwl, have you tried editing in mw:safemode? Whatamidoing (WMF) (talk) 00:22, 26 November 2019 (UTC)
Thanks, I'll have to try that! UPDATE: It works! It must be a script I'm using then right? UPDATE 2: So I tried removing all the scripts I installed one by one since I started seeing the problem, and I still saw it. I also made sure to delete my cache between each attempt. I already checked my Beta and preferences and disabled anything involving edit conflicts or saving edits, so I'm out of ideas. Also, if I click away from the edit conflict screen, my edits show up on the page as live. PrussianOwl (talk) 02:28, 26 November 2019 (UTC)
Do you have anything (especially anything that isn't popular) enabled in the gadgets for Special:Preferences? Or global scripts (on Meta) that you might have missed? Whatamidoing (WMF) (talk) 20:19, 27 November 2019 (UTC)
Nothing global, but quite a few gadgets on. Nothing that involves saving or edit conflicts though. PrussianOwl (talk) 03:10, 29 November 2019 (UTC)
@PrussianOwl:. I have seen totally unrelated gadgets break the strangest things. If you haven't solved the problem yet, you might try turning off all the gadgets in a particular section of gadgets and see if that helps. Then if that doesn't work try turning off another section of gadgets. Eventually you will find the section of gadgets where the problem lies. Then turn off the gadgets in that section one by one. Before doing any of this take a screenshot of the whole gadget preferences page. So you can remember how to get back to what you like. Firefox has a built-in screenshot tool that lets you get the whole page including the part of the page not showing on the screen. -- Timeshifter (talk) 23:57, 5 December 2019 (UTC)
@Timeshifter: Good idea, I'll have to try that! PrussianOwl (talk) 01:52, 6 December 2019 (UTC)
@PrussianOwl: Or you could just save the gadget preferences page before you start changing it: Firefox > File menu > save page as > web page, complete. I tried it, and it works fine. Some pages don't save well, or the saved page does not open correctly. -- Timeshifter (talk) 15:00, 6 December 2019 (UTC)

Linking signature timestamps to diffs[edit]

Is there a way (a script perhaps) for linking the signatures timestamps in talk pages to their diff? Guarapiranga (talk) 23:05, 20 November 2019 (UTC)

That would be cool. If there isn't, a starting point for code that could be modified (for someone without familiarity with the API) is User:Anomie/unsignedhelper.js, which finds the edit in which a selected piece of text was added. It might be a performance problem to walk through a whole page to link all the timestamps, so you probably wouldn't want to do it automatically. Best to select the desired sig and then run the tool for that one only, I think. —[AlanM1(talk)]— 23:50, 20 November 2019 (UTC)
I wouldn't recommend walking the whole history like the unsigned script does. Often you can probably find the right revision by looking for the one with the matching timestamp. Occasionally it might be off by a few seconds, or occasionally there might be multiple revisions with the same timestamp. Anomie 12:52, 21 November 2019 (UTC)
Yes, I do that manually (like literally ctrl-C + ctrl-F). As AlanM1 said, it would be cool to see the link already there on the screen (rather than searching through the history). Alternatively, the diff link could be hardcoded to the timestamp by the ~~~~ signature. Guarapiranga (talk) 03:40, 22 November 2019 (UTC)
Can Sinebot do that, slakr? Guarapiranga (talk) 01:45, 23 November 2019 (UTC)
The mw:Editing team is looking at the next step for the mw:Talk pages project. They're talking about making some changes to wikitext (AFAICT, we still type the same four tildes, but it would automagically expand to something a little bit longer to have an official "end" marker to a comment). It's at least possible that their changes could make it a bit easier to do this. User:PPelberg (WMF), what do you think about this idea? It'd be handy to at least me to have the diff right there (good for troubleshooting the visual editor, and convenient for thanking people for their comments). Whatamidoing (WMF) (talk) 01:02, 26 November 2019 (UTC)
The whole tilde signing charade and drama when people forget to sign, and why it's not simply part of the message container like in every other discussion platform is beyond me, Whatamidoing (WMF), but that's another topic. Guarapiranga (talk) 21:51, 26 November 2019 (UTC)
@Guarapiranga:, this is an interesting idea. Are you able to share what triggered this thought? The first use case that comes to my mind: making it easier to cite the specific comment you're responding to. Although, I wonder if there are other workflows you'd find this kind of functionality valuable for? And same questions to you, @AlanM1:...
Now to wikitext and signatures, I'm glad you raised this, @Whatamidoing (WMF):...
To add a bit more context: the mw:Editing team is considering creating a proposal that would involve slightly changing the wikitext generated by signatures.
The purpose for this potential change would be to make signatures on talk page more machine readable (important for functionality like mw:Talk_pages_project/replying to work reliably) and to allow for signatures on old talk pages to be updated automatically.
With the above said, the team has not yet reached a consensus about whether such changes are necessary. If you are curious to learn more about these potential changes or have thoughts to share, visiting this discussion in Phabricator is a great place to do so: T230653. @PPelberg (talk) 17:59, 27 November 2019 (UTC)
Precisely what you did there, PPelberg (WMF), linking my comment's diff. In other discussion platforms, e.g. facebook, to link someone else's comment, one typically right-clicks that comment's date and copies over the url. Can't think of any other use case, as signatures are typically restricted to talk pages, unless you want to broaden the discussion to linking each part of an article to its latest edit and author (much like MS Word's track changes). That would be awesome! Guarapiranga (talk) 23:58, 27 November 2019 (UTC)
Guarapiranga, understood! Thank you for sharing this context. It's encouraging to see you express a need for enhancements intended to make it easier to refer to specific comments within a discussion and by extension, better understand/follow what is being talked about in talk page conversations. [1]
I say this because these are two areas we hope to improve as part of the mw:Talk_pages_project. With this said, "What enhancement(s) might we implement to make it easier to refer to specific comments within a discussion and by extension, better understand what is being talked about in talk page conversations?" is still an open question.
If you'd like to stay up to date on our progress towards answering these, you might follow the mw:Talk_pages_project/Updates page – we use this page to share information that includes what features we are considering working on and when.
1. If I've misinterpreted your intention here, please do tell me.
@PPelberg (talk) 01:46, 3 December 2019 (UTC)

Slowdown on WP[edit]

Hi. Has anyone else noticed a slowdown over the last 12/24hrs on EN WP? Pages seem to take longer to load, sometimes taking a while to access talkpages too. I've also noticed that the tools box on the left-hand side of the page also takes an age to load too. I've disabled some scripts in my custom css/javascript pages, but that doesn't seem to have helped. Using Firefox in the UK if that helps. Thanks! Lugnuts Fire Walk with Me 11:15, 23 November 2019 (UTC)

I've noticed it, too. —[AlanM1(talk)]— 11:25, 23 November 2019 (UTC)
Thanks Alan. Other slowdowns I've noticed - taking ages to save a talkpage, clicking on the "what links here" and trying to view the diffs via the edit history. Please can someone switch something off, and then switch it back on again! Lugnuts Fire Walk with Me 12:17, 23 November 2019 (UTC)
Same here, though does not appear to affect Wikipedia namespace. Keith D (talk) 12:19, 23 November 2019 (UTC)
Well whatever was happening, it seems to be OK now (famous last words...) Lugnuts Fire Walk with Me 15:14, 23 November 2019 (UTC)
Been happening on and off for me, but a little longer than 24h. More like a day and a half, I think. Assumed it was my internet connection being a PITA again, but if others experienced the same, it probably wasn't on my side for once. Agree that it currently seems to be okay, but I thought that at least thrice yesterday as well, so... AddWittyNameHere 15:24, 23 November 2019 (UTC)
It was driving me nuts earlier today. Doug Weller talk 16:03, 23 November 2019 (UTC)
I'm still finding WP sluggish, even right now. It was very slow earlier today, though. --IJBall (contribstalk) 04:26, 25 November 2019 (UTC)
@IJBall: Yeah, been experiencing some slowness on my side today again as well. Always fun when trying to do things that are already mind-numbingly boring repetitive on the best of days... AddWittyNameHere 05:44, 25 November 2019 (UTC)
Perhaps some clues can be found in "I was referred here: Wikimedia Foundation error" (below) Pi314m (talk) 22:09, 1 December 2019 (UTC)
Hmmm, same sort of thing is happening again (18:30 UK time) for about the last hour or so. Lugnuts Fire Walk with Me 18:37, 7 December 2019 (UTC)

Can we get a new list for Wikipedia:Templates with red links?[edit]

As far as I can tell, the current sets of links are from 2011. Can a new and correct set of lists be generated for templates now containing red links? BD2412 T 22:42, 28 November 2019 (UTC)

It looks like EmanWilm might know a bit about this? — xaosflux Talk 00:22, 29 November 2019 (UTC)
It doesn't seem like it should be that hard a task. BD2412 T 23:53, 1 December 2019 (UTC)

See article sizes in difference view.[edit]

A request for article size change to be noted in the diff viewer as it is in the history, see below. Relisted to generate more discussion ~ R.T.G 07:51, 29 November 2019 (UTC)

I suggest that the difference viewer shows both the size changes and absolute sizes before and after the edit for comparison, just like in the version history (list of revisions).

 –– Handroid7  talk 12:24, 17 October 2019 (UTC)OP was a sock please ignore the OP ~ R.T.G 11:48, 29 November 2019 (UTC)

  • I would definitely support this. The more information, the better. bd2412 T 12:36, 17 October 2019 (UTC)
  • Support: Me too. GenQuest "Talk to Me" 12:47, 17 October 2019 (UTC)
  • Support Sounds like a great no-brainer idea. Someone should open a Phab ticket. --Ahecht (TALK
    ) 14:10, 24 October 2019 (UTC)

This was proposed on VP/Proposals. There didn't seem much point to it beyond amusement. I was almost going to support it for that reason myself but it's not really appropriate. Now I have a reason. Some editors like to edit a whole big long article in one edit. I do it sometimes to move the references to the reference area. People do it just to edit anything in the article and what happens is, the formatting breaks for the diff display and you can't easily tell how much info has been added and removed. Indeed, having the change amount showing in the diff, as it is in the history, would improve the ability to gauge how much change a particular edit has made. This was listed at VP/Proposals and practically nobody answered it, but this is a technical request. @Ahecht, GenQuest, Handroid7, and Bd2412: (If someone knows how to format a relisted request like this, please do because I don't...) ~ R.T.G 07:51, 29 November 2019 (UTC)

  • Support ~ R.T.G 07:51, 29 November 2019 (UTC)
  • @RTG:, why have you pasted this here, when it was originally at WP:VPR (from where it was archived more than three weeks ago)? Are you aware that it was originated by a user indef blocked for sockpuppetry? Did you notice that |Wikipedia technical issues and templates is not a valid parameter, so it's put the RfC into Wikipedia:Requests for comment/Unsorted - did you check how it shows there, there isn't even a meaningful statement, contrary to WP:RFCST. --Redrose64 🌹 (talk) 10:27, 29 November 2019 (UTC)
    • Because it is a technical request more suitable to this place than proposals. No, I suspected only good faith. I don't think I've done an RFC before. I went to the template page. It said something like, "put {{ref|''Category''}}. There was an infobox listing RFC categories. I assumed those were the categories from which to choose (this is not an uncommon issue). I've asked quite clearly for help wit this if that's what you're trying to do... I'll go and check the links you gave and format it the best I can from that based on that. bd2412 certainly isnt a sockpuppet. I don't know about the other two. ... So you've already changed the RFC template for me thank you but, this doesn't relate to a single page does it? Is it possible for me to list the same RFC template on Help:Diff as is listed here? Help:Diff is like new editors first help. It's not going to benefit this request very much..? @Redrose64:, I haven't changed anything... am I still breaking stuff? I'm sorry I've seen a hundred relisted discussions and RFCs but I haven't felt the need before... Nobody wrote on it that it was a sock. It sat there for weeks. I assumed good faith, sorry. I'll er, well, Is it still broken or anything I've added a statement? Let's strike the OP. ~ R.T.G 11:48, 29 November 2019 (UTC)
      Proposals for new features don't belong here. It's phab:T172698 from 2017 (only mentions size change and not absolute size). PrimeHunter (talk) 12:13, 29 November 2019 (UTC)
      At WP:RFCST, item 2 explains the markup and provides an example; the table (which is not an infobox) shows that to put something into Wikipedia technical issues and templates, the markup is {{rfc|tech}}. I never claimed that bd2412 was a sockpuppet, I stated it was originated by a user indef blocked for sockpuppetry and the originator is the person who made the post having the earliest timestamp (12:24, 17 October 2019 (UTC)), therefore Handroid7 (talk · contribs). I don't see what Help:Diff has to do with this, it neither gives advice for RfCs nor is it a discussion page. As PrimeHunter notes, this is a phabricator matter. We cannot change the software on this side, even if we have a RfC with hundreds in support and no opposition. --Redrose64 🌹 (talk) 23:32, 29 November 2019 (UTC)
  • Support. I've long found it frustrating that this information is visible in the history list but not in the diffs; many of us page through diffs rather than scrolling up and down in the history list (or after doing so, rather). I'll go comment at the Phab ticket. Not interested in the back and forth above, about RfC documentation.  — SMcCandlish ¢ 😼  07:34, 1 December 2019 (UTC)

Correct way to merge 2 infoboxes without throwing warnings on a biography[edit]

Hi all, I wanted to merge {{Infobox officeholder}} and {{Infobox criminal}} and use together as 1 infobox in a biography article. But it keeps throwing warnings or it comes as a layout error. IS there a way to seamlessly merge and present 2 infoboxes into one. Both these 2 infoboxes are derivatives of {{infobox Person}}--DBigXray 13:16, 29 November 2019 (UTC)

The documentation might help. Look at Martin Rees for an example. – Jonesey95 (talk) 16:19, 29 November 2019 (UTC)
Thanks a lot Jonesey95. It did help. Marking as resolved. --DBigXray 20:20, 29 November 2019 (UTC)

AfD stats down?[edit]

Is AfD stats at tools.wmflabs down? I havent contributed to much other than AfD's recently. So one can easily see AfD votes in my contrib history, but they are not being reflect at wmf tools.usernamekiran(talk) 17:19, 29 November 2019 (UTC)

pinging Enterprisey. —usernamekiran(talk) 17:22, 29 November 2019 (UTC)
its working again. But I think Enterprisey should see this. He seems to be offline since 2 days now. —usernamekiran(talk) 20:55, 30 November 2019 (UTC)
That's interesting - there's nothing in any of the logs from the 29th. usernamekiran, are there any specific contributions that aren't showing up on your stats page at the moment? Enterprisey (talk!) 21:42, 2 December 2019 (UTC)

Getting signed out when moving between projects[edit]

I'm quite certain this has been beaten to death before. But has anyone else been sporadically getting signed out when moving between enwiki and Commons? Frequently when I find self-written vanity articles or drafts that contain Commons images, I'll open the images and cross over to Commons to nominate them for deletion. Suddenly, this is sporadically causing me to be "logged out" when I get to Commons (or enwiki, if I'm moving the other way). If I click "Log in", it seems to "kick" immediately and show that I'm logged in to my account (I don't have to enter a username or password at all, it just goes right away). Last evening, this problem resulted in my IP being accidentally revealed on multiple pages (used a script to nominate an image) and I had to discreetly get ahold of an oversighter on Commons to hide it. I use Windows 10 64-bit with Google Chrome, and haven't noticed any problems up until recently. Anyone know what gives? Home Lander (talk) 17:56, 29 November 2019 (UTC)

  • I have had this happen at least half the time when moving between projects over the past two weeks - probably 5-6 times/day. About half the time, I will get the message saying "refresh, you're logged on centrally", but the other half of the time, I need to actually go through and log in with my password. Windows 10, current Firefox. Risker (talk) 19:44, 29 November 2019 (UTC)
    Risker, I don't recall that I've ever even seen such a message. Usually once I sign into one project, I'm signed into anything I cross over to. Home Lander (talk) 21:09, 29 November 2019 (UTC)
    Usually when this happens, I just have to wait a few seconds for it to fix itself. Occasionally, the not-too-drastic WP:BYPASS is necessary. Tip: set a global user preference that makes it immediately obvious whether you are logged-in or not - I have set MonoBook skin, which means that if I see a page that is displayed in Vector skin, I'm not logged in so know not to make edits. --Redrose64 🌹 (talk) 23:40, 29 November 2019 (UTC)

Articles in watchlist continue to show as unread (bold) even though I've gone thru (visited) the diffs in these articles[edit]

This has probably come up a number of times in the last few months, and I recall seeing this here back in March and April (Wikipedia:Village pump (technical)/Archive 173#watchlist articles not being marked as read after having been seen/visited, Wikipedia:Village pump (technical)/Archive 173#Seen changes not marked as such in the watchlist, Wikipedia:Village pump (technical)/Archive 173#Changes not being marked as read immediately). From time to time, even now, the bug will show up where entries in my watchlist that I have gone thru will continue to show as unread. Actually, only the entries for the article I had just visited will be marked as read, while all the new entries for other articles after refreshing my watchlist, following a notice that changes have occurred to articles in my watchlist, will continue to show in bold (unread). So it will briefly show one article's entries as being read, but after going to another article with changes, the first article's entries will go unread again following a refresh of the list.

As I said, this happens on occasion, not all the time. Sometimes, the watchlist behavior will be normal as expected, where all entries that have been visited/read will stay that way, but other times, this bug, which has apparently been around for months now, will come up. MPFitz1968 (talk) 19:11, 29 November 2019 (UTC)

Can confirm I've been having the same issue today. Ionmars10 (talk) 19:18, 29 November 2019 (UTC)

Wikispecies infobox[edit]

I have been updating the Betta articles. There is quite a bit of information that would be better summarised about the fish in the infobox, however I don't want to take away the Wikispecies infobox as this is more important in my view. How would I extend the infobox? Can I create a new Betta infobox template and incorporate the wikispecies infobox around it, and include new fields? - Chris.sherlock (talk) 04:50, 30 November 2019 (UTC)

Nearly all articles on living species or groups of organisms have a taxobox, which is an infobox primarily summarising taxonomic information, but also including images, range maps and conservation status. The are part of the recommended structure for articles covered by WikiProject_Tree_of_Life. These should not be removed without discussion.
The taxoboxes predate the {{infobox}} so don't use the same structure as most other infoboxes. It would be difficult to combine the two. I should also add that these taxoboxes have nothing to do with Wikispecies, which is another Wikimedia project.
What sort of information were you thinking of including? There might be a case for also including a different type of infobox, although this should probably done with consensus of the relevant project.   Jts1882 | talk  15:30, 30 November 2019 (UTC)
There is some addition information at WikiProject_Aquarium_Fishes.   Jts1882 | talk  15:34, 30 November 2019 (UTC)
I think the info in the wikiproject is very helpful here, I'll use their suggested structure. - Chris.sherlock (talk) 06:45, 2 December 2019 (UTC)

Collapsible content on mobile browsers[edit]

I noticed collapsible templates don't work on mobile browsers (e.g. Vaccination policy). Is that intentional? Guarapiranga (talk) 04:50, 30 November 2019 (UTC)

@Guarapiranga: See Wikipedia:Village pump (technical)/Archive 174#Collapsible blocks in mobile version. Perhaps somebody kind would add a note to Help:Collapsing#Limitations. --Redrose64 🌹 (talk) 12:00, 30 November 2019 (UTC)
Thanks, Redrose64. Done. Guarapiranga (talk) 12:16, 30 November 2019 (UTC)

Unable to view deleted articles[edit]

I am an administrator and sometimes wish to view deleted articles, usually in response to "why was my article deleted?" inquiries at the Teahouse. Recently, I have received error messages like the following:

"Internal error Jump to navigationJump to search [XeLZEApAAEEAADj@w3MAAAEW] 2019-11-30 21:03:12: Fatal exception of type "InvalidArgumentException"

I have used a Google Pixel 2XL smartphone for about 18 months with no similar problems until recent weeks. I use the desktop site on my phone. Can anyone shed some light on this problem? Cullen328 Let's discuss it 21:11, 30 November 2019 (UTC)

Is this only when you try to view a diff? If so, it's a known problem. --Redrose64 🌹 (talk) 21:37, 30 November 2019 (UTC)
(ec) I have not had a problem viewing deleted articles lately, but there is a bug bug in looking at diffs among deleted content (phab:T237709). Could you give us a specific set of actions (for example, a redlink wikipedia link to the article-name that admins would click that would/should give us the deleted history) to demonstrate what problem you see? DMacks (talk) 21:39, 30 November 2019 (UTC)
The most recent example was GO Technologies, which is now being discussed at the Teahouse. Yes, my standard method of viewing deleted articles has always been to look at the most recent diff. Thanks for that link, Redrose64. I now know that I can click on the date/time and accomplish the same thing. Thanks to all for your assistance. I am grateful. Cullen328 Let's discuss it 21:49, 30 November 2019 (UTC)

Bug in source editor - related to line wrapping?[edit]

Hi, I'm just trying to edit some articles, and there appears to be a bug in the source editor that's driving me crazy. The symptom is that the cursor will appear in one place in the text, but when I type or hit the backspace key, characters are actually added or removed at a different place. Here is some example text that causes this bug on my system (Macbook with macOS 10.14.6 and Chrome 78.0.3904.108):

The plant has many traditional medicinal uses. In Madagascar, the crushed plant is used for skin parasites. In Mauritius, the sap of crushed leaves mixed with salt, or a decoction of plant, is used for scabies and other skin problems. In the Seychelles and Reunion, a root infusion or decoction is taken for asthma, and also to clean the liver and kidneys.

When I edit the first or second lines of that, it works correctly, but when I edit the third line, the cursor is way off. I guess it might not reproduce on your system unless your font and browser happen to be the same size... but is anyone else seeing this behavior? —Keenan Pepper 22:56, 30 November 2019 (UTC)

Does it happen if you are logged out? What if you try a different browser? – Jonesey95 (talk) 00:23, 1 December 2019 (UTC)
No, it doesn't happen when I'm logged out - when I'm logged out, for some reason that line wraps differently (the word "root" is on the 3rd line not the 2nd), and everything works correctly. But logging out and back in doesn't fix it - the issue returns when I log back in.
I tried editing some articles in Firefox but I couldn't find any with the problem. The font size is different though, so nothing wraps the same exact way. —Keenan Pepper 21:03, 1 December 2019 (UTC)

I was referred here: Wikimedia Foundation error[edit]

My question is- what can I (or somebody at Wiki) do about the "Wikimedia Foundation error" problem I've been encountering on and off, since late November. Details are at: Wikipedia:Help_desk/Archives/2019_November_24#Wikimedia_Foundation_error,_relatively_recent_possible_parameter_change/adverse_effects Pi314m (talk) 03:18, 1 December 2019 (UTC)

  • update* The most recent attempt/failure as of this moment is:
Wikimedia Foundation Error - Our servers are currently under maintenance or experiencing a technical problem. Please try again in a few minutes. See the error message at the bottom of this page for more information.

If you report this error to the Wikimedia System Administrators, please include the details below.

  • Request from via cp1087 frontend, Varnish XID 612331345
    • Error: 503, Backend fetch failed at Sun, 01 Dec 2019 03:28:11 GMT Pi314m (talk) 03:31, 1 December 2019 (UTC)

THERE may be a related item at Slowdown on WP (start-of-problem time frame seems related) Pi314m (talk) 22:36, 1 December 2019 (UTC)

@Pi314m: Please post a link which names the section, don't use edit links, they will fail when the page is next archived. --Redrose64 🌹 (talk) 23:48, 1 December 2019 (UTC)
done. Thanks. Pi314m (talk) 09:17, 2 December 2019 (UTC)

Show Changes and Old Pages[edit]

How exactly does Show Changes work when editing on old revision of a page? It seems to compare the old revision against the current revision, rather than the previous revision (relative to the old revision). That's rather counterintuitive, isn't it? The tooltip says Show the changes you made to the text, after all. Confused regards, GUYWAN ( t · c ) 14:22, 1 December 2019 (UTC)

It always compares to the current revision. See phab:T37067 and phab:T31674 for old MediaWiki requests, User:Js/ajaxPreview#Extra features for a user script I haven't tried. PrimeHunter (talk) 15:41, 1 December 2019 (UTC)
I see. Thanks for the info, PrimeHunter. GUYWAN ( t · c ) 19:13, 1 December 2019 (UTC)

Admin access via the API?[edit]

I'm writing some code which looks at user editing history, with an eye towards sockpuppet detection. So far, I've been working with publicly available data, but eventually will want to get at things like deleted contributions, and other information only available to admins. How does one get access to that via the API? -- RoySmith (talk) 14:33, 1 December 2019 (UTC)

@RoySmith: That is part of the standard API (c.f. mw:API:Deletedrevisions) (e.g. see here). The access you have to the API depends on your session, and may be filtered if using a grant or botpasswords. — xaosflux Talk 14:40, 1 December 2019 (UTC)
@Xaosflux: deletedrevisions gives you the deleted revisions for a page. I'm looking for the deleted contributions for a user, i.e. what Special:DeletedContributions/RoySmith-testing would give you -- RoySmith (talk) 02:53, 2 December 2019 (UTC)
@RoySmith: Use mw:API:Alldeletedrevisions (e.g. yours (click MakeRequest)). — xaosflux Talk 03:04, 2 December 2019 (UTC)

Ah, so in mwclient-land:

deleted = site.get('query', list='alldeletedrevisions', adruser='RoySmith-testing')

which of course gets me:

mwclient.errors.APIError: ('permissiondenied', "You don't have permission to view deleted comments.", ...

when executed as an anonymous client, which gets me right back to having to set up a bot account and get that account the required permissions. -- RoySmith (talk) 03:33, 2 December 2019 (UTC)

@RoySmith: there is no need for a "bot account" to just make a query - you would have the exact same issue you are having right now - you didn't log in. Just like when using the WEBUI, with the API you have to logon, and get an authentication token for future requests. In the WEBUI this is a cookie and your browser handles it for you, in the API you have to handle it yourself. See mw:API:Login and all of its related topics. — xaosflux Talk 13:17, 2 December 2019 (UTC)
My apologies, I explained that poorly. I'm looking for a way that will work with an automated process that's running in the tools environment, not as part of a session where I'm logged in. — Preceding unsigned comment added by RoySmith-Mobile (talkcontribs) 16:36, 1 December 2019 (UTC)
@RoySmith-Mobile: it is the exact same API as for non-admins, just additional items that will return once you authenticate. Help:Creating a bot may be a good place to start learning. — xaosflux Talk 00:26, 2 December 2019 (UTC)
Ah, OK, this is starting to make sense. Looks like what I'll want to do is create a bot account, and then get that bot admin rights. I'll never be making any edits, so I'm thinking maybe indef block it, as a precaution against accidental edits due to programming errors? I had associated bots with, "things that make edits", in my mind, which led me to think a bot wasn't what I wanted. I've got plenty of work I can do with the anonymous API access I'm using now, but at least now I know where this is heading. Thanks for the help. -- RoySmith (talk) 01:47, 2 December 2019 (UTC)
"BotPasswords" is a somewhat misleading name --- the feature is in no way tied to bot accounts. * Pppery * it has begun... 01:51, 2 December 2019 (UTC)
You don't need a "bot account" to use the api - just that many bots use the API and your question is really seems to be more of a "how do I learn about the API" type then a specific function call issue. — xaosflux Talk 02:05, 2 December 2019 (UTC)

@RoySmith: also take a look at mw:API, WP:EXEMPTBOT and WP:BOTDICT#Bot flag. If your bot doesn't do any edits, and doesn't need access to higher limits (both admin privileges and advanced API options), then you likely you wouldn't even need a bot account. However, if you want the bot to have admin privileges, you'll need to comply with WP:ADMINBOT. Headbomb {t · c · p · b} 02:18, 2 December 2019 (UTC)[edit]

Sorry if this has been raised before, but is actually working at the moment? I can't get or any of the links to work. This is a problem, because I have archived various cites with it.--♦IanMacM♦ (talk to me) 11:11, 2 December 2019 (UTC)

It's working now, but seems to have had quite an extensive outage in the last 24 hours.--♦IanMacM♦ (talk to me) 11:28, 2 December 2019 (UTC)

Cross-post notice: WMF Fundraising on[edit]

See: Wikipedia:Village_pump_(miscellaneous)

Seddon (WMF) (talk) 14:02, 2 December 2019 (UTC)

Tech News: 2019-49[edit]

16:57, 2 December 2019 (UTC)

Weird bytecount in page history[edit]

Please see User:JIP's notes at Wikipedia:Help desk#Weird bytecount in page history - there are two consecutive edits in User talk:PaxEquilibrium, one adding a section on 30 November, the next one adding a reply on 2 December. The first one has apparent size of ZERO bytes (even though it obviously ADDED a section), the other one has size apparently equal the net change made by both edits together.

Anybody able to explain the phenomenon? --CiaPan (talk) 21:37, 2 December 2019 (UTC)

Even weirder, the API says the revisions have the same SHA1, which is impossible. Maybe something went wrong during the rename from Geolodus to Glades12? Suffusion of Yellow (talk) 21:52, 2 December 2019 (UTC)
@Suffusion of Yellow: As you can see in the thread at HelpDesk, the effect was observed before the user's rename. --CiaPan (talk) 21:57, 2 December 2019 (UTC)
Thanks, misread the timestamps. Suffusion of Yellow (talk) 22:00, 2 December 2019 (UTC)
No need to study timestamps, just note that User:JIP uses the old name of the other User when referring at WP:HD to their edit. :) --CiaPan (talk) 22:16, 2 December 2019 (UTC)
@Suffusion of Yellow: Well, it is well possible for two different packets of data to have the same hash value. It's just rare in random data and very hard to achieve intentionally - but not impossible. And if the Wiki software used the hash value as a key for indexing a database, then such two edits would be indistinguishable, and that would could explain why two revisions return the same page length, resulting in a ZERO increment... --CiaPan (talk) 22:12, 2 December 2019 (UTC)
SHA1 is a 160-bit hash, so the probability of that is about 10-48. But, just checking anyway:
$ curl -s '' |sha1sum
d2a13183ec9fd859a8cc10164f4e2fbf58fc2d00  -
$ curl -s '' |sha1sum
a7e7aad391df4fc2132413e730d9007d1927078f  -
$ curl -s '' |sha1sum
30c6157b4f443428196a56bfe1e06876a18a9dd0  -
The other revisions have the correct hash; just not Geolodus/Glades12's. Suffusion of Yellow (talk) 22:36, 2 December 2019 (UTC)
@Suffusion of Yellow: I do not discuss how small or how big the probability of collision is. I just pointed out it is greater than zero, hence the event is possible. --CiaPan (talk) 07:38, 3 December 2019 (UTC)
Infinite monkey theorem discusses how a "possible" event is in fact not going to happen, as Suffusion of Yellow accurately pointed out. Using the ordinary meaning of the word impossible, it is impossible for two different pages at Wikipedia to have the same hash. Johnuniq (talk) 09:47, 3 December 2019 (UTC)
@Johnuniq: Possibly monkey theorem discusses how it is impossible. And Internet demonstrates how it is possible: SHAttered, The Register, ZDNet; more at Google. The ordinary meaning of 'impossible' is not relevant if we talk about guaranteed uniqueness. Anyway, the whole question on im/possibility is not relevant to this discussion — as long as it is not proven the hash was erroneously calculated or erroneously assigned to one of the page revisions, the logs above ARE an example the collision is possible. And monkeys may go type Hamlet. --CiaPan (talk) 10:31, 3 December 2019 (UTC)

I confirmed Suffusion of Yellow's findings by checking that the most recent items in the history at User talk:PaxEquilibrium have the oldid values and sha1 hashes shown. The size of the downloaded file is shown in the following table.

timestamp oldid sha1 bytes
2019-12-02T09:51:18Z 928894386 d2a13183ec9fd859a8cc10164f4e2fbf58fc2d00 185,074
2019-11-30T15:26:46Z 928622565 a7e7aad391df4fc2132413e730d9007d1927078f 184,778
2019-11-28T16:22:52Z 928364063 30c6157b4f443428196a56bfe1e06876a18a9dd0 183,755

The history shows "09:51, 2 December 2019 ... (+1,319)". That byte difference is 185074 − 183755 = 1319.

The history for the above three items shows:

09:51, 2 December 2019 JIP 185,074 bytes (+1,319) Archiving needed: reply to Geolodus
15:26, 30 November 2019 Glades12 183,755 bytes (0) Archiving needed: new section
16:22, 28 November 2019 JIP 183,755 bytes (+8) Thanks: added closing ...

Johnuniq (talk) 03:47, 3 December 2019 (UTC)

Weird number of pages in a category[edit]

Please see User:JIP's notes at Wikipedia:Help desk#Weird bytecount in page history - Category:Online entertainment says its subcategory Category:Entertainment websites‎ contains MINUS SIX pages!

Anybody able to explain....? --CiaPan (talk) 21:43, 2 December 2019 (UTC)

@CiaPan: "pages in a category" is notoriously unreliable (c.f. phab:T18036). — xaosflux Talk 01:10, 3 December 2019 (UTC)
@Xaosflux: I didn't know. Thank you for info. --CiaPan (talk) 07:44, 3 December 2019 (UTC)

Equation \operatorname macros?[edit]

For writing is there a standard way to use \DeclareMathOperator or \newcommand to avoid typing \operatorname{E} all the time? Wqwt (talk) 22:10, 2 December 2019 (UTC)

@Wqwt: Even if you could, it would only be effective within the same <math>...</math> tags. Each block is parsed separately, there's no way for state to be preserved between them. Easiest thing might be to copy it into your local clipboard, so you can "type" it repeatedly with just Ctrl+v. Or you can look into clipboard managers or macro tools for your local browser/OS... -- FeRDNYC (talk) 07:20, 3 December 2019 (UTC)
@FeRDNYC: I see. It seems MathJax on its own (for example used in supports it. Wqwt (talk) 20:01, 3 December 2019 (UTC)
@Wqwt: I secretly wish for some mechanism to add a standard header that gets added to the beginning of any <math>...</math> blocks, possibly separate ones: one global, and then the ability to add per-page ones for unusual things. However, I have no idea how expensive such a feature would be, or even if it would make more sense for anything like this to be stricter and more behind the scenes. –Deacon Vorbis (carbon • videos) 20:31, 3 December 2019 (UTC)
@Deacon Vorbis and Wqwt: As I see it, it's less an issue of computational expense than of other editors' ability to read and edit the formula source. The important difference between a site like [|] and Wikipedia is that the questions and answers at the stack exchange sites are, for the most part, single-editor content. There are some exceptions where posts have been migrated to community-ownership, and of course anyone can suggest edits to any posts there, but generally the post still has a named author who wrote the lion's share of it, and on a source-code level nobody is really required to understand it but that author.
Wikipedia, though, is a different animal entirely, and being a collaboratively-edited resource, features that allow editors to redefine the source language of the shared content would just be making it more difficult for other users to edit that content. Especially since the stackexchange MathJax implementation even allows you to do things like \def\sin{\operatorname{cos}}, and if you do then <math>\sin x</math> absolutely will show up as every time you use it. And even if it's not done maliciously, if I see some <math>...</math> in an article that includes a \gangnam operator because another editor defined it somewhere else on the page, how am I supposed to make sense of that?
It's fine if someone wants to redefine the language for convenience in their personal content, but as a contribution to a shared resource like any Wikipedia article, it misses the mark on the third pillar by a pretty wide margin — enough that you could even make a reasonable argument that it violates the fourth pillar as well.
(Stack Exchange, in fact, have had problems due to the fact that their \newcommand, \def, etc. implementations used to be page-scoped, which allowed posters to cause trouble for other posters either accidentally or maliciously. They've since locked things down so that the commands are scoped to the individual post, which helped reduce the degree to which each user's content could impact everyone else, but that's obviously not an option for Wikipedia articles because the entire page is a single collaborative document.) -- FeRDNYC (talk) 06:25, 7 December 2019 (UTC)

Difficulty connecting[edit]

A reader ticket:2019120210008574 is having difficulty connecting to Wikipedia. The message they received says: "You tried to connect, but the server presented an expired certificate."

Normally, I'd ask them to visit this forum but by definition they cannot. Any thoughts?S Philbrick(Talk) 22:27, 2 December 2019 (UTC)

Sphilbrick, Possible that their computer's date is wrong? The cert expires 11/22/2020. SQLQuery me! 22:34, 2 December 2019 (UTC)
SQL, Interesting possibility; I'll check. S Philbrick(Talk) 00:55, 3 December 2019 (UTC)
Also, ask what their browser and browser version is, see if it is a "modern" browser. — xaosflux Talk 01:05, 3 December 2019 (UTC)

Table display[edit]

I have had problems with the display of a table, and realise that it displays as intended when I'm logged out, but not when I'm logged in. The table is here and the rendering when I'm logged in is at File:Table logged in.jpg and when logged out is at File:Table logged out.jpg. Can anyone please explain what may be wrong with my settings to cause this? --David Biddulph (talk) 08:37, 3 December 2019 (UTC)

I am seeing the same thing as you, logged in and logged out. – Ammarpad (talk) 09:22, 3 December 2019 (UTC)
Looks like a problem with spanning – note how the middle row cells get into the separating space between the 'Host' column and the 'Final' group and between the 'Final' and the 'Third place play-off' group. --CiaPan (talk) 11:34, 3 December 2019 (UTC)
@David Biddulph and Ammarpad: I tested available skins, but that didn't help. However, the problem seems to have something to do with testing gadget options – when I went to preferences/gadgets and unchecked the 'Make sure that headers of tables remain in view as long as the table is in view (requires Firefox v59 or Safari)' in the 'Testing and development' section, the problem disappeared (I'm using Google Chrome at the moment). I suppose this option is not available for logged-off users, hence logged-off can see the table correctly.
Try using a browser compatible with the option or try switching the option off. --CiaPan (talk) 11:50, 3 December 2019 (UTC)
I can confirm it's that option. If I turn it on, I see the malformed table (both on Chrome 78 and Firefox 70). The problem is that with the StickyTableHeaders gadget turned on, the table is split into a <thead> and <tbody> element, which apparently causes the rowspan to break. I don't know if that's a bug in the rendering engine, or in the MediaWiki parser, or somewhere else, but it's certainly a bug. rchard2scout (talk) 12:02, 3 December 2019 (UTC)
@Rchard2scout: So we can get rid of the problem by removing rowspan=4, or at least reducing it to rowspan=2, and filling rows 3. and 4. with empty cells (at the cost of displaying unnecessary cells' borders). --CiaPan (talk) 12:15, 3 December 2019 (UTC)
@David Biddulph, Ammarpad, and Rchard2scout: I implemented a fix described above, by truncating the gap fillers in the header area from 4 to 2 rows and adding 2-rows-high gap fillers in the data area: Special:Diff/929064299.
Please verify how it works in your browsers: Special:Permalink/929064299#Results of Nations League Finals. --CiaPan (talk) 12:36, 3 December 2019 (UTC)
I am using Chrome. Yeah, it's fixed. But I think the one by Jts1882 below is even better. I notice it eliminated the superfluous incomplete shading of the two empty demarcation columns. – Ammarpad (talk) 21:50, 3 December 2019 (UTC)
It's a known limitation in the gadget when there are header cells with rowspan. See MediaWiki talk:Gadget-StickyTableHeaders.css#Bug: rowspan in headers does not propagate into table. PrimeHunter (talk) 12:42, 3 December 2019 (UTC)
Besides the above, I've tweaked the table to make it a better simple data table. It's generally more interoperable and better represents what you are trying to display. --Izno (talk) 14:02, 3 December 2019 (UTC)
Following the suggestion in the bug report, just changing the rowspan header cell to a regular td cell gives the following:
Season Host Final Third place play-off
Winner Score Runner-up Third place Score Fourth place

0–0 (a.e.t.)
(6–5 p)

This seems to work with the gadget.   Jts1882 | talk  14:11, 3 December 2019 (UTC)

Consecutive edits merged by editor on history page[edit]

Is there a script (or option) to see consecutive edits by the same editor merged into a single entry in articles' history page? — Preceding unsigned comment added by Guarapiranga (talkcontribs) 22:46, 3 December 2019 (UTC)

Check out User:Alex Smotrov/histcomb. User has long since stopped editing, but it should be working. ~ Amory (utc) 02:17, 4 December 2019 (UTC)
Fantastic! Precisely what I wanted, Amorymeltzer. Here's my vote to make it a standard feature/gadget on preferences. Guarapiranga (talk) 04:15, 4 December 2019 (UTC)
No wonder I didn't know about it; it wasn't on WP:USL. Now it is. Guarapiranga (talk) 04:42, 4 December 2019 (UTC)

'Redirects from' template?[edit]

Is there a template (or magic word) that will return the name of the template a given template name redirects to? (e.g. {{redirects from|Brazil}} → BRA). Guarapiranga (talk) 05:23, 4 December 2019 (UTC)

@Guarapiranga: Module:Redirect can do part of this, but I haven't found a template that does exactly what you need. {{#invoke:redirect|main|Template:Brazil}} → Template:BRA -- John of Reading (talk) 12:57, 4 December 2019 (UTC)
The problem here is that any given page can have more than one redirect - it's a many-to-one relationship, consider this list. Incidentally, BRA is not there because it is not a redirect but a dab page. --Redrose64 🌹 (talk) 18:08, 4 December 2019 (UTC)
Redrose64, what I'm looking for is the mapping in the opposite direction: what does a redirect page redirect to? From that list, it would, for instance, return Brazil when called over Republic of Brazil: {{redirects from|Republic of Brazil}} → Brazil. Guarapiranga (talk) 20:39, 4 December 2019 (UTC)
Thanks, John of Reading! Just created {{redirects from}} as a wrapper over it, to be used as an alias. I'm not sure it'll work for what I wanted—subst'ing country names with their ISO codes, without invoking Lua (which requires 2 subst's and always times out on long lists of countries)—but I'll try. Cheers. Guarapiranga (talk) 20:51, 4 December 2019 (UTC)

Ill-formatted maintenance category[edit]

I discovered that Leeds is currently placed in the non-existent (and non-hidden) category Category:Articles with disputed statements from November 2,019. It seems like it came about from {{doubtful|date=November 2019}} (that is, I can remove the category by removing the templates), but I can't figure out why the output is formatted incorrectly. kennethaw88talk 08:52, 4 December 2019 (UTC)

Something in {{Infobox settlement}} is cleverly formatting numbers for the population_metro parameter (and some others). For example, if you edit the line to read |population_metro=2638127 and preview it, you will see the population shown as 2,638,127. That is, something inserts the commas. The category includes 2019 and the clever code is inserting commas in that as well. A quick looks suggests it is {{formatnum:{{{population_metro}}}}}. The doubtful tag probably should be in the population_metro_footnotes parameter. Johnuniq (talk) 09:22, 4 December 2019 (UTC)
Yes, use |population_metro_footnotes=. This matter is covered by the first bullet of Template:Infobox settlement#Usage, although not obviously so. --Redrose64 🌹 (talk) 18:05, 4 December 2019 (UTC)
Fixed it. I didn't really pay enough attention to where in the text the tag was being used, although I wouldn't have been able to figure out the formatnum code, anyway. Thanks. kennethaw88talk 20:36, 4 December 2019 (UTC)

Diagnosing bad preview image on Page Preview card[edit]

When I hover on the link Statue of Liberty the preview image is File:USA New York City location map.svg, a generic map of New York City (which doesn't even have the location of the statue marked! The pin is overlaid in the infobox using some template magic). I think it would be much more appropriate to show an image of the statue itself. mw:Page Previews/Functionality#Article image: suggests that the "first image that appears in [the] infobox" should be chosen. However, in this case, the first image in the infobox is File:Lady Liberty under a blue sky (cropped).jpg. Is there some undocumented rule that images with very tall aspect ratios are ignored? Is this just a bug? Colin M (talk) 16:18, 4 December 2019 (UTC)

Is there some undocumented rule that images with very tall aspect ratios are ignored? Yes, actually, certain aspect ratios are ignored. You might try searching the archives to see what those are. --Izno (talk) 16:48, 4 December 2019 (UTC)
Oof, looks like it's actually worse than that. Candidate images are scored by some (fairly opaque, presumably subject-to-change-at-any-time) algorithm, and the highest-scoring image is used. The main infobox image on that page isn't so skinny that it's completely ruled out as a preview image, but its point boost for being the first image is less than the bonus the map gets for having a squarish aspect ratio. I've corrected the docs at mw:Page Previews/Functionality#Article image: for now. It would be nice if there were a way to give the algorithm a hint without changing the appearance of the article (short of globally blacklisting the unwanted image from previews), but I'm not holding my breath. Colin M (talk) 17:49, 4 December 2019 (UTC)
I am fairly certain there was a task in Phabricator to add a "hey, don't use that one" but a brief search yields little. --Izno (talk) 22:32, 4 December 2019 (UTC)
See also mw:Extension:PageImages#Image choice. PrimeHunter (talk) 02:05, 5 December 2019 (UTC)

Can this happen automatically or only manually?[edit]

At the top of this talk page edit, the revision time shows as "Revision as of 00:54, 31 October 2019”. But the time stamp in each edit segment of that edit shows as "00:30, 31 October 2019 (UTC)”. It looks like it was done manually by copying the preview of a draft done at 00:30 and pasting into an edit published at 00:54. I'm considering correcting the 00:30 time stamps to avoid confusion, but want to make sure there was no way this could have arisen automatically. Thoughts? Humanengr (talk) 18:26, 4 December 2019 (UTC)

@Humanengr: none that I'm aware of, but I don't think you should change anyone else's text timestamps. The "actual" timestamp for anything we would care about is what is in the revision timestamp. This possibly came from an edit conflict, going back, copy-pasting like you suggested, etc. — xaosflux Talk 18:29, 4 December 2019 (UTC)
It looks like they just didn't know how to sign so they manually mimicked signatures. User talk:Samp4ngeles#Signing comments supports this. Just ignore it. PrimeHunter (talk) 21:56, 4 December 2019 (UTC)

BLP noticeboard not search engine indexed, but many archives are[edit]

I noticed that, while WP:BLPN is not indexed on search engines (and to my mind, certainly shouldn't be), many of its archives are: [4]. Those often include discussion of potentially sensitive BLP matters. After a discussion with Xaosflux, it seems that, while the robots.txt exclusion file is set up properly, being transcluded or linked elsewhere still might lead search engines to crawl these, even when they're intended not to be. On Xaosflux' advice, I'd like to get a few opinions about the best way to handle this so that these will be reliably excluded from search engines, and I'm not fully conversant with exactly how Mediawiki handles that. Any expertise in that would be much appreciated. If there is a solution to ensure newly created archives are also not indexed, that would be even better. Seraphimblade Talk to me 19:14, 4 December 2019 (UTC)

  • One difference is that for the archives our only directive not in use is in robots.txt, on the main page we are asserting a noindex on the page itself. — xaosflux Talk 19:24, 4 December 2019 (UTC)
    The <meta name="robots" content="noindex,follow"/> directive is in the page source, due to the NOINDEX magic word in Wikipedia:Biographies of living persons/Noticeboard/Header. — xaosflux Talk 19:28, 4 December 2019 (UTC)
    On archive pages of other boards such as WP:ANI the NOINDEX is in an archive box that is also present on the archive pages - so that is one way to do it. — xaosflux Talk 19:31, 4 December 2019 (UTC)
The archives currently don't have NOINDEX - no Category:Noindexed pages - and the entry on robots.txt is formatted in such a way that it won't cover subpages if my understanding of the syntax is correct. I dunno if the correct solution would be to edit MediaWiki:Robots.txt or a Phab level solution is needed (or a bot directed addition of NOINDEX to each archive). Jo-Jo Eumerus (talk) 19:30, 4 December 2019 (UTC)
We could easily have a bot add something to those pages for now, but getting the future archives to auto-have it like how ANI's do may be better. — xaosflux Talk 19:32, 4 December 2019 (UTC)
For what it's worth, ANI archives are NOINDEXed through Template:Administrators' noticeboard navbox all, which the archive bots add to each archive as they are directed by the {{{archiveheader}}} parameter in {{User:MiszaBot/config}}. So one way to do NOINDEX for all BLPN archives created in the future would be to append {{NOINDEX}} to the same parameter at WP:BLPN. Of course, one would have to update all the past archives as well. Jo-Jo Eumerus (talk) 19:53, 4 December 2019 (UTC)
That's an easy enough bot run if this will be the "fix". — xaosflux Talk 20:19, 4 December 2019 (UTC)
@Jo-Jo Eumerus: (also see note above) - robots.txt matching should be midstring greedy and match those pages - but if you see a specific syntax error with it please let me know! — xaosflux Talk 19:31, 4 December 2019 (UTC)
Many of the archives are indexed because of url variations with percent-encoding. For example, is indexed by Google while the canonical url is blocked by %3A instead of colon is covered by an extra entry in robots.txt but %2F instead of slash is not. I see five potential ways to fix or reduce such problems:
  1. Add __NOINDEX__ to the wikitext, typically via a template adding {{NOINDEX}}. This will place noindex in the html of any url variation (except some external mirrors).
  2. Add more url variations to robots.txt (or cut url's off before characters with url variations).
  3. Find out where search engines see the url variations. If the origin is under our control then replace them with the canonical url's.
  4. Get MediaWiki to automatically noindex non-canonical url's.
  5. Get MediaWiki to automatically redirect non-canonical url's to the canonical url which is covered by robots.txt.
Option 4 and 5 would be Phabricator requests and cannot be done locally. PrimeHunter (talk) 01:04, 5 December 2019 (UTC)
@PrimeHunter: are you confident about the %2F problem - it is hard to think it has never come up before? — xaosflux Talk 01:22, 5 December 2019 (UTC)
It came up at MediaWiki talk:Robots.txt#Google thinks it's cute, we need to blacklist Wikipedia%3AArticles_for_deletion%2F. I don't see another explanation. Consider Archive165 If I click the little green triangle and then "Cached" at the entry for "Wikipedia:Biographies of living persons/Noticeboard/Archive165" then I get "This is Google's cache of". If I do the same for "Wikipedia:Teahouse/Questions/Archive 164" (which is allowed by robots.txt) then I get "This is Google's cache of". has some entries from de:MediaWiki:Robots.txt with all four combinations of %3A versus colon and %2F versus slash. PrimeHunter (talk) 02:00, 5 December 2019 (UTC)
@PrimeHunter: thanks for the update.
  • I've added the %2F version to the robots file, this will take a bit to propagate. I think the NOINDEX options are better for this use case though, if someone wants to get it fixed for future archives we can run a bot after the old ones very easily. — xaosflux Talk 03:35, 5 December 2019 (UTC)
    If a bot's going to do that, then maybe it should NOINDEX all the Talk: archives of BLPs as well. There are probably tens of thousands of BLP talk pages with archives, and most are more poorly watched than BLP/N. Suffusion of Yellow (talk) 03:49, 5 December 2019 (UTC)
    @Suffusion of Yellow: a bot run to put a future-standard template on ~200 pages is one thing, dealing with a huge number of talk pages is another - I'd be more supportive of a phab change to make "Talk namespace subpages" be NOINDEX by default. — xaosflux Talk 04:00, 5 December 2019 (UTC)
  • I think this should fix it so far as future pages [5], though please check to make sure I didn't do anything dumb. If we can do the old pages by bot, hopefully that should take care of it? Seraphimblade Talk to me 05:04, 5 December 2019 (UTC)

Whitelines before and after template[edit]

Why are there whitelines before and after the {{Schneersohn family tree}} template, see e.g. Schneersohn. Debresser (talk) 23:48, 4 December 2019 (UTC)

@Debresser: Well, it's happening because when there is no |align= specified, the template sets a style of margin: 1em auto;. Why, I do not yet know, but I'll look further at the history. —[AlanM1(talk)]— 00:20, 5 December 2019 (UTC)
@Debresser: At this edit, the behavior was changed so that, if |align= is not specified, the style margin: 1em auto; is set. Previously, it looks like the style was a margin of 0, which is typical for a navbox. The current version produces a 1em empty space above and below. I'll also note that it has a white background by default, instead of the usual purple-ish used for navboxes. I'm inclined to remove the margin style or put it back to being an unconditional 0, as it was before the edit. Also, I think the background color should default to that of other navboxes, as it's kind of ugly when the margin is removed IMO. I'm concerned that I don't have the time at the moment to research how it's used everywhere. Would someone more familiar with navboxes handle this and/or comment? —[AlanM1(talk)]— 00:45, 5 December 2019 (UTC)
Thank you for your comments. I removed the culprit.[6] Can somebody please make the edit to add the blue color, in line with other navboxes? Debresser (talk) 19:21, 5 December 2019 (UTC)

Table totals and total percentages[edit]

Is there a way of making 2-step calculations in tables without running into node-count errors?

I've for instance fully automated this article, converting what previously were pasted numbers into the formulas that calculate them and pulling the input info from a single main source, but, for the life of me, can't figure out how to calculate percentages from totals without running into node-count errors. Best I could do was use a pasted running total onto the page and hide it in a span tag. I looked into doing that with subst, but couldn't figure out how. I stared at this code for half an hour, and couldn't see how it could help either. Guarapiranga (talk) 20:18, 5 December 2019 (UTC) This may be unrelated to the 2-step calc, though, as the same page for North America blows over the preprocessor node count limit even without attempting to do the 2-step calc. The culprit is obviously {{country population}} (mea culpa), which transcludes numbers from List of countries by population (United Nations). I realise each transclusion in the template adds to the load, even if it's unused in the output, and {{country population}} makes 8 of them, but I don't see how else to do it (and how that this on a list of ~200 countries adds up to +1M preprocessor nodes. Guarapiranga (talk) 01:12, 6 December 2019 (UTC)

Put the data into a module and use another module to do the calculations? Seems a better way to me since all data and the calculations that depend on the data are in just two modules. Another module can be written that would take the raw data from wherever it comes from and properly format it for your application. I did something similar for the {{lang}} and {{lang-??}} templates and the modules that support them. See Module:Lang.
Trappist the monk (talk) 01:29, 6 December 2019 (UTC)
Thanks, Trappist the monk. Had a look at Module:Lang. I see how it works, but can't see how to make it work for data that is not static like language codes. Those population numbers don't change all that often—once a year, if they don't need corrections—with the daily update being done via exponential interpolation, but if they're in a list article they can be updated and corrected by common editors, with no need of delving into Lua code. Also, not sure if this is related, but I have a heap of trouble when I try to subst Module:ISO 3166 so I can get ISO codes for labelling sections (I have to subst twice, and the page rendering times out a couple of times on a full list of countries). Guarapiranga (talk) 01:48, 6 December 2019 (UTC)
You can use the list article data from a Lua module. Load the content of the page with the title object and then just use gsub to grab the sections for the required contries. This method just loads the list article contents once and keeps the transclusion size and depth numbers down.   Jts1882 | talk  10:04, 6 December 2019 (UTC)
@Guarapiranga: I should have added that I have a rudimentary lua function that retrieves labeled sections (see function p.section() at Module:Sandbox/Jts1882/Test). Invoking it via {{section/sandbox}} can retrieve the population figures from List of countries by population (United Nations), e.g. {{section/sandbox|List of countries by population (United Nations)|BRA_0}} --> 209,469,323.   Jts1882 | talk  13:20, 7 December 2019 (UTC)
The language data aren't all that static. Since November 2017, Module:Language/data/iana languages has been updated from the IANA language-subtag-registry file eleven times. That particular module is 7900+ lines so updating it manually would be a headache. So I wrote a tool, Module:Language/data/iana/make that reads the subtag-registry file and makes the ~Language/data/iana languages and the other registry-derived modules so that no one has to manually update them.
For your South American population example, the data are purportedly taken from a United Nations document – so says the citation. If the data are in a list article they can be updated and corrected by common editors then some sort of provision must be made to source those changes. It seems to me better to use the data from the 'official' source in your table. If there are other sources that disagree with the 'official' source, that should be noted and cited in the article text. Further, editors do, quite often, break wikitables so whatever it is that reads the wikitable must be very robust because a simple omission of a single pipe in a wikitable could potentially break multiple articles dependent on that wikitable. Of course the wikitable could be a protected template but that would preclude correction by common editors. What a muddle.
I cannot speak to your troubles with Module:ISO 3166 except to say that a module solution could mw.loadData ('Module:ISO 3166/data/National') and use that directly – no substing required.
Trappist the monk (talk) 12:54, 6 December 2019 (UTC)

Significantly slow page opening when using FireFox and being logged in and the global language is set to British English[edit]

I asked about this at the Help Desk, but someone told me to ask here instead. It does not seem to happen on Chrome, but on FireFox. I have tried disabling all extensions, and that did not solve it. Page opening delay (at the "Waiting" stage) varies, but mostly about 3~6 seconds, sometimes reaches 10 seconds. — Preceding unsigned comment added by Sin Jeong-hun (talkcontribs) 00:17, 6 December 2019 (UTC)

@Sin Jeong-hun: if you change your language to "English" is it better? — xaosflux Talk 13:13, 6 December 2019 (UTC)
@Sin Jeong-hun: Can you give a link to a page where this happens? I tried it with English Baccalaureate and see no significant difference in performance between en and en-gb. I do show 3 extra requests, but those are related to gadgets that I have enabled (MoreMenu, Cat-a-lot, and HotCat apparently have to load localized messages for other than lang=en), and they are only a few tens of ms out of an average of about 2000 ms total. —[AlanM1(talk)]— 09:57, 7 December 2019 (UTC)
Use the Performance tab in the Developer Console and you will get a breakdown of what is taking what time. --qedk (t c) 10:17, 7 December 2019 (UTC)

Script for grouping contributions by page[edit]

Does anyone have a script to group Special:contributions by page? Guarapiranga (talk) 21:04, 6 December 2019 (UTC)

Found User:PerfektesChaos/js/listPageOptions but it didn't work for the Special:Contributions page (as the 'advanced options' in Special:Preferences#mw-prefsection-rc don't either). Guarapiranga (talk) 20:29, 7 December 2019 (UTC)

Characters not displaying[edit]

Hi, the superscript characters in {{Surviving ocean going ships}} aren't displaying for me. What might the reason be? Don't get too excited, I'm running Firefox 47.0.1 on XP SP3 and it may well be just too old to cope It's not really not important, just technical curiosity. Cheers, MinorProphet (talk) 19:39, 7 December 2019 (UTC)

Between the OS and browser, I'd say it's the age of your system. --Izno (talk) 20:36, 7 December 2019 (UTC)
Can you see them here?
xaosflux Talk 20:38, 7 December 2019 (UTC)

Book Creation Tool Not Allowing Creation of PDFs[edit]

I am currently trying to create a book with a variety of articles. When I go to the "Manage Your Book" page, the option to "Download" is greyed out.

Upon clicking the "Learn More" link, I noticed that discussion on the tool had largely concluded (since there has been no update since July of this year) and a new version of the PDF renderer has been launched. Is there a reason for the lack of an e-book downloading functionality? Or has the tool simply not been re-instated. — Preceding unsigned comment added by (talk) 20:22, 7 December 2019 (UTC)

Working for me, example - can you be more specific, exactly what page are you on, what are you clicking, what is happening? — xaosflux Talk 20:40, 7 December 2019 (UTC)