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.

I'm trying to use {{Album chart}} at Draft:So Medieval. The album charted on the UK Official Record Store Chart (link to the specific week), but I can't see that in the documentation anywhere, and the docs don't say how to specify a custom chart in manual mode. Using "UK" as the identifier in automatic mode instead links to ...artist/_/Blue Bendy instead of the actual page for the artist, ...artist/blue-bendy. I'd just do the table manually, but I honestly don't know how tables work in wikitext, and I don't feel like learning unless I have to. Could I get some help formatting the template to get this to work? Suntooooth, it/he (talk/contribs) 03:24, 30 December 2024 (UTC)[reply]

Hi Suntooooth. Apologies to all for the unindented response. Four things:

  1. If you know you're having trouble with a template like {{Album chart}}, you can ask for help at that template's talk page
  2. For help with tables, you could start at Help:Table, but you said you don't want to learn about that. Unfornately, the template you're trying to use (or get help with) is intended for use in a table, so you'll probably want some proficiency sometime. I've included a sample Charts section below.
  3. The real problem isn't so much technical; it's that you are trying to cite a position on a not-too-notable chart. That is, we have no article for it, and it's not listed at WP:GOODCHART, so it's not too surprising it's not currently supported by {{Album chart}}.
  4. To resolve the content problem, the place to seek consensus is Wikipedia talk:Record charts. You'll need to explain your intention and maybe why that chart is more (or as) worthy as UK Albums Chart (which is supported by {{Album chart}}). I looked in the talk page's archive for Record Store Chart and didn't find anything. Possibly it's not been discussed before.

Here's that sample section I mentioned, for illustration only. It uses (1) the Album chart template with |UK2=, giving a fictitious citation. It also uses (2) a manual citation which provides a citation to a non-notable chart. I recommend you use neither of these; this is just so you can see how it would look.

Charts

[edit]
2024 weekly chart performance for So Medieval
Chart (2024) Peak
position
UK Albums (OCC)[1] not 33
UK Official Record Store Chart (OCC)[2] 33

References

Good luck and happy editing. — JohnFromPinckney (talk / edits) 23:38, 2 January 2025 (UTC)[reply]

Thanks for the detailed response! Per this and a concurrent discussion at WP:ALBUMS, I've brought this up over at the talk page for WP:CHARTS in order to gauge if the chart would be suitable for articles. Suntooooth, it/he (talk/contribs) 12:19, 3 January 2025 (UTC)[reply]

citation needed tag with year 2025

[edit]

I tried adding citation needed tag for 2025 and it shows up as ".Category:Articles with unsourced statements from January 2025[citation needed]" in the article. Am I missing something or is it because something is missing if we use year 2025. Asteramellus (talk) 13:26, 1 January 2025 (UTC)[reply]

Issue on Bhagavad Gita fixed, looks like from where copied the template, category already exists as required. Indagate (talk) 13:38, 1 January 2025 (UTC)[reply]
Oh ok. Thanks! I have always used the Template for Citation needed - e.g. when I use that template, it has subst:CURRENTMONTHNAME subst:CURRENTYEAR and I usually change the month/year. Wonder why it didn't work now. Asteramellus (talk) 13:44, 1 January 2025 (UTC)[reply]
@Asteramellus: If you changed it manually then I guess you just wrote it wrong. Your edit [1] saved {{Citation needed|date=January {{subst:2025}}}}. I see you used VisualEditor. You don't have to change anything there when you add {{citation needed}}. Just add the template and the subst code will automatically be transformed to the current month and year when you save the edit. I guess you accidentally changed {{subst:CURRENTYEAR}} to {{subst:2025}} without removing {{subst:}}. That would produce the code in your edit. PrimeHunter (talk) 14:24, 1 January 2025 (UTC)[reply]
yes thanks! Asteramellus (talk) 14:49, 1 January 2025 (UTC)[reply]
Each year someone creates a template like Template:2025 to DWIM for people who get confused in that manner. No one had created the 2025 template yet; now I have. Anomie 16:38, 1 January 2025 (UTC)[reply]
I didn't know such templates were created. I see we also have {{January}} to {{December}} for the same reason. So Asteramellus did as usual and never discovered it was wrong because we compensate for the error. It reminds me of Category:Wikipedia magic word templates with various templates like {{DEFAULTSORT}} to compensate for users who incorrectly use template syntax instead of magic word syntax. PrimeHunter (talk) 17:32, 1 January 2025 (UTC)[reply]

Can we do something about the ridiculous message displayed whenever syntax highlighting is taking "too long"?

[edit]

Syntax highlighting on this page was disabled because it took too long. The maximum allowed highlighting time is 20ms, and your computer took 22ms. Try closing some tabs and programs and clicking "Show preview" or "Show changes". If that doesn't work, try a different web browser, and if that doesn't work, try a faster computer.

The threshold is probably set too low to being with, and most people couldn't care less about it taking 0.03s vs 0.02s, so to tell them that a mere 2/1000 sec difference is "not allowed" is pretty ridiculous. If someone really does have a slow computer, that's hardly by choice, and to tell them to try a faster one is like Captain Obvious rubbing salt into their wound. More often than not, it's not even the fault of the computer, but rather some background crap (thanks, MS!), or the browser, or simply a very large and complex page (and possibly even the (gasp) wiki JS code). Ideally this should be a pref configurable by the user. Or, they could click a button if they don't care about things being slightly slower on the current page as long as they can still get the highlighting (the way browsers pop up slow JS abort/continue messages; in this case it wouldn't be modal, of course). But I think mostly it's about the overly low threshold, because when a large page is taking a number of seconds to load anyway, a few extra thousandths for this hardly make a difference. 61.84.123.149 (talk) 16:26, 1 January 2025 (UTC)[reply]

This seems to come from the Gadget mw:User:Remember the dot/Syntax highlighter. This is a user gadget and is not enabled by default here (but available for users to enable). You should report the issue to the author. But also see mw:User:Remember the dot/Syntax highlighter#TimeoutAmmarpad (talk) 16:58, 1 January 2025 (UTC)[reply]
Thanks a lot, that will probably do it for me. I was uner the impression it was a standard feature. 61.84.123.149 (talk) 17:36, 1 January 2025 (UTC)[reply]
Well there is a standard feature as well. You might even be using multiple. See WP:HILITE. —TheDJ (talkcontribs) 09:57, 2 January 2025 (UTC)[reply]
And the problem with the standard feature is that it doesn't have a timeout, so on very large pages it just freezes up the page until the browser eventually offers to kill it. --Ahecht (TALK
PAGE
)
00:38, 5 January 2025 (UTC)[reply]
On what page does it actually freeze? CodeMirror is heavily optimized and much more performant nowadays. – SD0001 (talk) 09:00, 5 January 2025 (UTC)[reply]

How does VisualEditor know to classify a site as "News"?

[edit]

How does the VisualEditor know to classify a site as News for the purposes of using {{cite news}} instead of {{cite web}}? I have noticed that for, say, The New York Times it'll classify it with {{cite news}} but for Politico it'll do {{cite web}}. I have wondered for some time and did a string search of the repo for VE but can't find any reference to "nytimes". Does anyone know where this list that dictates the outcome exists? TheSandDoctor Talk 17:26, 1 January 2025 (UTC)[reply]

I'm not sure which software is currently used but https://github.com/zotero/translators/ has the large NYTimes.com.js to process url's from nytimes.com in various ways. It involves a lot more than adding the url to a list. PrimeHunter (talk) 18:36, 1 January 2025 (UTC)[reply]
There is no list. Visual Editor uses a tool called Zotero (trough Citoid). Websites specify themselves as being an newsite through metadata on their own pages. There are several metadata formats that websites use, one of those was made by Facebook. Some websites have website specific instructions made by Zotero called translators that specificly say that that website is a newssite, repo here. A website that does not have metadata that defines itself as a newssite or a translator is defined as an webpage.
As for your specific example, New York has its own translator, where as Politico does not. Politico actually defines itself in it's own metadata as a webpage (<meta property="og:type" content="website">). Snævar (talk) 18:37, 1 January 2025 (UTC)[reply]
And once that definition is found it is mapped to the configs, see mw:VisualEditor/Citation tool for more on that part. — xaosflux Talk 18:46, 1 January 2025 (UTC)[reply]

Different assets for light and dark mode?

[edit]

Is there any way to tell Wikipedia to display different images / media for Light vs Dark mode users? If not, could this be added in the form of a template, something like this?

{{adaptive|lightmode=[[File:Diagram (light mode).svg]]|darkmode=[[File:Diagram (dark mode).svg]]}}

Due to transparency, some SVG and PNG images have bad contrast when viewed in Dark mode.

(repost from WP:TH as they said would be better here)

CrushedAsian255 (talk) 04:38, 2 January 2025 (UTC)[reply]

It would have to be hardcoded in CSS. Dark mode is configured on CSS pages through templatestyles. In order to specify a dark and light mode image in a template like that, Phab:T320322 would have to be fixed first. Snævar (talk) 05:07, 2 January 2025 (UTC)[reply]
Have you tried using class=skin-invert-image already ? —TheDJ (talkcontribs) 09:55, 2 January 2025 (UTC)[reply]
{{If dark}} can be used to select what wikitext to display based on whether or not dark mode is enabled. isaacl (talk) 23:19, 2 January 2025 (UTC)[reply]
Usage of which really should be avoided though. —TheDJ (talkcontribs) 10:33, 4 January 2025 (UTC)[reply]
I agree that generally speaking, specific colours shouldn't be specified in wikitext, and using the CSS class to trigger colour inversion by the dark mode feature simplifies maintenance by having just one image. There are cases, such as a company logo with a variant designed for dark mode, where the ability to choose the appropriate image is desirable. isaacl (talk) 17:02, 4 January 2025 (UTC)[reply]

Editnotice help

[edit]

I'm trying to create an editnotice that checks if I'm on a JavaScript or CSS file in my userspace that doesn't begin with "User:JJPMaster/Scripts", in order to warn me that scripts should go to that page's subpages instead of just being willy-nilly in my userspace. However, I got a little carried away and made this monstrosity, which always returns false. Could anyone help explain what I did wrong? JJPMaster (she/they) 18:09, 2 January 2025 (UTC)[reply]

Note: I haven't yet added the message that actually warns me. So far, it just is supposed to return "yes" if the conditions apply, and "no" if they don't. JJPMaster (she/they) 18:10, 2 January 2025 (UTC)[reply]
Never mind, I figured it out. See Special:Permalink/1266891366. JJPMaster (she/they) 18:20, 2 January 2025 (UTC)[reply]
Yikes, you should use a Lua module for complex computation like that. – SD0001 (talk) 22:00, 2 January 2025 (UTC)[reply]

Google Indexing Issue for Camdenmusique

[edit]

Hi, I’m seeking help with the "Camdenmusique" article, which isn’t appearing in Google search results. Could someone please review the article or provide insights on why it might not be indexed? Thank you! GD234 (talk) 05:24, 3 January 2025 (UTC)[reply]

This page is currently in draft space, which is why it is not being indexed. Search engines only index pages in the article space that are marked as patrolled by a new page reviewer, or those that are unpatrolled but are 90 days old. – DreamRimmer (talk) 07:37, 3 January 2025 (UTC)[reply]
Ah I see thank you for your help! The article was previously in main space but was recently converted to draft space by an editor. GD234 (talk) 08:26, 3 January 2025 (UTC)[reply]

I am posting this here in hopes of getting more eyes. I am using this on my user page—specifically, {{current time|UTC-8}}—and the way it's set up, it displays Current time for UTC-8 is 22:52. And, of course, if daylight savings is in effect, I make that UTC-7. Is there a way to use 12-hour format instead and change it to only show the time instead of the whole "current time for..." such as 10:52 PM? Because the infobox parameter is already called current time, having "current time for..." is superfluous, and since in my case I already list my time zone above, the "...for UTC-7/8" is also superfluous. Is there a way to do this, and if not with this template, with another one? Thanks. Amaury06:52, 3 January 2025 (UTC)[reply]

@Amaury: You can customize this template in your userspace and use it. I can set it up for you if you'd like. – DreamRimmer (talk) 07:14, 3 January 2025 (UTC)[reply]
It's a long time since I thought about it, but if someone doesn't provide the #time magic syntax, {{extract}} seems to work: {{extract|currentdatetime|add=-8h|show=%X}} → 8:04 am. Johnuniq (talk) 07:22, 3 January 2025 (UTC)[reply]
(edit conflict) @DreamRimmer: Thank you for the reply. If you could just show me how so I can learn, that would be appreciated. I took a look at the template page, and it doesn't show any way to customize it, like other template pages do, so I thought maybe it would require some coding on my common.js page: User:Amaury/common.js. All I want it to show is the time in 12-hour format: 11:38 PM. I'm also possibly looking at a way to add the current date parameter and template. I think I could use a custom field for the parameter and Template:Currentdate for the template. While I don't see it on the page, I'm sure there's a way to customize it so the month comes first. Amaury07:38, 3 January 2025 (UTC)[reply]
@Johnuniq: Thank you also for the reply. That would work as well. Is there a way to make the AM/PM capitals? Amaury07:38, 3 January 2025 (UTC)[reply]
@Amaury: I have created User:Amaury/Time. You can now use {{User:Amaury/Time|UTC-8|d=n}} to display the time, like 08:03 AM. If you set the 'd' parameter to 'y' ({{User:Amaury/Time|UTC-8|d=y}}), it will show both the time and date, like 08:03 AM, January 3, 2025. – DreamRimmer (talk) 08:15, 3 January 2025 (UTC)[reply]
@DreamRimmer: Thank you. I'll take a look through it when I can, as it's late here, and follow up on your talk page with any questions. Amaury08:34, 3 January 2025 (UTC)[reply]
You could also try this: {{#time: g:i A|now-8 hours}} → 8:04 AM. Johnuniq (talk) 08:51, 3 January 2025 (UTC)[reply]

This isn't specifically related to this, but it is semi-related and also applies to the template mentioned here. I also don't want to create another section just for this. I've always had problems with anything related to time for as long as I can remember. Is there a way to have my user page and talk page automatically constantly purge the page cache? Because, at least on my user page, I've been having to constantly manually purge the page cache in order to make the time actually show the current time. So, in theory, I would have to do this every single minute. For example, it is currently 1:47 PM here, and my user page is still stuck on 12:31 PM, which is when I temporarily went back to what I was using before creating this section, while my talk page did eventually update at 1:27 PM, but has gotten stuck again and is still saying that. Amaury21:47, 3 January 2025 (UTC)[reply]

You would need a Javascript user script to update the time periodically. Regenerating the page on the server is a bit of overkill; it would be more efficient for the script to just update the time displayed on your user page. Just curious: is your workflow facilitated by looking at your user page for the current time rather than using another method? isaacl (talk) 22:49, 3 January 2025 (UTC)[reply]
@Isaacl: Are you asking if I use it specifically for the work I do on Wikipedia? If so, no. I just have it on there just to have it there. Basically just as an interesting piece of info. Amaury22:52, 3 January 2025 (UTC)[reply]
@Amaury: I have created a userscript to automatically purge your userpage and talk page. You can copy the code from User:DreamRimmer/test.js and paste it into your common.js file or create a separate script page and install it. The script will purge these pages every minute while they are loaded in your browser, and you can customize it to include additional pages or adjust the purge interval to suit your needs. – DreamRimmer (talk) 07:14, 4 January 2025 (UTC)[reply]
Pages don't auto-purge for a reason, namely that Wikipedia is designed to do as much caching as possible. One user doing a purge every minute won't be noticed, but people sometimes ask for a particular page to be purged regularly and they are told that it's not going to happen. Johnuniq (talk) 08:09, 4 January 2025 (UTC)[reply]
Noted! – DreamRimmer (talk) 08:13, 4 January 2025 (UTC)[reply]
@Amaury: You can add ({{purge|refresh}}) after the time to make a purge link saying (refresh) for all viewers of the page. {{current time}} is rather misleading without a purge link and should add it as an option. PrimeHunter (talk) 09:33, 4 January 2025 (UTC)[reply]
@DreamRimmer, Johnuniq, and PrimeHunter: Thank you all for the help. You've all been incredibly helpful. :) Amaury09:48, 4 January 2025 (UTC)[reply]
We should really have a template gadget for times and countdowns. – SD0001 (talk) 10:27, 4 January 2025 (UTC)[reply]
MediaWiki:Gadget-UTCLiveClock ? Snævar (talk) 11:47, 4 January 2025 (UTC)[reply]
I think most people prefer having their notifications unified as much as possible. Thus I can see a better case for building a notification feature in a Wikipedia app than into the web-based interface (as the web interface has no access to the underlying platform notification/timer APIs). isaacl (talk) 17:19, 4 January 2025 (UTC)[reply]
Not sure if you got the indentation wrong or if this is actually a response to my comment. What I meant is to have a gadget loaded on use of a template which is controlled by its parameters to show live time for any given time zone (enhancing the wikitext output of {{time}}, {{current time}}, {{current time in time zone}}, etc), to show live countdowns (enhancing the output of {{countdown}}), and so on. Apart from userspace use cases, it could be used on datetime-related articles like (eg. Eastern Time) where the live time seems more appropriate than one lagged by the parser cache and containing a refresh link. – SD0001 (talk) 17:41, 4 January 2025 (UTC)[reply]
I was responding to your comment, but a different use case more along the lines of the original post (user-customized timers and countdowns). I'd suggest that the live update capability be togglable, with the default being no extra moving text or client resource usage. Although personally I don't think a live up-to-the-second (or even minute) countdown is needed, I appreciate there is an audience for it. isaacl (talk) 18:34, 4 January 2025 (UTC)[reply]
I'm not arguing for up-to-the-second precision (at least for mainspace use cases). The display format can remain the same as produced by the templates, just that it won't be lagged and would live-update (removing the need for showing a refresh button). I think client resource usage is the last thing to worry about. Timers in JavaScript are implemented with setInterval() which is very efficient and has been widely supported across browsers since Netscape 4 and IE 4 launched in 1997. – SD0001 (talk) 08:50, 5 January 2025 (UTC)[reply]
Like I said, I understand that others value different tradeoffs on the cost/benefit ratio of default dynamic behaviour. I'm old-school and often prefer that dynamic updates be initiated by me, but even so I can imagine situations where I wouldn't mind updates being generated live by default. isaacl (talk) 18:12, 5 January 2025 (UTC)[reply]

LFP Template Els broken

[edit]

From what I see, {{LFP Ligue 1}} and {{LFP Ligue 2}} (and the corresponding wikidata properties) produce broken links, likely happened due to the new website. {{LFP}} still works since it uses archive links, but the ~700 links from the other two are all broken. Nobody (talk) 13:49, 3 January 2025 (UTC)[reply]

From what I see, you're right! But, as you say, it's probably not the templates' fault; apparently the LFP has changed its sites and left out the fun bits about the players. Therefore, there's not currently (AFAICS, on either the English or French versions) anything to which the templates can link.
I don't have a solution for you, except to maybe wait a bit and see if the LFP adds the players sections again. Was the site changed very recently? Maybe they're still working on it, and the players' stats pages will appear soon. Or not. Sorry! — JohnFromPinckney (talk / edits) 18:16, 3 January 2025 (UTC)[reply]
Pretty sure the new website came with the sponsor change. It's likely that it won't come back. Nobody (talk) 08:45, 4 January 2025 (UTC)[reply]
WP:URLREQ if the URL changed, WP:TFD if the templates are useless now. Izno (talk) 20:29, 3 January 2025 (UTC)[reply]
The URL is gone, but some can still be found using Internet Archive, probably needs to be discussed at TfD if we want to change the templates or just remove them. Nobody (talk) 08:51, 4 January 2025 (UTC)[reply]

Log in

[edit]

I'm trying to log in to https://meta.wikimedia.org/ so I can use the Wikipedia Library. The error I see is "Incorrect username or password entered. Please try again." I tried changing my password, no luck. Then I logged out of Wikipedia and back in with the same credentials and everything's fine. What's wrong with the Wikimedia Meta-Wiki? -SusanLesch (talk) 16:22, 3 January 2025 (UTC)[reply]

So it is working now? Likely had something wrong with a session cookie. — xaosflux Talk 18:02, 3 January 2025 (UTC)[reply]
Thank you, yes meta-wiki says I'm logged in. -SusanLesch (talk) 18:35, 3 January 2025 (UTC)[reply]

Why are my userpage colors inverted?

[edit]

There seems to be a problem with my userpage, and all my colors are inverted. I looked for a high contrast setting in Wikipedia, but there was none. And I don't have the high contrast setting activated on my computer. Can someone help?

Thanks, Tenebre_Rosso_Sangue, Editing with SSStyle! (talk) 20:06, 3 January 2025 (UTC)[reply]

@Tenebre.Rosso.Sangue995320: You probably enabled the dark mode gadget without realizing. Try checking in Special:Preferences JJPMaster (she/they) 20:07, 3 January 2025 (UTC)[reply]
Just checked, it was already off, meaning it cant be that. Tenebre_Rosso_Sangue, Editing with SSStyle! (talk) 20:09, 3 January 2025 (UTC)[reply]
Probably phab:T382701. Izno (talk) 20:32, 3 January 2025 (UTC)[reply]

Unanswered and not archived comments for a project

[edit]

Is there any way to get a feed of the above onto a pageWakelamp d[@-@]b (talk) 03:57, 4 January 2025 (UTC)[reply]

Please provide more info. What comments are you talking about? Where are they? Polygnotus (talk) 00:42, 5 January 2025 (UTC)[reply]

Appending ?safemdode=1 alters infobox layout

[edit]
with safemode
Without safemode

I've tested this logged out and the problem persists. Are we testing a new infobox style or something? JayCubby 19:16, 4 January 2025 (UTC)[reply]

It is because infobox styling comes from MediaWiki:Common.css. There is currently a project to convert to infoboxes to use TemplateStyles, but that requires cleaning thousands of pages manually (see MediaWiki talk:Common.css/to do#Description of work). HouseBlaster (talk • he/they) 19:42, 4 January 2025 (UTC)[reply]
@JayCubby: ?safemode=1 omits reading CSS and JavaScript pages from the wiki, both sitewide like MediaWiki:Common.css and personal like User:JayCubby/common.js. See mw:Safemode. I find it so useful for testing that I made User:PrimeHunter/Safe mode.js to add a safemode link for the current page. A "suicidal" script which also prevents itself from loading when you activate it. I wonder whether some users have enabled "Always enable safe mode" at Special:Preferences#mw-prefsection-rendering without knowing the effect on infoboxes and other things. PrimeHunter (talk) 20:21, 4 January 2025 (UTC)[reply]
Ah, thanks. I didn't realize that safemode affected CSS (well I sort of did, but somehow differentiated the mainspace and important CSS from custom CSS, if that makes sense), merely user scripts.
This probably isn't a huge issue, but the current explanation for 'always enable safemode' is Disable on-wiki scripts and stylesheets., which could be changed to Disable on-wiki scripts and stylesheets. May break page layout. JayCubby 20:41, 4 January 2025 (UTC)[reply]
Honestly think that's kind of assumed with "turns off CSS"..... Izno (talk) 20:44, 4 January 2025 (UTC)[reply]

code editor character position counter?

[edit]

Where did it go? Used to be that the code editor displayed certain information in the lower right corner of the editing window among which was the character position from the right margin, character highlight info – number and position of characters selected, etc. Now gone?

The CTRL+, configuration menu for the editor (version 1.32.7) doesn't appear to have a setting for this so that suggests that sommat else has happened? What happened and can it be undone?

Trappist the monk (talk) 23:02, 4 January 2025 (UTC)[reply]

It was lost accidentally, and it will be back next week, see T380034. Matma Rex talk 00:07, 5 January 2025 (UTC)[reply]
Thank you. Will that also make the 'Live Autocompletion' (and all other options for that matter) sticky? Unsticky autocomplete is icky.
Trappist the monk (talk) 01:08, 5 January 2025 (UTC)[reply]
Sticky options are currently not supported out of the box, but User:Nardog/CodeEditorAssist provides it. – SD0001 (talk) 08:55, 5 January 2025 (UTC)[reply]
I'm not sure if that's what Trappist means by "sticky". Nardog (talk) 09:22, 5 January 2025 (UTC)[reply]

How to use inline style and CSS design tokens to color text?

[edit]

I want to use {{NumBlk2}} to number the chemical formula P4-t-Bu#math_B and keep the color of the square brackets in the numbering.

The original chemical formula looked like this:

{{NumBlk|:|<math chem>\underbrace\ce{PCl5}_{(1)}\ \ce{->[t\text{-}\ce{Bu-\overset{\oplus}{NH3}.\overset{\ominus}{Cl}}]}\ \underbrace{t\text{-}\ce{Bu-N=PCl3}}_{(5)}</math>|[{{EquationRef|B}}]|RawN=y}}

The result after using {{NumBlk2}} for numbering:

{{NumBlk2|:|<math chem>\underbrace\ce{PCl5}_{(1)}\ \ce{->[t\text{-}\ce{Bu-\overset{\oplus}{NH3}.\overset{\ominus}{Cl}}]}\ \underbrace{t\text{-}\ce{Bu-N=PCl3}}_{(5)}</math>|<span style{{=}}"color: var(--color-base);">[</span>'''B2'''<span style{{=}}"color: var(--color-base);">]</span>|RawN=y|Id=math_B2}}

(The ID must be unique, so I renumbered it to B2.)

But the recommendation is currently restricted to use inside TemplateStyles:

As described here, using design tokens directly in an article (e.g. <span style="color: var(--color-base);">some text</span>) seems problematic. How to color text correctly in an article in light mode and dark mode in this case? Any ideas? Thanks. Justin545 (talk) 01:59, 5 January 2025 (UTC)[reply]

So you are adding link content, that you don't want to have colored as link content ? And for that reason you want to apply custom styles ? Is this a recurring pattern ? Then you make a template and use TemplateStyles. —TheDJ (talkcontribs) 11:10, 5 January 2025 (UTC)[reply]
Thank you for your advice. It does sound a bit strange to color the link the same color as normal text. I'm not sure if the use of square brackets in numbering occurs very often. If that's not the usual case, maybe it would be better to just use {{NumBlk}} instead of wrapper template {{NumBlk2}}:
{{NumBlk|:|<math chem>\underbrace\ce{PCl5}_{(1)}\ \ce{->[t\text{-}\ce{Bu-\overset{\oplus}{NH3}.\overset{\ominus}{Cl}}]}\ \underbrace{t\text{-}\ce{Bu-N=PCl3}}_{(5)}</math>|&lsqb;[[#math_B3|B3]]&rsqb;|RawN=y|Attr=id{{=}}math_B3 style{{=}}"margin-left: {{#expr:1.6 * 1}}em;"}}
If it's the usual case, maybe just make a template and use TemplateStyles as you said:
<!-- Template:Token -->
<templatestyles src="Token/styles.css" />
/* Template:Token/styles.css */

.token-color-base { color: var(--color-base); }
.token-color-disabled { color: var(--color-disabled); }
/* ... (omitted) ... */

.token-background-color-base { background-color: var(--background-color-base); }
.token-background-color-disabled { background-color: var(--background-color-disabled); }
/* ... (omitted) ... */
and then use it like this
{{Token}}
{{NumBlk2|:|<math chem>\underbrace\ce{PCl5}_{(1)}\ \ce{->[t\text{-}\ce{Bu-\overset{\oplus}{NH3}.\overset{\ominus}{Cl}}]}\ \underbrace{t\text{-}\ce{Bu-N=PCl3}}_{(5)}</math>|<span class{{=}}"token-color-base">[</span>'''B4'''<span class{{=}}"token-color-base">]</span>|RawN=y|Id=math_B4}}
(The source code above has not been tested and may contain errors.)Justin545 (talk) 16:38, 5 January 2025 (UTC)[reply]
You should not worry about such weird specifics at all. This also produces different colours (= inconsistent behaviour) in the skins that do not use the same token. stjn 16:51, 5 January 2025 (UTC)[reply]
Thank you for reminding me about skins. Coloring text in Wikipedia is a lot more complicated than I thought. I haven't started to understand the skin part yet. So far I don't know if there is a correct way to handle coloring for skins and dark mode at the same time. If not, I may have to give up the idea of ​​coloring text completely. Without coloring, I might just use {{NumBlk}} directly like B3. Justin545 (talk) 01:18, 6 January 2025 (UTC)[reply]

Territorial control during the Russo-Ukrainian War

[edit]

Hello everyone, Territorial control during the Russo-Ukrainian War needs to be fixed. All the oblast sections are collapsed by default when on mobile. In mobile every section has collapse option which helps us navigate through the desired sections easily. Similar thing once happened with an article related to some sporting event. It was fixed when the symbols and flags were removed from it. I believe that it the same issue with this article. Too many flags are there. Many of which I believe don't need to be there neccesarily. Please fix it to make it easy for mobile users to navigate. Right now, if someone for example needs to see Zaporizhzhia oblast they have to unnecessarily scroll all the way down. Thank you. Shaan SenguptaTalk 03:51, 5 January 2025 (UTC)[reply]

That page has too many flags, yes. Izno (talk) 03:56, 5 January 2025 (UTC)[reply]

 Done Thanks to Flemmish Nietzsche. Shaan SenguptaTalk 06:03, 5 January 2025 (UTC)[reply]

Broken icon

[edit]

Hi, can anyone see why File:Gnome-colors-list-remove.svg is broken, nothing seems to have chaned but it's showing as a broken image in the latest admin newsletter. It should be a horizontal red minus to signify remove. Stephen 02:43, 6 January 2025 (UTC)[reply]

It seems to be working for me, both in that link and in the news letter in your user talk page (like in - Ferret).
What browser are you using? Are you using the mobile website (en.m.wikipedia.org)?
Is it affecting any of the previous newsletters? Is it affecting any of the other icons? – 2804:F1...CA:8CB5 (::/32) (talk) 02:58, 6 January 2025 (UTC)[reply]
That's weird it works for you. I'm on Chrome using the desktop site. All previous uses of the icon in old newsletters are broken too wherever I look. Stephen 03:49, 6 January 2025 (UTC)[reply]
I'm on Chrome desktop too... I wonder if your browser console shows any errors (Pressing f12 or three dots button (⋮) > More tools > Developer tools > Console tab and then refreshing the page).
There's also the network tab of developer tools, which for me shows a 20px-Gnome-colors-list-remove.svg.png line (the 10th line for me after refreshing) as successfully downloaded - if it had failed it would have been red, and apparently repeated a bunch of times one for each time it appears on your talk page.
What it says in the Status column, if it is red, or in Status code if you click it, might be of interest.
Also, does that direct link work? – 2804:F1...CA:8CB5 (::/32) (talk) 04:48, 6 January 2025 (UTC)[reply]
Suspect I am in Stephen's position. The direct link says "Unauthorized This server could not verify that you are authorized to access the document you requested." No errors showing up in my console, although the console is forcing the page into mobile view for some reason. CMD (talk) 04:56, 6 January 2025 (UTC)[reply]
Searching phabricator for that error reveals a very similar error that happened on a beta version (phab:T276179/phab:T277016)... seeing as it doesn't happen to me, it might be a codfw issue rather than a eqiad issue (which is the data center I'm assigned to) - but I'm just guessing, I've never looked at how these things actually work, it just seems to be a common cause of differences.
I'm pretty sure someone with backend access will have to look into this to find out what the problem is though.
Could try filing a bug report in phabricator? –2804:F1...CA:8CB5 (::/32) (talk) 05:59, 6 January 2025 (UTC)[reply]
I have the same error and filed ticket phab:T383023. cyberdog958Talk 07:22, 6 January 2025 (UTC)[reply]
I was having the same problem with File:Hypercubestar.svg (used on four articles here and over 30 on some 14 languages of Wikipedia) and started a discussion at https://commons.wikimedia.org/wiki/Commons:Help_desk#SVG_image_claims_its_thumbnails_are_unauthorized before finding this discussion and the phab link. It would be interesting to learn whether this issue is more widespread. —David Eppstein (talk) 07:33, 6 January 2025 (UTC)[reply]

Image Preview Issue

[edit]
Image preview not displaying correctly

I was looking through the Wikipedia article for the Buick Regal when I noticed that the thumbnail image for the third generation model is no longer displaying as it should. When I click on the image, it appears as normal, but only when it is clicked on. In Wikipedia Commons, the exact same problem is present. It also does not allow for resolution changes as most other images normally do. I have tested this on both Windows and mobile using Apple Safari, Google Chrome, and Microsoft Edge, and the problem remains consistent. I also found that there exist other images on Wikipedia Commons that are experiencing a similar problem. This image used to work perfectly before, so what could have changed to cause this? Is there any way this could be remedied? SuperMarioA9H5 (talk) 05:07, 6 January 2025 (UTC)[reply]

Might be the same issue as #Broken icon above (yet to be determined what the issue is though).
I can see the thumbnail on Buick Regal just fine as well. – 2804:F1...CA:8CB5 (::/32) (talk) 06:06, 6 January 2025 (UTC)[reply]
I can confirm it is the same issue, right down to the "Unauthorized" issue when selecting different sizes. Interesting that it seems to work for some yet not for others. I mainly asked as I wasn't sure if the image needed to be replaced due to an issue on Wikipedia's end. Hopefully whatever it is it can be patched out later. SuperMarioA9H5 (talk) 06:10, 6 January 2025 (UTC)[reply]

History page issue

[edit]

Occasionally when I click on History for a page as I did a few minutes ago at the Help Desk — because I wanted to thank another editor who had suggested something particularly useful to me in a message — I see only some of the revisions, not all. When this happens, there's always an alert in a blue box saying, "Compare selected revisions." Yet I'm unaware of doing anything to change from being able to see all of the revisions to just selected ones.

How can I make this stop, so I always see all the revisions?

Augnablik (talk) 02:54, 6 January 2025 (UTC)[reply]

If there was a grayed out entry among those revisions, then that is an Revision deleted edit. Among those revision deleted edits is an edit that disclosed personal information, was very insulting or something of that kind. That edit then gets reverted, and any edit from the disruptive edit to the revert gets revision deleted, so you cannot see what was there. Diff will not work on those (as an extended confirmed user).
Also "Compare selected revisions" is not an alert, it is a button. There are two circles on each edit, the left one is the first edit to compare and the right one is the last edit to compare. Clicking "Compare selected revisions" then shows you what has changed in that timeframe. Snævar (talk) 03:50, 6 January 2025 (UTC)[reply]
@Snævar — I think I see a little more clearly what's going on now, based on your reply but along with a little further insight. There weren't any grayed-out entries among the top two revisions I've noticed earlier.
Probably when I've seen the "Compare selected revisions" button, the top two revisions just happened — serendipitously — to be revisions I myself made to an earlier reply to a message or edit to an article that I made. So I thought what was going on was some sort of technical problem, as this of course wouldn't happen if the top two revisions weren't "re-revisions."
Thanks. Now I understand that I've always seen complete lists of revisions, not partial ones as I'd thought. Augnablik (talk) 05:00, 6 January 2025 (UTC)[reply]

Common.css issue on Brave

[edit]

Does anyone know why my common.css doesn't seem to work on Brave? I've just replaced Firefox with it due to its atrocious performance on YouTube with Ublock turned on. Now, I can't get my (very simple) common.css to work with it. Any ideas? Sol505000 (talk) 10:33, 6 January 2025 (UTC)[reply]

The name of the font should be in double quotes since it contains a space. – SD0001 (talk) 13:52, 6 January 2025 (UTC)[reply]
I changed it and it still doesn't work (also, it worked without the double quotes on Firefox just fine). The issue is that Brave seems to display the wrong font, rather than ignoring my common.css altogether. I think it displays DejaVu Serif instead of DejaVu Sans. Sol505000 (talk) 14:42, 6 January 2025 (UTC)[reply]
I tried uninstalling DejaVu Serif and the problem persists. Why can't Brave follow a simple instruction? Sol505000 (talk) 14:45, 6 January 2025 (UTC)[reply]