Jump to content

Wikipedia:Village pump (technical)

From Wikipedia, the free encyclopedia
(Redirected from Wikipedia:VPT)
 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.

Unicode direction weirdness

[edit]

With Baghdad Conservatory in my Firefox edit the start of the line is left of the edit box. Previously this resulted in someone adding an extra "T" to yield "TThe". But now the "The" looks like "he" in the edit box. Somewhere in the Arabic text there is a left to right unicode direction indicator as I can tell by trying to add spaces to it. How can we find and remove such characters? And is that character messing up the edit box? Graeme Bartlett (talk) 22:33, 3 August 2024 (UTC)[reply]

It looks fine in my Firefox (128.0.3), with Monobook, Vector, or Vector2022, in the "2010 editor", with and without &safemode=true added to the URL. I don't see any LRM or similar characters in that article. Anomie 13:02, 4 August 2024 (UTC)[reply]
After seeing the discussion linked below, which mentions that it happens when the line starting with LTR text wraps within some RTL text, I was able to reproduce. I can reproduce in a plain textarea locally, so it doesn't seem to have anything to do with Wikipedia specifically. Anomie 17:11, 4 August 2024 (UTC)[reply]
This is one of the reasons that the cs1|2 templates support |script-title=. Try this:
{{cite news |script-title=ar:الراحل حنّا بطرس جزء من تاريخ الموسيقى في العهد الملكي |url=http://www.daraddustour.com/%D8%A7%D9%84%D8%AA%D9%81%D8%A7%D8%B5%D9%8A%D9%84/tabid/94/smid/604/ArticleID/31615/reftab/123/Default.aspx |accessdate=31 July 2011 |newspaper=Addustour |date=28 September 2010 |url-status=dead |archiveurl=https://web.archive.org/web/20120328094702/http://www.daraddustour.com/%D8%A7%D9%84%D8%AA%D9%81%D8%A7%D8%B5%D9%8A%D9%84/tabid/94/smid/604/ArticleID/31615/reftab/123/Default.aspx |archivedate=28 March 2012}}
الراحل حنّا بطرس جزء من تاريخ الموسيقى في العهد الملكي. Addustour. 28 September 2010. Archived from the original on 28 March 2012. Retrieved 31 July 2011.
|script-title= causes cs1|2 to wrap the title in <bdi>...</bdi> (bidirectional isolate) tags:
'"`UNIQ--templatestyles-00000019-QINU`"'<cite class="citation news cs1 cs1-prop-script">[https://web.archive.org/web/20120328094702/http://www.daraddustour.com/%D8%A7%D9%84%D8%AA%D9%81%D8%A7%D8%B5%D9%8A%D9%84/tabid/94/smid/604/ArticleID/31615/reftab/123/Default.aspx <bdi lang="ar" >الراحل حنّا بطرس جزء من تاريخ الموسيقى في العهد الملكي</bdi>]. ''Addustour''. 28 September 2010. Archived from [http://www.daraddustour.com/%D8%A7%D9%84%D8%AA%D9%81%D8%A7%D8%B5%D9%8A%D9%84/tabid/94/smid/604/ArticleID/31615/reftab/123/Default.aspx the original] on 28 March 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">31 July</span> 2011</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Addustour&rft.atitle=%D8%A7%D9%84%D8%B1%D8%A7%D8%AD%D9%84+%D8%AD%D9%86%D9%91%D8%A7+%D8%A8%D8%B7%D8%B1%D8%B3+%D8%AC%D8%B2%D8%A1+%D9%85%D9%86+%D8%AA%D8%A7%D8%B1%D9%8A%D8%AE+%D8%A7%D9%84%D9%85%D9%88%D8%B3%D9%8A%D9%82%D9%89+%D9%81%D9%8A+%D8%A7%D9%84%D8%B9%D9%87%D8%AF+%D8%A7%D9%84%D9%85%D9%84%D9%83%D9%8A&rft.date=2010-09-28&rft_id=http%3A%2F%2Fwww.daraddustour.com%2F%25D8%25A7%25D9%2584%25D8%25AA%25D9%2581%25D8%25A7%25D8%25B5%25D9%258A%25D9%2584%2Ftabid%2F94%2Fsmid%2F604%2FArticleID%2F31615%2Freftab%2F123%2FDefault.aspx&rfr_id=info%3Asid%2Fen.wikipedia.org%3AWikipedia%3AVillage+pump+%28technical%29" class="Z3988"></span>[[Category:CS1 uses Arabic-language script (ar)]]
Trappist the monk (talk) 13:16, 4 August 2024 (UTC)[reply]
Previous discussion (July 2023) at Wikipedia:Village pump (technical)/Archive 206 § RTL scripts sometimes left-shifting lines displayed in editing environment (browser dependent). Folly Mox (talk) 16:31, 4 August 2024 (UTC)[reply]
Browsers automatically display text in some scripts as right to left. This can cause different issues and confusion when editing. If you cannot read those scripts anyway then you may prefer to display them left-to-right with code like this in your CSS:
textarea {
  direction: ltr;
  unicode-bidi: bidi-override;
}
It doesn't affect what you save so you're not going to damage the pages but may be less likely to do something wrong. PrimeHunter (talk) 15:39, 5 August 2024 (UTC)[reply]

XTools Edit Count down?

[edit]

Since yesterday, when I bring up my Edit Count from XTools, nothing has updated in two days. Specifically, the Actrion, Patrol figure. On the Basic information, it says "Latest edit 2024-08-03 03:11" which is in error. It also lists "Latest logged action" as 2024-08-03 03:06. Something on the stats end not working? — Maile (talk) 18:48, 4 August 2024 (UTC)[reply]

High replag means that all sorts of stuff that should update will not update until the replication lag goes back to zero. – Jonesey95 (talk) 20:42, 4 August 2024 (UTC)[reply]
Yes, there has been a high replag on both English Wikipedia and the Commons for two days now. It seems to have something to do with this. It's lasting longer than it was expected to take. Liz Read! Talk! 00:21, 5 August 2024 (UTC)[reply]
Yup. I noticed this one too, today. Ktin (talk) 00:38, 5 August 2024 (UTC)[reply]
Thanks for the input. It's been so many years since I've seen this happen, that I forgot the possibility of it. — Maile (talk) 01:39, 5 August 2024 (UTC)[reply]
Actually, it seems to happen fairly frequently, I'd guess monthly or every other month. It usually happens on Thursdays or Fridays. It becomes very evident if your editing relies on bot reports. They seem the most directly affected by these system lags. Liz Read! Talk! 01:50, 5 August 2024 (UTC)[reply]
So the replication lag has reached three and a half days. Is this situation normal or has something gone wrong and needs to be attended to? Can an end date be predicted or is it indeterminate? Nurg (talk) 22:25, 6 August 2024 (UTC)[reply]
I poked around and was unable to find a phabricator bug report, but my searching on phabricator does not work well. It looks T367856 accounts for this outage, but there has been no communication from WMF explaining why it is taking longer than the expected 26 hours and when it might be over. Maybe there is chatter on an e-mail list. Does anyone know if the WMF has uptime targets for their servers, including replag? With this one outage, currently at 92 hours, they will be below 99% uptime for the year. We had a 3+ hour outage in May 2024, a 4+ hour outage in June 2024, a 4+ hour outage in September 2023, and probably more. That's a good four and a half days of known downtime in the last twelve months for this valuable service. Not ideal. – Jonesey95 (talk) 06:34, 7 August 2024 (UTC)[reply]
There is no guarantees for replag. It is a best effort. We are seeing a lot of this over the last 2 years because Wikimedia are doing major rearchitecting of various database tables to enable them to keep scaling, and unlike the production environment the tools environment does not have the same level of support that would allow to execute these changes without impact. —TheDJ (talkcontribs) 09:32, 7 August 2024 (UTC)[reply]
According to a post at https://phabricator.wikimedia.org/T367856 nothing is broken. A process is running that may take 6 days – or maybe longer, or maybe not so long. Nurg (talk) 00:42, 8 August 2024 (UTC)[reply]
They're obviously working on Valve Time - X201 (talk) 07:11, 9 August 2024 (UTC)[reply]
Hooray, we are over 168 hours (one full week)! (175 hours at this writing.) That's more than a full week of database reports being out of date. It's going to be fun to mop up over a week's worth of mess when this outage finally gets sorted. – Jonesey95 (talk) 17:15, 10 August 2024 (UTC)[reply]
It's not a record. I seem to recall that about four or five years back replag hit two or perhaps three weeks. --Redrose64 🌹 (talk) 18:18, 10 August 2024 (UTC)[reply]

AfD Statistics not updating either

[edit]

AfD Statistics https://afdstats.toolforge.org/afdstats has not updated since at least yesterday. I am assuming this is th same issue as replag — Maile (talk) 13:02, 5 August 2024 (UTC)[reply]

Working again, as of this AM. — Maile (talk) 11:33, 8 August 2024 (UTC)[reply]

Wikiproject Assessment tables not updating either

[edit]

Reported at Wikipedia talk:Version 1.0 Editorial Team/Index. Same root cause? Nurg (talk) 23:48, 5 August 2024 (UTC)[reply]

PetScan

[edit]

I'm assuming that WP:PETSCAN is affected by the same problem as well, because articles that I fixed a few days ago are still showing in the search results. - X201 (talk) 08:05, 8 August 2024 (UTC)[reply]

User Scripts and Template Substitution

[edit]

I have a minor issue that I need some assistance with. I used to have two scripts that would help with some non-admin closures and archives. I believe the scripts were Discussion closer and manual-archiver. I have been inactive for some time, but, when I checked today -- neither of them seem to be working. In the past I would find two links on the right hand side of a discussion "Archive" and "Close". I would use them to do some amount of non-admin closures to clear the backlog at WT:ITN. Did something change with these scripts? Am I doing something wrong?

Also, unrelated, at User:Ktin I see that the template substitution seems to be failing on most of the templates. Is that because there is a limit on the number of templates on an user page? This is obviously a minor issue. But was generally curious. Thanks. Ktin (talk) 00:36, 5 August 2024 (UTC)[reply]

User:Ktin is in Category:Pages where post-expand include size is exceeded. This causes attempted transclusions to just become template links when the limit is broken. It varies greatly how costly templates are. The main cause in your case is the 31 {{Get short description}}. For example, {{Get short description |2023 Indian Premier League final}} uses 9% of the 2 MB limit. PrimeHunter (talk) 13:05, 5 August 2024 (UTC)[reply]
Without those 31 {{Get short description}}, the whole page would only use 3% of the limit instead of breaking it. You import User talk:DannyS712/DiscussionCloser in User:Ktin/common.js. See User talk:DannyS712/DiscussionCloser#Patched version (I haven't tried it). You also load User:Evad37/OneClickArchiver. Wikipedia:One click archiving says it's no longer recommended and suggests other scripts. PrimeHunter (talk) 13:17, 5 August 2024 (UTC)[reply]
Thanks a lot, PrimeHunter. The template evaluation workload makes sense. Appreciate you helping me get to the bottom of that. Will try updating that and the scripts over the weekend. Have a nice one! Ktin (talk) 15:23, 5 August 2024 (UTC)[reply]
Yes, it transcludes and recursively transcludes the target page. You might want to use something like {{Annotated link}} for better performance, though I'm not sure if that will help with the PEI limit. — Qwerfjkltalk 12:10, 7 August 2024 (UTC)[reply]

Template:Efn

[edit]

Template:Efn used with basic parameters would usually be displayed as [a][b] etc. But, in the recent days it's being displayed as [lower-alpha 1][lower-alpha 2] etc. Why is it? Vestrian24Bio (TALK) 01:20, 5 August 2024 (UTC)[reply]

Where? -- Michael Bednarek (talk) 05:06, 5 August 2024 (UTC)[reply]
Any page I see using it. Vestrian24Bio (TALK) 05:40, 5 August 2024 (UTC)[reply]
 Works for me Specific examples please. --Redrose64 🌹 (talk) 06:47, 5 August 2024 (UTC)[reply]
Windows 10 version history, Windows 11 version history
Screenshots: [1], [2] Vestrian24Bio (TALK) 06:56, 5 August 2024 (UTC)[reply]
"Rendered with Parsoid", as above (#Start a discussion notice on Talk pages) to your earlier question. -- Michael Bednarek (talk) 07:39, 5 August 2024 (UTC)[reply]
Why is the Parsoid causing these problems and it isn't discussed anywhere on en-WP?? Vestrian24Bio (TALK) 07:42, 5 August 2024 (UTC)[reply]
Vestrian24Bio, because most people don't use Parsoid, so some templates break with it. — Qwerfjkltalk 08:33, 5 August 2024 (UTC)[reply]
Neither Windows 10 version history nor Windows 11 version history uses {{efn}}, please supply examples where {{efn}} is actually used and is a definite factor in the perceived problem. Also, your screenshots are unusable, as I can't find whatever it is I'm supposed to be looking for. Please follow the directions at WP:WPSHOT. --Redrose64 🌹 (talk) 14:41, 5 August 2024 (UTC)[reply]
The section Windows 10 version history#Channels transcludes {{Windows 10 versions}} which uses efn. I can see the [lower-alpha 1][lower-alpha 2] as described in the screenshot and the list then is a,b, etc. Could the transclusion interfere with the correct behaviour of efn?  —  Jts1882 | talk  14:50, 5 August 2024 (UTC)[reply]
I can see the problem on any page listed here. So, I took screenshots of 3 random pages:
Vestrian24Bio (TALK) 15:44, 5 August 2024 (UTC)[reply]
I see no problem with any of these articles, logged-in or logged-out. If no problem is apparent when logged-out, but you have a problem when logged-in, that tells me that there's something unusual about your custom settings. --Redrose64 🌹 (talk) 17:39, 5 August 2024 (UTC)[reply]
"Rendered with Parsoid" as said above. Vestrian24Bio (TALK) 17:41, 5 August 2024 (UTC)[reply]
I don't see how that happens. According to mw:Parsoid, it's something to do with converting Wikitext to HTML. So, as all of our pages are written using Wikitext, and all of our readers are served HTML, the conversion process should be the same for everybody, and Parsoid must be that process. So why do I get something different from Vestrian24Bio? Has one of us turned off Parsoid, and if so, how and why? --Redrose64 🌹 (talk) 20:21, 5 August 2024 (UTC)[reply]
It's not the default wikitext parser. If you opt into it at the bottom of Special:Preferences#mw-prefsection-editing, you should see the [lower-alpha 1] misparse, too; I do, at least. —Cryptic 20:37, 5 August 2024 (UTC)[reply]
There is ongoing work in this area. I will file a bug. Izno (talk) 17:09, 5 August 2024 (UTC)[reply]
Looks like the CSS for phab:T156351 (that Parsoid requires rather than using MediaWiki:Cite link label group-lower-alpha) needs updating after Ieff73769, probably from .mw-ref > a[data-mw-group=lower-alpha]::after to .mw-ref > a[style~="mw-Ref"][data-mw-group=lower-alpha]::after (and the same for the other groups). Anomie 00:50, 6 August 2024 (UTC)[reply]
Yes, that would fix it, just a specificity issue it looks like. And the change looks deliberate, but 1) I'm not sure the impact was considered, and 2) I'm not sure that [style~="mw-Ref"] particularly is a nice selector for sundry reasons. Izno (talk) 01:11, 6 August 2024 (UTC)[reply]
I've made Anomie's change as a for-now solution while we wait for whatever is being hacked on by WMDE. Izno (talk) 02:54, 10 August 2024 (UTC)[reply]

Dark mode for pure-HTML table templates

[edit]

Template:Hsl-swatches and Template:Hsv-swatches use the pure HTML table format and needs to be adapted so that they display correctly in dark mode. –LaundryPizza03 (d) 04:03, 5 August 2024 (UTC)[reply]

Fixed by Jonesey. Izno (talk) 17:22, 5 August 2024 (UTC)[reply]

Tech News: 2024-32

[edit]

MediaWiki message delivery 20:40, 5 August 2024 (UTC)[reply]

c:Template:Dir and c:Template:BCP47. I don't think I've ever used them. --Redrose64 🌹 (talk) 22:16, 5 August 2024 (UTC)[reply]
They're templates used by templates. Almost every file description page uses them indirectly when marking up the languages of file descriptions, for example. Probably many other translateable templates do as well. Matma Rex talk 09:01, 6 August 2024 (UTC)[reply]
Only templates that deal with multiple languages are likely to use these. Often as part of other templates. These are typical cases of templates that are used the most without people ever realizing they exist ;) —TheDJ (talkcontribs) 09:28, 7 August 2024 (UTC)[reply]

Cite button in Visual Editor is broken

[edit]

I'm getting 404 errors from the API in the console, don't have time to investigate further. RAN1 (talk) 03:22, 6 August 2024 (UTC)[reply]

It works for me (trying to cite "https://www.example.com"). What inputs cause the problem for you? Matma Rex talk 08:59, 6 August 2024 (UTC)[reply]
Works for me now too. The API endpoint was responding with 404s when I was trying to cite apnews.com, it looked like it went down. RAN1 (talk) 14:43, 6 August 2024 (UTC)[reply]

WikiProject templates category redirect mess

[edit]

Something is suddenly causing various templates associated with WikiProjects to populate category redirects. Part of the problem is rooted in the template and category names not matching.

Populated redirects include: Category:WikiProject Belgrade, Category:WikiProject Doctor Who templates, Category:WikiProject Magazines templates and Category:WikiProject Portals templates.

Is anyone able to identify what change has caused these to suddenly populate and fix it? Thanks in advance. Timrollpickering (talk) 10:40, 6 August 2024 (UTC)[reply]

Based on timestamps things were added to the category, the first three look like they're due to Special:Diff/1238812083. The last seems to have been done manually: Special:Diff/1238918898, Special:Diff/1163203429/1238919315, Special:Diff/1238919052, and Special:Diff/1238918849. Anomie 12:30, 6 August 2024 (UTC)[reply]

Gadget to view section sizes

[edit]

Is there a way to view a page's section sizes without having to add {{Section sizes}}? A diehard editor (talk | edits) 13:10, 6 August 2024 (UTC)[reply]

Not aware of a way to see it all at once, but you can use Wikipedia:Prosesize on the edit preview screen when looking at a particular section. CMD (talk) 14:34, 6 August 2024 (UTC)[reply]

Delay in global lock on account

[edit]

𝕲𝕵𝕺𝕭𝕬𝕵 𝕺𝕽𝕯𝕰𝕶 𝕺𝕱 𝕾𝕬𝕿𝕬𝕹's account is global locked, even though their name is in title blacklist for only on English Wikipedia.[1] Also, why was their account even given the permission to be created, so that they can make three edits and then get globally locked? Thanks, ExclusiveEditor Notify Me! 16:11, 6 August 2024 (UTC)[reply]

  1. ^ .*[^\0-\x{FFFF}].* <casesensitive> in # Very few characters outside the Basic Multilingual Plane are useful in titles on local
This global account was created on another project, TBL doesn't stop autocreation. — xaosflux Talk 18:58, 6 August 2024 (UTC)[reply]

Adding transparency to make templates more dark-mode friendly

[edit]

As someone who has witnessed the transition to Fandom Desktop which had a dark mode included, I want to suggest something that might actually be good for templates, and that is adding transparency to backgrounds (not to the font, just to backgrounds using rgba or hex codes) This could be done automatically but it might be better to do so in wikitext and may be a good addition to the manual of style. This would allow the text to be colored white (or whatever) and we would not have to auto-color stuff with backgrounds black. I wonder what level of transparency would be good for this. I was thinking 0.1 but there isn't a good way to check. Maybe this could be done as a bot task for inline styles and by interface admins for CSS sheets. Awesome Aasim 19:34, 6 August 2024 (UTC)[reply]

Maybe that is useful for the night mode gadget (I would not know), but for the vector-2022/minerva night mode using 'background:transparent' where the light mode color is white is frowned upon per Mw:Recommendations for night mode compatibility on Wikimedia wikis#Avoid using background: none or background: transparent. Snævar (talk) 21:58, 8 August 2024 (UTC)[reply]
[edit]

When a link to an article someone has created is added to a navbox, and someone subsequently edits any page in such navbox, regardless of the content of that edit, the user who created said article which was added to the navbox gets a notice that a "link was added" to that article, when that is not the case. I'm guessing the reason as to why mediawiki doesn't "register" that a link was added to a navbox in each transclusion of it has to do with the page not being purged until the next edit is made to it, but is there a way this can be fixed for link added notices? I'm aware one could just turn these off, but it does nevertheless seem like a bug. Flemmish Nietzsche (talk) 08:44, 7 August 2024 (UTC)[reply]

Not currently. From the perspective of Mediawiki, there is no difference between a link included in a page vs included via a templat, or rather what u describe a specific subset of templates. —TheDJ (talkcontribs) 09:15, 7 August 2024 (UTC)[reply]
I'm having a similar problem; I got two notifications earlier today,
  1. A link was made from ‪2027 Cricket World Cup qualification‬ to ‪2027 Cricket World Cup Qualifier Play-off‬. [5]
  2. A link was made from ‪2027 Cricket World Cup Qualifier‬ to ‪2027 Cricket World Cup Qualifier Play-off‬. [6]
I got these notifications because I created 2027 Cricket World Cup Qualifier Play-off‬, but I don't have any of these pages on my watchlist or subscriptions.
I'm also confused because whenever a new notification arrives its also sent as a mail notification (only to those who preferred it). But, no mail notification is received when "A link was made" notification arrives... Vestrian24Bio (TALK) 10:06, 9 August 2024 (UTC)[reply]
These are settings per notification type, in your preferences, in the notifications section. —TheDJ (talkcontribs) 09:50, 10 August 2024 (UTC)[reply]

Editing problem

[edit]

Hi. For about four days I have been unable to edit articles. When I click on either the edit tab at the top of a page or the section edit tags to the right of section headings, an edit box appears to open, but a blue progress bar appears at the top which stops about three-quarters of the way across the page. As a result, I have an edit box where I can work, but no way to save my changes. Exceptions that do work are: 1. on pages like this one, the tab at the top that opens a new section; 2. clicking on "reply" on a talk page; and 3. clicking on "undo" in an article history. Those open functional edit boxes (hence I can write this). But regular editing is effectively blocked. Does anyone have an idea what the problem might be? (Incidentally, for the last year I have successfully been using the 2017 wikitext editor. I don't know if that is the problem, but I can't find any way to access it to switch it off.) Doric Loon (talk) 00:25, 8 August 2024 (UTC)[reply]

The blue progress bar you describe is probably the loading animation for the Visual Editor. In your Preferences you can uncheck the checkbox named "Enable the visual editor". Then Save the changes with the Save button near the bottom of the page.
Exception 2 is probably the Discussion Tools feature.
I am not sure what could cause this problem, and I never use the Visual Editor. Programmers often, but not always, put error messages in the Javascript console when something goes wrong. Depending on which browser you have you could try pressing F12 to open the Developer tools, and then clicking on "Console" and then loading a webpage with the Visual Editor enabled (which will fail) to see if it generates any error messages. If there are any error messages this may be useful to whoever tries to diagnose the problem. Polygnotus (talk) 12:34, 8 August 2024 (UTC)[reply]
What browser/operating system are you using? What versions? What happens when you click this edit link? Izno (talk) 15:36, 8 August 2024 (UTC)[reply]
OK, I seem to have solved it by unclicking "Use the wikitext mode inside the visual editor, instead of a different wikitext editor This is sometimes called the '2017 wikitext editor'" in Preferences. Perhaps this plug-in is no longer working. Shame, I did find it helpful, how it marked coding in different colours. Anyway, problem solved, thanks. Doric Loon (talk) 15:56, 8 August 2024 (UTC)[reply]
The 2010 wikitext editor also can use highlighting, see the marker icon in the middle of the editing bar. Izno (talk) 15:59, 8 August 2024 (UTC)[reply]

"Remember me" not working as intended for me

[edit]

Exactly as title. The checkbox states that it would last a year, yet sometimes I would find myself not logged in even though I am using the same device, same browser, etc. It is just a mild annoyance, but can someone give me pointers on how to fix this? Thanks in advance. —Mint Keyphase (Did I mess up? What have I done?) 01:26, 8 August 2024 (UTC)[reply]

Could happen if you log out on another device in the meantime. hgzh 10:51, 8 August 2024 (UTC)[reply]
But I am only using this one device logged in, and I'm quite sure my account wasn't hacked (hopefully(?)). —Mint Keyphase (Did I mess up? What have I done?) 11:23, 8 August 2024 (UTC)[reply]
Anything that clears or blocks your local storage (cookies) can invalidate your saved logon. Some browser or browser extension updates can cause this. — xaosflux Talk 15:10, 8 August 2024 (UTC)[reply]
FWIW I was logged out unexpectedly under similar circumstances on the day this was posted as well. I use Windows primarily with Chrome; if you also have a similar configuration, that *could* be an explanation. Graham87 (talk) 04:26, 9 August 2024 (UTC)[reply]

In Javascript, insert template in correct place (after hatnotes)

[edit]

According to MOS:ORDER, DuplicateReferences has to insert maintenance templates at the correct place in the article (6. Maintenance, cleanup, and dispute tags). Is there a trick to ensure that the template {{Duplicated citations}} is inserted at the correct location? Polygnotus (talk) 12:14, 8 August 2024 (UTC)[reply]

The obvious method is to make a long list of all the templates, and all redirect to those templates (and filter out those that are not used in mainspace), that should appear above the maintenance templates. But that quickly turns into a giant list and a lot of work. Isn't there a smarter way to do this? Is there some kind of Javascript library I can import? Polygnotus (talk) 16:09, 8 August 2024 (UTC)[reply]

Figured it out (somewhat) by stealing getting inspiration from Twinkle's code. [7] which uses morebits [8]
regexes

const shortDescriptionRegex = /\{\{\s*short description\s*\|[^}]+\}\}/i; const displayTitleRegex = /\{\{\s*(DISPLAYTITLE|Lowercase title|Italic title)\s*(\|[^}]+)?\}\}/i; const hatnoteRegex = /\{\{\s*(hatnote|main|correct title|dablink|distinguish|for|further|selfref|year dab|similar names|highway detail hatnote|broader|about|other uses?|redirect|see)\s*(\|[^}]+)?\}\}/i; const articleStatusRegex = /\{\{\s*(Featured list|Featured article|Good article)\s*\}\}/i; const deletionProtectionRegex = /\{\{\s*(db|delete|prod|proposed deletion|ArticleForDeletion|AfDM|pp|protected)\s*(\|[^}]+)?\}\}/i;

Polygnotus (talk) 05:59, 10 August 2024 (UTC)[reply]

CT scan viewer gadget, part 2

[edit]

Doc James talked to me at a conference and asked me to look into installing MediaWiki:Gadget-ImageStackPopup.js as a default gadget. It looks like this one is pretty much ready. The last discussion on it was at Wikipedia:Village pump (technical)/Archive 213#New Gadget for viewing CT images, and it looks like all recent suggestions by folks such as TheDJ and DMacks were implemented and this can move forward. At some point Xaosflux also set this up as a gadget in the "test" category.

It sounds like the next step is to set this up to be a default gadget, and we should work out the details for that. In one discussion, MusikAnimal also suggested that this gadget only be loaded for pages that need it, and that this could be done using categories.

With these parameters in mind, is this how we should set up the MediaWiki:Gadgets-definition? Is everyone OK with moving forward?

== template-gadgets ==
* ImageStackPopup [ ResourceLoader | default | categories = Pages using gadget ImageStackPopup ] | ImageStackPopup.js | ImageStackPopup.css

Thanks. –Novem Linguae (talk) 13:44, 8 August 2024 (UTC)[reply]

I'm ok with it. —TheDJ (talkcontribs) 13:58, 8 August 2024 (UTC)[reply]
Seems like it has been fairly stable? I've created the trigger category using the same naming convention as the others (Category:Pages using gadget ImageStackPopup) - which will need to get populated to pages where this will need to run. That is likely best done via some template. — xaosflux Talk 14:59, 8 August 2024 (UTC)[reply]
Prior discussion was that perhaps these should be un-opt-out-able (i.e. hidden gadgets), primarily to not pollute the gadget list. I'm not sure that is needed though, and could always be revisited after this goes live. — xaosflux Talk 15:01, 8 August 2024 (UTC)[reply]
So barring any objections, the next steps are: update the pages to somehow include the category; move the gadget from test to template-gadgets with updated parameters. — xaosflux Talk 15:07, 8 August 2024 (UTC)[reply]
Using a consistent template-gadget category naming convention isn't strictly necessary but I think it has benefits (in this case, just change the included trigger category, or add an additional cat, in Template:ImageStackPopup). — xaosflux Talk 15:13, 8 August 2024 (UTC)[reply]
Sure. I've changed the tracking category to Category:Pages using gadget ImageStackPopup in {{ImageStackPopup}}, and I've updated the proposed gadget-definition code above. –Novem Linguae (talk) 20:57, 8 August 2024 (UTC)[reply]

RFPPI's automatic section title

[edit]

I am unsure which talk page is the intended place to ask for this since most redirect to WT:RFPP (which, if it was the intended place, is protected), but is there any way to change the form (the Request protection button), so that it does this automatically? – 2804:F1...20:147 (talk) 20:26, 8 August 2024 (UTC)[reply]

The above is saying that the "Request protection" button at Wikipedia:Requests for page protection should insert a colon in front of the title if that title is for a Category (so the result is a link to the category rather than something which puts the page in the category). That is above my pay grade but might involve ?withJS=MediaWiki:Request-page-protection-form.js at MediaWiki:Request-page-protection-form.js. Johnuniq (talk) 00:19, 9 August 2024 (UTC)[reply]
Ah, reading the code it seems that the formatted text comes from the template values in Wikipedia:Requests for page protection/Forms-configuration.json.
Is there any side effect to just adding the colon in the section titles there? It seems like that's what the pagelinks template already does (and many others).
I won't request an edit there because I already started this, and because I'm not sure if it's that easy. Thanks for this info. – 2804:F1...20:147 (talk) 03:11, 9 August 2024 (UTC)[reply]
Just to be clear, that is my question (and if yes, my suggestion) now. Does simply doing this change at the aforementioned JSON work for fixing this?:
=== [[$title]] ===
+
=== [[:$title]] ===
2804:F1...92:7B79 (talk) 16:36, 9 August 2024 (UTC)[reply]

Add A Fact experimental tool from Future Audiences

[edit]

The Future Audiences team at the foundation is launching Add A Fact, an experimental tool for adding information to English Wikipedia from outside the website. You can download the extension from the Chrome store here: Add A Fact. For now, an (auto)confirmed English Wikipedia account is required to submit facts with this extension.

The idea was developed and workshopped with Wikipedians at WCNA 2023, demoed and tested with Wikipedia community members as part of our team’s regular monthly community calls.

Here is a short demo video on the extension:

A quick how-to —

  1. While reading any secondary source on the web (a news item, a scholarly article, etc.), you can open Add A Fact and highlight a short claim that you may want to add to Wikipedia.
  2. An LLM will check if the selected claim is related to any existing Wikipedia articles, and will present information about whether the fact is fully, partially, or not present in these articles. You may also search for an article of your choosing.
  3. Once you select a Wikipedia article to add your fact to, Add A Fact will give you the option of sending a pre-filled template message to the talk page of the article, which includes the selected text, any additional comments you’d like to add, and a structured citation. This message will be signed under your Wikipedia username.
  4. If the URL of the source you are on appears on WP:Reliable_sources/Perennial_sources, you will receive a warning message about your source’s reliability (but will still be able to add a suggested fact from this source). If the URL of the source you are on appears on the spam blocklist, you will not be able to add a suggested fact from this source.
  5. To limit any potential misuse/spam, Add A Fact users will be limited to sending a maximum of 10 facts per day during this early experimental period.

We've answered some common questions on our FAQ.

Add A Fact seeks to prove or disprove a hypothesis about how we might continue to sustain and grow Wikimedia projects in a changing online knowledge landscape. In this case, we’re seeking to understand how people can make editorial contributions off-platform (that is, without going directly to Wikipedia.org), and if generative AI can support or hinder this process.

If you use the tool, please give us your thoughts anonymously via the feedback form on the extension, in this VP thread or on my subpage. DErenrich-WMF (talk) 16:09, 9 August 2024 (UTC)[reply]

No Firefox support? Why not? Which APIs are you missing? Polygnotus (talk) 20:49, 9 August 2024 (UTC)[reply]
@Polygnotus: FF doesn't support service workers in manifest v3 but I actually think there's a way I can work around this (looking into this today). FF support is on our radar. DErenrich-WMF (talk) 21:06, 9 August 2024 (UTC)[reply]
Thank you. The tool looks interesting but I strongly dislike Chrome. Polygnotus (talk) 21:20, 9 August 2024 (UTC)[reply]
If its a chrome extension then, It would work in Microsoft Edge as well. Vestrian24Bio (TALK) 00:19, 10 August 2024 (UTC)[reply]
I dislike Edge even more strongly, for very similar reasons. Polygnotus (talk) 00:30, 10 August 2024 (UTC)[reply]
It is unfortunate that the video demo shows someone suggesting a press release for a source on a medical topic, which would surely not pass WP:MEDRS. MrOllie (talk) 21:33, 9 August 2024 (UTC)[reply]
That's a good point. We tried to have the tool warn you about unacceptable sources but encoding all the nuances of the rules is hard. But doing this better is something we should look more into. DErenrich-WMF (talk) 23:05, 9 August 2024 (UTC)[reply]
The message left on the talk page, will that include some template or tracking category, so that editors can easily find a list of facts to be added, and act upon them? Otherwise, especially if the facts are posted on lesser-watched talkpages, it'll be like shouting into the void. --rchard2scout (talk) 06:30, 10 August 2024 (UTC)[reply]
It doesn't currently use a tracking template but that's planned for the next minor release. For now you can find the relevant edits by using hashtags DErenrich-WMF (talk) 17:21, 10 August 2024 (UTC)[reply]

Getting Cite errors and CS1/CS2 errors for an article via the API

[edit]

I want to get information about Cite errors and CS1/2 errors via the API. The input should be the title of a Wikipedia article and the output should be either a list of cite errors or a list of CS1/2 errors (or a combination).

The articles are in Category:Pages with citation errors and Category:CS1 errors. There doesn't appear to be a separate category for CS2 errors.

CS1/CS2

[edit]

If I add {{citation |first=bar |title=foo}} to my userpage I see:

foo {{citation}}: |first= missing |last= (help)

On this article I can see that the API reports that there is a CS1 error, but not what the actual problem is. I have added the CSS found here so I can see the specific CS1 error when viewing the article in my browser. But how can I get this information via the API? It looks to me like Module:Citation/CS1/Configuration generates the error messages; does the fact that the error is generated by this Lua script mean I can't get this information via the API? Or do I have to get the rendered page to get the actual HTML and search that for error messages?

Is it possible to detect (via the API) if an edit causes a CS1/CS2 error before actually making the edit?

There are roundabout ways, but otherwise, the answer to does the fact that the error is generated by this Lua script mean I can't get this information via the API is yes. Each error emits a category but you will only know which categories go with which citations by using something like the mw:API:Expandtemplates on the source wikitext. If you don't care about knowing which templates have which issues, you can use the categories API. Another solution is to get the HTML and then search for the relevant classes with e.g. mw:API:REST API though I think there are other APIs one could use (even ignoring screen scraping).
Is it possible to detect (via the API) if an edit causes a CS1/CS2 error before actually making the edit? Only with something like the above. Izno (talk) 02:27, 10 August 2024 (UTC)[reply]

Cite error

[edit]

On Brainwashing I see a cite error on ref 87: Cite error: The named reference they-never-said-it was invoked but never defined (see the help page). Which API call should I make to get this information? I assumed it was this (Sandbox).

Is this also handled by a Lua script somewhere? What is the URL? It looks like its using MediaWiki:Cite error references no text but I can't seem to find a Lua module referencing that. Is it in a MediaWiki extension written in PHP?

Do I have to get the rendered page to get the actual HTML and search that for error messages?

How would I detect (via the API) if an edit causes a cite error before actually making the edit?

It looks like I am at least able to find errors before they happen with action=parse, but those are warnings from the parser, not the Lua script(s). Is that correct?

These errors originate from mw:Extension:Cite. You can explore the documentation there, but I do not think there is anything to indicate errors in an API. Besides whatever categories are emitted, as discussed above, but that would not tell you which references caused an error I believe. Izno (talk) 02:30, 10 August 2024 (UTC)[reply]

Bot

[edit]

Which bot, if any, is running on Category:Pages with broken reference names to find the most recent revision that contains that refname so it can be restored? Shouldn't be too hard to write, right? Can the InternetArchiveBot do that?

Polygnotus (talk) 23:43, 9 August 2024 (UTC)[reply]

AnomieBOT. Izno (talk) 02:19, 10 August 2024 (UTC)[reply]
@Izno: Thanks a lot! This is a con of the Lua stuff, but there are a lot of pros. Lots of food for thought. Polygnotus (talk) 05:55, 10 August 2024 (UTC)[reply]

Using Twinkle to tag articles

[edit]

I apologise if this has been asked already.

I have noticed a problem with accessing all of the tag options when using Twinkle. I switch between mobile to desktop when I need to use Twinkle, in most instances the full drop down menu is fine, I can scroll up or down to find the correct message I need. When trying to add a welcome message for new users the scroll doesn't work though. I can only access the initial few welcome messages but that's it. I also have the same problem with tagging articles in the mainspace. I've found an article published to the mainspace and it doesn't have any references. I wanted to tag it as such but I am unable to scroll down the menu to the correct option.

Most of the Twinkle options are fine, such as CSD, I can scroll down to view all the options. It seems to be a problem with Welcome messages and article tagging. Am I doing something wrong? Thanks in advance, Knitsey (talk) 15:42, 10 August 2024 (UTC)[reply]