Jump to content

Wikipedia:Village pump (technical)

From Wikipedia, the free encyclopedia
 Policy Technical Proposals Idea lab WMF 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).

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.

question about partial blocking and page creation

[edit]

There's a discussion at ANI right now that is heading in the direction of banning a user from creating new articles, a sub-proposal has emerged to allow them to use WP:AFC instead. My question would be this: if you check the "Creating new pages and uploading new files" is that sitewide or will it only apply to the namespace selected for the partial block? Or would we have to just consider it an traditional topic ban with no technical implementation? Just Step Sideways from this world ..... today 22:22, 10 November 2024 (UTC)[reply]

@Just Step Sideways that is a sitewide control. The 'namespace' blocks are only about editing. — xaosflux Talk 23:39, 10 November 2024 (UTC)[reply]
I kinda figured that was the answer, thanks. Just Step Sideways from this world ..... today 23:40, 10 November 2024 (UTC)[reply]
@Novem Linguae will trout me for suggesting this: Edit Filter to stop that editor from creating new articles in the mainspace. (But no, don't please. If the editor has no self-control after the consensus to topic ban them, they might just earn a ticket to being blocked.) – robertsky (talk) 14:11, 13 November 2024 (UTC)[reply]
Edit filters are expensive in terms of performance when submitting an edit, and of maintaining them, so should not typically be written to stop a single user from doing something. So yes, probably better to have the user just exercise some self-control :) –Novem Linguae (talk) 14:15, 13 November 2024 (UTC)[reply]
+2. abusefilter shouldn't be used to restrict a single named user. — xaosflux Talk 14:32, 13 November 2024 (UTC)[reply]
+3, though I have no idea which user you're referring to (I don't frequent AN/ANI). Presumably the solution to this is just to tell the user to stop creating articles in mainspace, enforced via a block of sitewide page creation if they continue in spite of a ban. A bit more than the ban would be covered, but it would undoubtedly enforce the ban. EggRoll97 (talk) 01:44, 15 November 2024 (UTC)[reply]

Problems with dark mode

[edit]

Class mw-no-invert, used to ensure that colors display correctly in dark mode, does not seem to work on International Fujita scale anywhere except in the side tables titled "Tornado rating classifications". –LaundryPizza03 (d) 20:18, 12 November 2024 (UTC)[reply]

The page looks great to me in dark mode (Brave browser on Mac OS). Can you give a specific example of one part of the article that does not display as expected? What part of the article, what is it doing, and what were you hoping it would do? – Jonesey95 (talk) 20:29, 12 November 2024 (UTC)[reply]
LaundryPizza03, I'm not seeing |class="mw-no-invert" in e.g. the table at International Fujita scale § Three second measurement. The right-floated "Tornado classification" tables at e.g. § 2018 version do include it, and display as presumably intended (differently, at least).
I think the inverted colours look fine— in fact I'd characterise them as "more interesting" than the played-out yellow–red gradient typically employed. This is good since Template:Storm colour has like 5300 transclusions. Folly Mox (talk) 13:57, 14 November 2024 (UTC)[reply]
Actually, it occurred to me earlier (when I was already too late to work to type it out) that since most of these storm insensity colours are realised as bgcolor="#{{storm colour|value}}", someone could modify {{Storm colour}} to output after the hex string retrieved from Module:Storm categories/categories " class="mw-no-invert. Of course, this is bad design, and will probably break (or at least upset the linter about) some subset of transclusions called without enclosing quotes, or which already contain a |class= parameter in the table cell style. Should alter all the articles in one go, though. Folly Mox (talk) 17:16, 14 November 2024 (UTC)[reply]

Way to enforce a ban from article creation using the software?

[edit]

Looking at this ANI case, I wonder if there is a way to enforce a ban from creating pages from the software, as if the user under sanction had lost their autoconfirmation (but without losing the ability to edit semi-protected pages). This could also be extended to other namespaces, such as the Draft: or User: namespace if necessary. FMecha (to talk|to see log) 18:22, 14 November 2024 (UTC)[reply]

It is technically possible to partial block from creating any type of page. It is technically possible to partial block from editing the entire article namespace. Anything else could be done only using an edit filter, which is generally not done in this situation.
Restrictions that are so simple a computer could (even in theory) enforce them are rare - the community tends to rely on topic bans which are inherently subjective in nature, so I don't think it's worth spending time coding up any new MediaWiki features to implement this. * Pppery * it has begun... 18:27, 14 November 2024 (UTC)[reply]

Creating a new set of templates for STV elections

[edit]

Hi folks. I am currently trying to put together a new set of templates for STV elections.

The templates would be primarily intended for use in Northern Ireland elections, where there are three blocs (unionist, nationalist and 'other'), but they could be adapted to other contexts.

By way of illustration, here is the 2022 Assembly election result for the West Tyrone constituency, as it appears on Wikipedia currently.

2022 Assembly election: West Tyrone – 5 seats[1]
Party Candidate FPv% Count
1 2 3 4 5 6
Sinn Féin Nicola Brogan 18.75% 8,626          
SDLP Daniel McCrossan 11.92% 5,483 5,555 5,849 6,330 6,508 8,288
DUP Thomas Buchanan 14.44% 6,640 6,642 6,739 6,751 7,634 7,798
Sinn Féin Maoliosa McHugh 14.48% 6,658 7,047 7,189 7,567 7,571 7,731
Sinn Féin Declan McAleer 13.79% 6,343 6,731 6,888 7,111 7,113 7,592
TUV Trevor Clarke 9.06% 4,166 4,166 4,199 4,207 4,704 4,885
Alliance Stephen Donnelly 6.45% 2,967 3,026 3,327 3,476 3,777  
UUP Ian Marshall 4.08% 1,876 1,877 1,911 1,918    
Independent Paul Gallagher 3.66% 1,682 1,688 1,895      
Aontú James Hope 1.43% 657 661        
People Before Profit Carol Gallagher 0.77% 354 358        
Green (NI) Susan Glass 0.55% 252 255        
Socialist Party Amy Ferguson 0.37% 171 173        
Independent Barry Brown 0.26% 119 125        
Electorate: 69,702   Valid: 45,994 (65.99%)   Spoilt: 635   Quota: 7,666   Turnout: 46,629 (66.90%)  

This is how I'd like the template to look - and also how I'd like all templates to look for all Northern Ireland STV election results.

2022 Assembly election – West Tyrone: 5 seats
Party Candidate FPv% Count
1 2 3 4 5 6
N SF Nicola Brogan 18.75% 8,626          
N SDLP Daniel McCrossan 11.92% 5,483 5,555 5,849 6,330 6,508 8,288
U DUP Thomas Buchanan 14.44% 6,640 6,642 6,739 6,751 7,634 7,798
N SF Maoliosa McHugh 14.48% 6,658 7,047 7,189 7,567 7,571 7,731
N SF Declan McAleer 13.79% 6,343 6,731 6,888 7,111 7,113 7,592
U TUV Trevor Clarke 9.06% 4,166 4,166 4,199 4,207 4,704 4,885
O APNI Stephen Donnelly 6.45% 2,967 3,026 3,327 3,476 3,777  
U UUP Ian Marshall 4.08% 1,876 1,877 1,911 1,918    
N Ind Paul Gallagher 3.66% 1,682 1,688 1,895      
N Aontú James Hope 1.43% 657 661        
O PBP Carol Gallagher 0.77% 354 358        
O Green (NI) Susan Glass 0.55% 252 255        
O SP Amy Ferguson 0.37% 171 173        
O Ind Barry Brown 0.26% 119 125        
Results by party
Party S ± FPv ± % ±%
N SF 3 - 21,627 +306 47.02 -1.08
U DUP 1 - 6,640 -2,424 14.44 -6.01
N SDLP 1 - 5,483 -800 11.92 -2.25
U TUV - - 4,166 +3,315 9.06 +7.14
O AP - - 2,967 +1,715 6.45 +3.63
U UUP - - 1,876 -1,778 4.08 -4.16
N Ind. - - 1,682 +720 3.66 +1.49
N AO - - 657 +657 1.43 +1.43
O PBP - - 354 +354 0.77 +0.77
O GP - - 252 -160 0.55 -0.38
O SP - - 171 +171 0.37 +0.37
O Ind. - - 119 +34 0.26 +0.07
O CISTA - - N/A -373 N/A -0.84
U Ind. - - N/A -41 N/A -0.09
U Con - - N/A -27 N/A -0.06
Party majority 14,987 +2,730 32.58 +4.93
N SF plurality Swing +2.47%
Results by bloc
Bloc S ± FPv ± % ±%
N 4 - 29,449 +883 64.03 -0.41
U 1 - 12,682 -955 27.57 -3.20
O - - 3,863 +1,741 8.40 +3.61
X - - - - - -
Bloc majority 16,767 +1,838 36.45 +2.77
Nat. majority Swing +1.40
No. ± % ±%
Electors 69,702 +5,444 100 +8.47
Turnout 46,629 +1,722 66.90 -2.99
Spoilt 635 +53 0.91 ±0.00
Valid 45,994 +1,669 65.99 -2.99
Seats 5 - 100 -
Quota 7,666 +278 16.67 -
No change in seats between parties / blocs
SF: Brogan replaces McElduff following co-options
SF: McHugh replaces Boyle following co-option

Note that I would also want party colour and bloc colour to display in the 'Results by party', 'Results by bloc', and summary pane at the bottom-right also, and I'd probably prefer that the abbreviations for each party display, rather than each party's short name (I've free-typed the abbreviations in the middle panel, but the actual abbreviations differ).

Note the following additions:

  1. Each candidate and party would have its bloc listed (unionist, nationalist or 'other'). There would also be an 'unclassified' option (denoted by an X), intended for obscure independents whose alignment cannot be determined through any sources.
  2. Total first preference vote count and vote share, and change thereof from the last election, would be shown for each party and each bloc, rather than only explicitly showing vote count/vote share for each individual candidate.
  3. 'Party majority' and 'bloc majority' would show the margin between the largest party/bloc in the constituency.
  4. 'Swing' between the two largest parties, and also between the two largest blocs, is also shown.
  5. The panels note the largest party and largest bloc, and whether they have a plurality or a majority, respectively.
  6. A summary of electors, turnout, valid votes, etc is shown, with full percentage breakdowns and numerical/percentage change between that election and the previous one.
  7. A summary results panel at the bottom right would indicate whether there have been any changes in seats between parties/blocs, and change in the elected MLAs within each party compared to the previous election.

So far, I've made the templates for the leftmost panel, but not for any of the other panels yet.

To be clear, I'd like to be able to put something together using Lua/the templates, which takes the first preference vote counts from the leftmost table, sums these for each party (and also for independents of each bloc - I do not want independents of different blocs summed collectively), and automatically outputs total vote count and vote share for each party, and also for each bloc, on the relevant panels.

It'd also be cool if the candidate first preference votes can be summed to produce the valid vote, and if the numerical input for electors, turnout, spoilt votes, valid votes etc could be automatically displayed as percentages of the electors figure, and if the quota can automatically be calculated based on the number of seats and valid vote.

References

  1. ^ "Statement of Persons Nominated – West Tyrone". Retrieved 8 April 2022.

I'd appreciate any guidance on this, and any constructive feedback on proposed design - I've done the best I can based on what I know but there may be a way to make it look better. Many thanks! PointUnderstander (talk) 18:59, 14 November 2024 (UTC)[reply]

Change the table around the tables "2022 Assembly election – West Tyrone: 5 seats", "Results by party" and "Results by bloc" to use a div. That way, mobile can throw the tables down the page, whereas there is not available width on mobile for all three. Snævar (talk) 23:56, 14 November 2024 (UTC)[reply]
Many of these questions about how it looks, what columns should be kept, if new ones should be added is more of a question for Wikipedia talk:WikiProject Elections and Referendums. This forum is more for how to achive this layout. There is one or more templates that sum up numbers, I am not keeping enough track of them to know which ones. Snævar (talk) 10:49, 16 November 2024 (UTC)[reply]
Snævar, That way, mobile can throw the tables down the page - and desktop. — Qwerfjkltalk 11:11, 16 November 2024 (UTC)[reply]

Republican Party's infobox

[edit]

I can't get any response at the page-in-question, so maybe I can get help here. Over at the Republican Party (United States) page, the infobox is failing to show Senate Minority leader Mitch McConnell. Even though you do see him in the edit-window. GoodDay (talk) 19:52, 14 November 2024 (UTC)[reply]

I don't see McConnell in the edit window in the context of the infobox. Izno (talk) 21:11, 14 November 2024 (UTC)[reply]
@Izno: I re-added him & now the infobox won't show the House Majority leader, Steve Scalise. GoodDay (talk) 23:08, 14 November 2024 (UTC)[reply]
I believe I found the solution. I lowered the leaders' entries from 1-6 to 0-5. GoodDay (talk) 23:14, 14 November 2024 (UTC)[reply]

Hello,

There are some issues with the templates in the header of the page. No clear idea of what the issues could be, but some templates don't seem to exist, or some parameters are wrong.

Thank you 212.195.53.63 (talk) 20:16, 14 November 2024 (UTC)[reply]

I'm going to ping @Trappist the monk here to double check, but I am pretty sure the issue is that the parameter was never supported. I don't really understand how it wasn't caught before today, which is perhaps the more interesting question I would have. Izno (talk) 21:17, 14 November 2024 (UTC)[reply]
|translit-standard= is not a supported parameter; use |translit-std=. Not caught before today because only today did I update Module:Lang to catch these kinds of unknown parameters.
Trappist the monk (talk) 21:44, 14 November 2024 (UTC)[reply]

Search autocomplete selects random results when arrowing down

[edit]

I've recently tried to search a few things, and noticed that if I press arrow down on the autocomplete results, it selects a random result, rather than the expected outcome of it selecting the first in the list (then going down one if pressed again, etcetera). For example, to test this, I typed in "AS" into the search bar, which displayed "AS", "Association football", "Associated Press", "Assassination of John F. Kennedy", among others. I pressed the arrow down, and it highlighted the last result, "ASEAN". I pressed it again, and it highlighted "Asperger syndrome", which is the 6th result in the list, and 4 results up from "ASEAN". This continues for some time, but it generally jumps through the list at random intervals. I checked that I had safemode on before trying this, and I am on the latest version of 64-bit Chrome, version 131.0.6778.70. EggRoll97 (talk) 01:11, 15 November 2024 (UTC)[reply]

Given the day, by the way, it may be WP:THURSDAY, but I'm not necessarily sure if that indeed is the case. EggRoll97 (talk) 01:13, 15 November 2024 (UTC)[reply]
Me too, Windows 10 version 22H2, Firefox 132.0.2 (recent upgrade), all skins except Vector-2022 and Minerva Neue, logged in and logged out. The main symptom seems to be that in the search box, the functions of the up and down arrows are exchanged. Also affects commons:. --Redrose64 🌹 (talk) 01:22, 15 November 2024 (UTC)[reply]
This is probably related to phab:T379983 though of course you can report a separate task. Izno (talk) 01:33, 15 November 2024 (UTC)[reply]
Looks like it, and it appears a change has been merged so this should (hopefully) resolve itself fairly soon. EggRoll97 (talk) 01:38, 15 November 2024 (UTC)[reply]
I'm facing the same issue, on Vivaldi (7.0.3495.11 (64-bit)) on Windows 11 Home 23H2. Are you on Wikipedia's 2010 Vector legacy skin (the old default GUI) by any chance? I have this issue on that skin but not on Wikipedia's new Vector skin. Tube·of·Light 11:21, 15 November 2024 (UTC)[reply]
I'm having the same issue on Firefox 128.4.0 with Vector 2010 on macOS 12.7.6. – dudhhr talkcontribssheher 22:57, 15 November 2024 (UTC)[reply]
I don’t see anyone mentioning it anywhere, but I am also having the same issue on Timeless. win8x (talking | spying) 14:46, 16 November 2024 (UTC)[reply]
@Win8x: As I wrote above, all skins except Vector-2022 and Minerva Neue. --Redrose64 🌹 (talk) 16:52, 16 November 2024 (UTC)[reply]
Oops I didn't properly read. Glad a change has been merged though. win8x (talk) 16:53, 16 November 2024 (UTC)[reply]
Resolved

Now working as expected. --Redrose64 🌹 (talk) 18:05, 20 November 2024 (UTC)[reply]

Lua help needed at Template:Text diff

[edit]

The {{Text diff}} template is causing some Linter misnested tag errors that do not appear to be fixable locally in pages. This is not a new problem, but we have fixed most of the high-priority fixable Linter problems and are trying to clean up the last few stubborn cases. I am looking for people with Lua knowledge to help over at Template talk:Text diff#Lint errors. Any clues will be appreciated. Thanks in advance. – Jonesey95 (talk) 01:57, 15 November 2024 (UTC)[reply]

What causes these "bot_manager" links?

[edit]

What are these links? Something to do with bots? – 2804:F1...F5:391A (::/32) (talk) 17:41, 15 November 2024 (UTC)[reply]

Radware sells anti DDoS software, I would guess that these editors were using an automated tool to fill in citations (i.e. the automatic citation tool in visual editor), which Radware's software detected as bot traffic and blocked. 86.23.109.101 (talk) 17:53, 15 November 2024 (UTC)[reply]
Ah, that does make sense. – 2804:F1...F5:391A (::/32) (talk) 18:05, 15 November 2024 (UTC)[reply]

Pages with reference errors that trigger visual diffs

[edit]

There's a redlinked category, Category:Pages with reference errors that trigger visual diffs, suddenly appearing out of nowhere on over 2,000 pages and growing — I came across it with an unrelated edit to another page which didn't have that on it when I started to edit the page, but suddenly did have that on it as soon as I saved my edit, and attempting to "expand templates" on the page failed to identify where it was coming from.

The last time something like this happened, a couple of weeks ago, it was an utterly unhelpful and unwanted Category:Pages using the JsonConfig extension that got created and then speedy-deleted within days as unhelpful and unwanted.

But, of course, pages can't be left sitting in redlinked categories, so this has to either get created or go away. So could somebody look into this, and either create the category right away if it's actually desired or figure out how to make it go away if it isn't? Thanks. Bearcat (talk) 21:53, 15 November 2024 (UTC)[reply]

It's listed at Special:TrackingCategories so it's added automatically by MediaWiki and doesn't appear in the wikitext. I have created the category page with display of MediaWiki:Cite-tracking-category-cite-diffing-error-desc which is all I know. PrimeHunter (talk) 22:16, 15 November 2024 (UTC)[reply]
Fished out one page, Brisbane Airport, which has a group reference without a reference list. I suspect that will be a majority of the cases. In the current parser, that note appears not to render in any list, instead an error renders at the bottom of the page. In Parsoid, both it and the error render at the bottom. Izno (talk) 22:28, 15 November 2024 (UTC)[reply]
Looks to have been a result of activity in the context of phab:T372709 and/or its child phab:T378386. Probably the old parser needs an update to be outputting the same as Parsoid. Izno (talk) 22:44, 15 November 2024 (UTC)[reply]
And others in article space Special:Search/incategory:"Pages with reference errors that trigger visual diffs". Currently just half of a percent of the category's contents. Izno (talk) 22:31, 15 November 2024 (UTC)[reply]
Yes, this is all that was necessary on one randomly-chosen talk page. --Redrose64 🌹 (talk) 22:32, 15 November 2024 (UTC)[reply]

Does Pending Changes disable edit conflict checking?

[edit]

I haven't found any documentation about this at Wikipedia:Pending Changes, mw:Help:Extension:FlaggedRevs, mw:Extension:FlaggedRevs, or phab:T185664. (I am an idiot though, and frequently miss obvious information.)

But here's what happened (all these diffs are sequentially uninterrupted BTW): while WP:HD was under PC protection (LTA disruption), T=00 I reply to a thread. T+02 minutes, PrimeHunter replies. T+17 minutes, OP replies to my reply, removing PrimeHunter's reply with no edit summary (edit tagged as "2017 wikitext editor"). A bit later, I notice this and enter the source editor within Minerva to restore PrimeHunter's edit without automatically adding my sig. T+44 PrimeHunter restores the edit. T+46 I do too. Despite the edit summary of my immediate self-revert, I was never shown an edit conflict error (these do work in Minerva: I had three recently at heavily trafficked pages, all in ns4).

My interpretation of this sequence is that since FlaggedRevs are "automatically accepted" when the editor permissions allow, checking for edit conflicts is disabled or hampered in some way, at least in some editing interfaces. Can anyone confirm this? Folly Mox (talk) 18:13, 16 November 2024 (UTC)[reply]

Well, PrimeHunter restored text above the 2 lines :I think this was [...] and :: I haven't had this [...], while you restored it below those 2 lines, that's why there was no edit conflict. I actually don't know the exact logic, though something is mentioned at mw:Help:Edit conflict#Preventing edit conflicts - I've always assumed that it's the same logic that governs if you can still undo a revision after new revisions have been made (which from experience is when the diff of that revision would not have revealed lines that changed in later revisions). – 2804:F1...C6:3070 (::/32) (talk) 22:46, 16 November 2024 (UTC)[reply]
For clarity, here is a multi-revision diff of both of your restorations: Special:Diff/1257208774/1257214231. – 2804:F1...C6:3070 (::/32) (talk) 22:56, 16 November 2024 (UTC)[reply]
2804:F14:8085:6D01:BC4B:E524:C2C6:3070, I assume it's paragraph-based like the diffs. — Qwerfjkltalk 18:06, 17 November 2024 (UTC)[reply]

Specify PDF page for thumbnail?

[edit]

I have uploaded File:More Public Parks (booklet).pdf which I want to link into an article. The problem is, the first few pages of the PDF are boilerplate. I want the thumbnail to show page 6 Is that possible? RoySmith (talk) 18:29, 16 November 2024 (UTC)[reply]

@RoySmith: See WP:EIS#Page. --Redrose64 🌹 (talk) 19:29, 16 November 2024 (UTC)[reply]
Interesting. That certainly looks like what I need, but for some reason, this PDF isn't showing up as a thumbnail at all. See my original post in this thread and also Special:Diff/1257813566. In both of those, "File:More Public Parks (booklet).pdf" just gets run in with the text. RoySmith (talk) 19:41, 16 November 2024 (UTC)[reply]
Doing a quick Wikisource version, even if incomplete, sounds like what you want here. Could link directly to the one page / section you want, that way. (Or if you just want the image, then extracting the image to a separate file on Commons, and showing that.) SnowFire (talk) 20:14, 16 November 2024 (UTC)[reply]
For some reason, we're not properly picking it up from Commons. Compare File:More Public Parks (booklet).pdf, which shows a default PDF icon and says "0 × 0 pixels", with c:File:More Public Parks (booklet).pdf, which shows page 1 and says "810 × 1,350 pixels". --Redrose64 🌹 (talk) 20:17, 16 November 2024 (UTC)[reply]
Even more interesting. Is this the kind of thing that might just take a while to percolate through the system? Is it worth a phab ticket? RoySmith (talk) 20:26, 16 November 2024 (UTC)[reply]
Wikisource has the same issue - can't start a transcription there because the "local" version Wikisource sees is empty with 0 pages. Definitely something funky afoot here. SnowFire (talk) 20:46, 16 November 2024 (UTC)[reply]
The thumbnail generating slowly sounds like a thumbor issue to me. At the time of upload pdfs where generating thumbnails in 1.67 seconds. Images do consistently generate faster than pdfs, djvus and tiffs. Some thumbnail sizes are generated immediately, regardless of whether they are in use, 320px is one of those.
Not sure what causes enwiki showing 0pixels and commons showing a thumbnail, but it is definitely not thumbor. Snævar (talk) 00:15, 17 November 2024 (UTC)[reply]
The problem ended up being solved by purging the enwiki File page. And then purging the pages which included that File. RoySmith (talk) 00:29, 17 November 2024 (UTC)[reply]
Hmmm, I managed it alright using
[[File:Lewis Carroll - Alice's Adventures in Wonderland.djvu|page=117|thumb|Some of my friends, yesterday]]
at Wikipedia talk:Manual of Style/Archive 228#Indentation. --Redrose64 🌹 (talk) 20:32, 16 November 2024 (UTC)[reply]

Sortable table: "Short" text for merged cells?

[edit]

This comes up from time to time - with merged cells there is often a huge size difference in the default-sort view (where they are merged) and after sorting (which unmerged all merged cells). This leads to the situation where you have to decide between either putting in a very terse / abbreviated, which avoids the table blowing up in size during sorting, but is less clear to readers and wastes the space you gain from merged cells in the first place; or you use the space provided by a merged cell, but then sorting the table might increase the size a lot.

My current exhibit A for this is this table: Nikon_Z-mount#Z-mount_cameras

In the default sort the "DX (APS-C)" and "FX (full frame)" provides useful information. But if you sort the table, this increases the row height a ton and it would be better to just make it say "DX" or "FX" (for example).

=> Is there a template or a similar solution for this? Phiarc (talk) 16:07, 17 November 2024 (UTC)[reply]

Your issue is caused by using tilted text in the far left column. The only solution is not to do that. Izno (talk) 16:37, 17 November 2024 (UTC)[reply]

Strip marker problem with template

[edit]

It looks like 92 articles (possibly more) with {{election box candidate with party link}} templates are exposing strip markers (?UNIQ...QINU?). It seems like the issue is related to ref tags being used within the template. Example articles include Sussex East (European Parliament constituency), 1970 Florida Attorney General election, and Kocaeli (electoral district). I’m not sure how to resolve this, so I'm posting here. Daniel Quinlan (talk) 23:09, 17 November 2024 (UTC)[reply]

Probably has to do with the string replacement on the |change= parameter. Probably the easiest is to create a |change_note= parameter so it doesn't clash with that. Gonnym (talk) 23:27, 17 November 2024 (UTC)[reply]
{{Election box candidate with party link}} says {{#invoke:String|replace|source={{{change|}}}|-|−}} to change a hyphen to a minus sign in a negative number. If the parameter has a reference then its strip marker code has four hyphens which are also changed and this breaks the code. I suggest {{#invoke:String|replace|source={{{change|}}}|^-|−|plain=false}} to only change a hyphen if it's the first character. Then the articles don't need a new parameter for a note. Before editing a template used in 29,000 pages, does anyone have objections or a better solution? The bad cell in 1970 Florida Attorney General election#Results uses {{Election box winning candidate with party link}} which would need the same fix. PrimeHunter (talk) 00:08, 18 November 2024 (UTC)[reply]
Could it be further restricted to also require the hyphen to be followed by a digit? Daniel Quinlan (talk) 00:29, 18 November 2024 (UTC)[reply]
To elaborate, I was thinking something like {{#invoke:String|replace|source={{{change|}}}|^%s*-(%d)|−%1|plain=false}}. Daniel Quinlan (talk) 02:30, 18 November 2024 (UTC)[reply]
I see you also strip whitespace at the start. It should probably be done by a new template so complicated code doesn't have to be duplicated. This search finds 20 cases just in Category:Election and referendum infobox templates. PrimeHunter (talk) 21:40, 19 November 2024 (UTC)[reply]

Portal:Maldives/Selected articles template loop error

[edit]

At Portal:Maldives/Selected articles the "Selected articles 12" section shows a template loop error. That error isn't shown at Portal:Maldives/Selected articles/12 or the article it transcludes (Ibrahim Nasir). Can't figure out where the error is from. Gonnym (talk) 00:44, 18 November 2024 (UTC)[reply]

Portal:Maldives/Selected articles uses {{For loop}} to run thorugh the 25 selected articles. Portal:Maldives/Selected articles/12 transcludes content from the lead of Ibrahim Nasir which uses {{post-nominals}} which uses {{For loop}}. That's enough to give a template loop error per WP:TEMPLATELOOP. One way to fix it is to replace the for loop in Portal:Maldives/Selected articles with 25 calls:
{{subpage|1|SPAN=true}}
...
{{subpage|25|SPAN=true}}
In particular, {{subpage|12|SPAN=true}} does not give an error. PrimeHunter (talk) 02:00, 18 November 2024 (UTC)[reply]

Technical glitch with the NPP page curation tool?

[edit]

Hello my friends. I am a New Page Patroller and use the excellent page curation tool. Masterhatch kindly alerted me to the fact that, when I add an "uncategorised" or "improve categories" tag, the curation tool automatically adds a space at the top of the article above the SD. I am now having to manually close the space at the top. Is anyone else having this problem? Is there a solution? Apologies if I have brought this to the wrong discussion page. Best regards, BoyTheKingCanDance (talk) 06:16, 18 November 2024 (UTC)[reply]

Identifying duplicate named refs with identical body content

[edit]

The current software does not flag duplicate named refs with identical body content, as this is not considered a significant problem. However:

  • It wastes wikitext space.
  • It adds visual clutter in an edit window.
  • If an editor changes the body content of one of the duplicates in any way, we now have a big red cite error that is visible to readers but may go unnoticed by editors for some time. Few editors have the time to frequently scan the entire References section for such errors.

Looking for a way to identify any such duplicates so they can be eliminated using <ref name="foo" />. ―Mandruss  07:26, 18 November 2024 (UTC)[reply]

Editors who are interested in identifying duplicate reference issues faster, can add the automatic Category:Pages with duplicate reference names to their watchlist. There's also a manual Category:All articles with duplicate citations which is added by template {{Duplicated citations}}. —⁠andrybak (talk) 10:14, 18 November 2024 (UTC)[reply]
Thanks. The first cat is for duplicate refs with different content. That's not what I'm talking about, hence my italics emphasis above. Regardless, no category is going to identify the duplicates. ―Mandruss  18:04, 18 November 2024 (UTC)[reply]
There is also the automatic toollabs:checkwiki/cgi-bin/checkwiki.cgi?project=enwiki&view=only&id=81. The bot tools AWB and WPCleaner can do this task. Snævar (talk) 11:45, 18 November 2024 (UTC)[reply]
I'm not looking for automated fix; I can do that manually and I actually prefer that. I just want to identify what I need to fix manually, within a single specific article—and without a big learning curve. ―Mandruss  18:04, 18 November 2024 (UTC)[reply]
The toollabs checkwiki tool does list what to fix, a code exerpt of the reference that is duplicated. It is just a matter of doing the edit manually and clicking the done link to the entry you fixed. The latter sentance in my first sentance on AWB is not what you are looking for. Snævar (talk) 21:19, 18 November 2024 (UTC)[reply]
@Mandruss: You'll need a script, and examine each article on a case-by-case basis. This is because if a suitable category did exist, it would contain many of these articles - the {{sfn}} template relies on the fact that it is not an error (or even a warning) for two refs to have the same content. --Redrose64 🌹 (talk) 09:05, 19 November 2024 (UTC)[reply]
Thanks.
  • You'll need a script - I assumed as much. I was hoping:
    • Such a script already existed. Or,
    • A script-qualified editor could be persuaded to create such a script with a barnstar and personal satisfaction as their rewards. Obviously the script would then benefit others in the same way, forever. That would be a significant contribution to the project, probably more than spending the same amount of time editing articles. (I'd certainly do it if I were script-qualified.)
  • I'm only interested in one article at this point, so I have no need for categories.
  • I neglected to mention: Said article is nearing its WP:PEIS limit, and the elimination of these duplicates would also help address that. ―Mandruss  12:13, 19 November 2024 (UTC)[reply]
[edit]

Hey people,

Wouldn't it be helpful if the email received when a page on our watchlist is updated, to have a link to the page history as well?

Current it shows the following:

Dear Bunnypranav
The Wikipedia page Wikipedia:Articles for creation/Redirects has been
changed on 18 November 2024 by anonymous user 122.43.189.14, see
<https://wiki.riteme.site/wiki/Wikipedia:Articles_for_creation/Redirects>
for the current revision. 

To view this change, see
https://wiki.riteme.site/w/index.php?title=Wikipedia:Articles_for_creation/Redirects&diff=next&oldid=1258162746

For all changes since your last visit, see 
https://wiki.riteme.site/w/index.php?title=Wikipedia:Articles_for_creation/Redirects&diff=0&oldid=1258162746

~/Bunnypranav:<ping> 13:25, 18 November 2024 (UTC)[reply]

Weird CSS making pages more narrow?

[edit]

Can an interface admin please remove this weird css that seemingly makes my pages narrow (even on old vector)? I want to read in full width instead TheWikipedetalk 19:58, 18 November 2024 (UTC)[reply]

Please see subject RfC. Cinderella157 (talk) 22:21, 18 November 2024 (UTC)[reply]

Tech News: 2024-47

[edit]

MediaWiki message delivery 01:57, 19 November 2024 (UTC)[reply]

Unexpercted change in Diff format

[edit]

As of yesterday, I am seeing an unexpected much more compact format in Diffs that is much more difficult than the traditional one for me to work from. Is there any way to get back to the old format? I am using "Vector legacy (2010)" skin. Wtmitchell (talk) (earlier Boracay Bill) 02:01, 19 November 2024 (UTC)[reply]

If this is what I think it is, there should be a toggle labeled 'inline' that you can switch off. Izno (talk) 02:23, 19 November 2024 (UTC)[reply]
That toggle is on the top right, below the right end of "Browse history interactively". There is also a triangle in the middle of the page (slightly left and above the right-side "Line X" statement) which turns on/off a similar smaller preview. CMD (talk) 03:03, 19 November 2024 (UTC)[reply]
The triangle is a gadget or script that you have installed. It is not a native feature. Izno (talk) 03:10, 19 November 2024 (UTC)[reply]
Thanks, looks like it's the wikEdDiff gadget. (I do find it hard to describe the toggleable gadgets as non-native features though.) CMD (talk) 08:12, 19 November 2024 (UTC)[reply]

Lockout script misbehaving

[edit]

I have a forked version of User:Anomie/lockout.js in my common.js which only blocks editing, not viewing. However, if the edit page is opened by DraftCleaner, the edit page isn't blocked and I can edit as usual, including if other scripts refresh the page. Why does this happen, and is there a way to block the edit page in this case? Suntooooth, it/he (talk/contribs) 03:31, 19 November 2024 (UTC)[reply]

Social media post template

[edit]

There's a discussion over at Template talk:Tweet#Post template about creating a new social media post template, that would look an act the same as the current {{Tweet}} template but extended for other social sites. A result of this was {{SocialMediaPost}}, but this seems like a very manual solution, liable to breaking and inconsistencies. I was wondering if something could be created which could, given a "website" param, automatically select the correct "site logo", "article Link", "reference format" and "prefix", similar to the way {{Political party}}s or {{Infobox legislation}} are done. Or if I'm other thinking it and the manual method is fine. Cakelot1 ☞️ talk 09:50, 19 November 2024 (UTC)[reply]

It is possible, sure. It will require some work. Izno (talk) 17:16, 19 November 2024 (UTC)[reply]
Hi! Sorry for kind of jumping the gun on moving this to the template space. I'm not the best at templates, but I'll definitely take a look at those ones you linked and see if i can do anything to automate the process. It's been a bit since I've actually used Lua, but I'll try. Generating that information off of a 'website' parameter seems doable, and i'll let y'all know if i manage to make progress. Tantomile (talk) 19:41, 19 November 2024 (UTC)[reply]

In-line citation tag

[edit]

Helo! I have spent way too much time trying to find the template which askes for more in-line citations in the sourcing of an article. Wading through page after page hasn't done the trick. Can anyone here please help me find it? SergeWoodzing (talk) 13:09, 19 November 2024 (UTC)[reply]

{{No footnotes}}? DMacks (talk) 13:14, 19 November 2024 (UTC)[reply]
Thank you! --SergeWoodzing (talk) 13:19, 19 November 2024 (UTC)[reply]
If it has some inline cites but could use more there's {{more footnotes needed}}. -- LCU ActivelyDisinterested «@» °∆t° 23:40, 19 November 2024 (UTC)[reply]
I'm not sure if you were already aware of it, but just in case you're not: WP:TC is a very useful list for this sort of thing. Suntooooth, it/he (talk/contribs) 18:23, 19 November 2024 (UTC)[reply]

Lua errors

[edit]

Can someone explain what's wrong here? si:විකිපීඩියා:Templates for discussion VihirLak007hmu!/duh. 15:31, 19 November 2024 (UTC)[reply]

It looks like Lee imported a load of templates and modules from the English wikipedia which are designed to take English language inputs. The "time errors" for example, are because si:Module:YMD to ISO converts English date strings to an ISO formatted date, but you are giving it Sinhala month names (because the output of {{#time: depends upon the language of your wiki). You either need to go through and localise all the templates that were imported, or make new ones for your wiki. 86.23.109.101 (talk) 17:49, 19 November 2024 (UTC)[reply]
Thanks. Sounds like it gonna take a while to solve the issues tho VihirLak007hmu!/duh. 18:37, 19 November 2024 (UTC)[reply]
Any idea how to localize and what templates/modules to localize? VihirLak007hmu!/duh. 19:02, 19 November 2024 (UTC)[reply]
@VihirLak007 It would probably be amount the same amount of work to start from scratch rather than getting that module to work. The module takes input in the form 19 November 2024 or 19 Nov 2024, i.e. two numbers followed by the month name or abbreviation, followed by four numbers. The output of {{#time: on your wiki seems to be 2 Sinhala numerals (I think? I don't speak Sinhala) followed by the month in Sinhala, and the year. At a minimum you would need to translate the month names, add new logic to convert the Sinhala numerals to Arabic numerals, re-write all the input checks to account for the difference in format, possibly remove the logic for the month name abbreviations ... 86.23.109.101 (talk) 19:02, 19 November 2024 (UTC)[reply]
in sinhala, the numerals are same, arabic numerals. i think if i add sinhala month names alongside where it takes english names, it might work? The thing is i've no idea where to edit VihirLak007hmu!/duh. 19:05, 19 November 2024 (UTC)[reply]
@VihirLak007 In that case you would need to add the Sinhala names alongside the English ones, and also change the pattern matching checks at the bottom (the bit that goes arg1:match('^%d%d%d%d %a%a%a%a?%.?%a?%a?%a?%a?%a?%a? *%d%d?$')) to allow the new date formats. 86.23.109.101 (talk) 19:09, 19 November 2024 (UTC)[reply]
Sorry for being lost minded here. Where should i add the sinhala names? i know how to add but not sure where. VihirLak007hmu!/duh. 19:15, 19 November 2024 (UTC)[reply]
The Sinhala names would just replace the English ones in the months_full variable. I'm not sure what you'd need to do to update the pattern matching, sorry. 86.23.109.101 (talk) 19:20, 19 November 2024 (UTC)[reply]
Any idea where to find the place that controls the output of {{#time on Sinhala wiki? VihirLak007hmu!/duh. 20:11, 19 November 2024 (UTC)[reply]
@VihirLak007 See MW:help:parserfunctions##time. 86.23.109.101 (talk) 20:40, 19 November 2024 (UTC)[reply]
{{#time:...|en}} will format the output in English at any wiki. PrimeHunter (talk) 21:26, 19 November 2024 (UTC)[reply]

RFC references in Further Reading

[edit]

@Neko-chan: Recent edits to § Further Reading by Neko-chan have changed some, but not all,RFC references to {{IETF RFC}}. Should this not be consistent?

I was going to suggest ussing {{Ref RFC}}, but it is still a stub, e.g., {{Ref RFC|5321}} produces "[1]". -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 09:41, 20 November 2024 (UTC)[reply]

Thank you for pointing out some things I missed, can you link to exactly which article? That further reading link doesn't go anywhere. ~ฅ(ↀωↀ=)neko-channyan 16:14, 20 November 2024 (UTC)[reply]
Oh, it's still pretty early in my time zone and I misread. Maybe I should get some coffee.
If this is Email_address#Further_reading, then they're not references, they're inline links which is what {{IETF RFC}} is for. It's not inconsistent, they have different purposes. I also didn't swap the {{cite IETF}} citations because {{ref RFC}} doesn't handle section cites properly. ~ฅ(ↀωↀ=)neko-channyan 16:26, 20 November 2024 (UTC)[reply]
Sorry, the template I used, {{alink|Further Reading}}, is only valid in Talk:Email address; I should have used {{slink|Email address|Further Reading}}yielding Email address § Further Reading.
The inconsistency I referred to is the one that you corrected with permalink/1258604111. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 16:49, 20 November 2024 (UTC)[reply]

References

  1. ^ J. Klensin (October 2008). Simple Mail Transfer Protocol. Network Working Group. doi:10.17487/RFC5321. RFC 5321. Draft Standard. Updated by RFC 7504. Obsoletes RFC 2821. Updates RFC 1123.

RfC notice: Log the use of the HistMerge tool at both the merge target and merge source

[edit]

Information icon There is currently a discussion at Wikipedia:Village pump (proposals) regarding the logging functionality of the Special:MergeHistory tool. The thread is RfC: Log the use of the HistMerge tool at both the merge target and merge source. Thank you. — Red-tailed hawk (nest) 16:00, 20 November 2024 (UTC)[reply]