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.

No supported authentication methods available when trying to log in to toolforge[edit]

I normally log in to toolforge using PuTTY and WinSCP, and a year or two ago I set it up (I don't remember how, except that it was a pain to do) to use a passphrase that checks a local key file on my PC. This has been working fine ever since. Today I got a message from WinSCP on connecting saying that the host key had changed (I forget the exact message). After a bit of research I trusted the host and connected successfully, using the passphrase as usual; I can see the usual directory structure for the tool I run. I then tried PuTTY and got the same message, said yes, and now the host won't let me connect. When I use the saved session I get "No supported authentication methods available" and then "Server refused our key". This surprised me because WinSCP is perfectly happy with the connection. Any help on how to get connected again would be much appreciated. Mike Christie (talk - contribs - library) 01:02, 25 April 2024 (UTC)[reply]

Update PuTTY to the newest version and it should be fine again. hgzh 07:00, 25 April 2024 (UTC)[reply]
That worked. Should have thought of that myself. Thanks! Mike Christie (talk - contribs - library) 09:55, 25 April 2024 (UTC)[reply]
Earlier versions of PuTTY have a security vulnerability [1]. Everybody should update to the latest version. Hawkeye7 (discuss) 11:19, 25 April 2024 (UTC)[reply]

Bizarre category order[edit]

I just added William Whitehead Watts to Category:Presidents of the Geological Society of London using Wikipedia:HotCat. In the past when I have done this sort of thing the new category appears last in the list of categories at the bottom of the page. For some reason it is displaying as the first on this one. Why is this and how can I stop this unwonted and unwanted behaviour? Browser = Edge on Win 11, skin = Monobook. Thank you, DuncanHill (talk) 13:44, 25 April 2024 (UTC)[reply]

That article was already in that category before your changes. It is applied automatically by Template:GLS Presidents. The reason it is listed first is because that template is used before any of the other categories are defined — Martin (MSGJ · talk) 13:49, 25 April 2024 (UTC)[reply]
Well that would explain why I didn't see it was in that category, nobody would expect it to be listed before the dates. Is it common for templates to do that? It strikes me as unnecessary and confusing. — Preceding unsigned comment added by DuncanHill (talkcontribs)
WP:TEMPLATECAT says: "However, it is recommended that articles not be placed in ordinary content categories using templates in this way." But there are still many templates doing it. Some of them have a parameter for Wikipedia:Category suppression but not Template:GLS Presidents. You could use {{Suppress categories|{{GLS Presidents}}}} and manually place the category where you want it. PrimeHunter (talk) 14:50, 25 April 2024 (UTC)[reply]
DuncanHill, if you manually add the category to each of the pages transcluded by the template, the category assignment code can be removed from the template per WP:TEMPLATECAT. – Jonesey95 (talk) 14:57, 25 April 2024 (UTC)[reply]
@PrimeHunter: I tried that and got "template loop detected". @Jonesey95: I'd happily add them to the category, but haven't the faintest idea how to remove the category assignment code from the template. Something to do with includeonly or noinclude? DuncanHill (talk) 15:01, 25 April 2024 (UTC)[reply]
@DuncanHill just remove the part of the code that has the category, don't add additional parts to the template. Gonnym (talk) 15:21, 25 April 2024 (UTC)[reply]
@Gonnym: so remove all of <includeonly>{{main other|[[Category:Presidents of the Geological Society of London]]}}</includeonly><noinclude> [[Category:Presidents of the Geological Society of London| ]] </noinclude>? DuncanHill (talk) 15:24, 25 April 2024 (UTC)[reply]
yes if you want to also remove the template itself from that category. If you want to keep the template in the category leave the noinclude section. Gonnym (talk) 15:26, 25 April 2024 (UTC)[reply]
Thank you, DuncanHill (talk) 16:05, 25 April 2024 (UTC)[reply]
{{Suppress categories|{{GLS Presidents}}}} is code which can be placed in an article using a template which automatically adds categories. Then the template wouldn't have to be edited, but the code would be needed in all articles where the category is unwanted. PrimeHunter (talk) 16:12, 25 April 2024 (UTC)[reply]

Search suggestions seem to be missing obvious choices[edit]

Earlier today, I went to look up the article on Sonia Sotomayor, a current justice of the US Supreme Court. But to my surprise, as I started typing her name into the search bar, the search algorithm didn't seem to recognize her as a possible destination. By the time I had "Sonia So" typed in, the first suggestion was Sonia Soto (a two-sentence stub about a translator), followed by imperfect matches for the search term; once I'd typed in "Sonia Soto", it only suggested the translator; I didn't get pointed toward Sotomayor's article until I'd typed in her entire name. My first assumption was that the article title had a diacritic or something that would cause Sonia Sotomayor to be a redirect rather than the article title, but that turned out not to be the case.

I was curious whether this was a more widespread problem, so next I searched for Antonin Scalia, and had similar issues (when I typed "Antonin Sca", the first suggestion was Antonio Scarfoglio). Trying again, I searched for Joe Biden; when I typed "Joe Bi", the first suggestion was instead Joe Biden Supreme Court candidates. At this point, my suspicion was that the search algorithm was choosing to suppress the articles of political BLPs specifically - but then I found two counterexamples soon afterward. Bill Clinton showed up successfully as the first suggestion for "Bill C", whereas Reese Witherspoon was nowhere to be found when I typed "Reese With" into the search bar. Searching some other topics shows that it's not limited to biographical articles either: I had similar problems trying to search the articles for All Eyez on Me, Chemistry, and Norway, as well as for more niche topics like alkaline noodles. The search problem isn't universal, but it's affected the majority of the titles I've checked, across various obscurity levels and topic areas.

I've tested this on the desktop site and on the app, and found the same issue occurring on both platforms. I haven't been able to identify any clear commonalities between articles that are affected by this search issue. Does anyone know what might be going on? ModernDayTrilobite (talkcontribs) 15:05, 25 April 2024 (UTC)[reply]

Similar, Paula Vennells was raised earlier on the Help Desk. DuncanHill (talk) 15:09, 25 April 2024 (UTC)[reply]
FWIW, I am unable to reproduce any of the above problems. When I type the first few characters of the names of any of those people or articles, I get the expected article as one of the first two results (i.e. "chem" shows "Chemistry" as the second result). – Jonesey95 (talk) 16:28, 25 April 2024 (UTC)[reply]
I am getting the same problems. Edge on Win 11, Monobook. DuncanHill (talk) 16:46, 25 April 2024 (UTC)[reply]
For reference, the hardware I've tested on includes Google Chrome on Windows 7, and the Wikipedia app on an iPhone 13 Mini (running iOS 17.4.1). I just now tested the Wikipedia mobile website (using Safari on the same iPhone) and reproduced the issue there as well. ModernDayTrilobite (talkcontribs) 17:37, 25 April 2024 (UTC)[reply]
I'm getting the same behavior both in my Firefox Wikipedia search bar and on the desktop site. Some pages, like Abbott Elementary, don't get suggested unless the full title is typed in with correct capitalization. Jak86 (talk)(contribs) 18:33, 25 April 2024 (UTC)[reply]
I'm getting this problem with Duocylinder. TypoEater (talk) 18:59, 25 April 2024 (UTC)[reply]
The bug apparently depends on the datacenter you connect to, which depends on your geographical location. Using the WikimediaDebug extension, I can reproduce the problem when connecting to eqiad, but not when connecting to codfw. I filed this as T363516. Matma Rex talk 18:59, 25 April 2024 (UTC)[reply]
I am in the UK. I have no idea which data centre that is. DuncanHill (talk) 19:02, 25 April 2024 (UTC)[reply]
I am also seeing this: Searching for David Gilmour gives me David Gilmour Blythe, David Gilmour (historian), and David Gilmour (writer) by the time I've typed "David Gilm" but not the Pink Floyd guitarist whose page is just "David Gilmour" until I've typed the entire name, and even then it gives it as "David gilmour". Doc StrangeMailboxLogbook 19:05, 25 April 2024 (UTC)[reply]
Happens here too. Also happens with Google, Brazil, United States. All only show as suggestions when typed out in full. – 2804:F1...07:DBA8 (talk) 19:06, 25 April 2024 (UTC)[reply]
Now 'sonia sotomay' suggests Sonia Sotomayor, but 'Sonia Sotomay' doesn't. Is that normal? – 2804:F1...07:DBA8 (talk) 21:10, 25 April 2024 (UTC)[reply]
Works on the api url Matma Rex used in the report, but doesn't on rest.php, which is what my browser is trying. – 2804:F1...07:DBA8 (talk) 21:20, 25 April 2024 (UTC)[reply]
I see the correct results for 'Sonia Sotomay' now, when connecting to either eqiad or codfw, and when using either rest.php or api.php. I think you might have looked when the index was in the middle of rebuilding, and rest.php may be cached more heavily. Can you try again in a private / incognito browser window? Matma Rex talk 21:25, 25 April 2024 (UTC)[reply]
I only browse on incognito anyways, but I closed it and reopened it and tried it again on the link I used above, still no results
edit: It's working now... guess it was just more cache.
2804:F14:8092:9F01:3468:323E:5807:DBA8 (talk) 21:40, 25 April 2024 (UTC)*edited: 21:57, 25 April 2024 (UTC)[reply]

Redlinked category on js page[edit]

The latest run of Special:WantedCategories features a nonsense Category:+, generated by the use of [[Category:+]] text in User:HovigTheEditor/common.js — but since I don't have "editing other users' js pages" privileges I can't fix it. And while I don't particularly understand what the code is there for, it might very well be there for a perfectly valid purpose, but would still have to be coded in a way that it isn't causing the js page to become directly filed in a redlinked category itself since the text is obviously not intended to actually categorize things as plus-sign per se. So could somebody with the necessary privileges look into fixing this? Bearcat (talk) 18:00, 25 April 2024 (UTC)[reply]

Fixed. * Pppery * it has begun... 18:07, 25 April 2024 (UTC)[reply]

Template assistance needed[edit]

If any template coding gurus here have the time or desire to assist at Template talk:GTA table#Is this table getting too wide?, it would be greatly appreciated. We have run into a minor formatting concern, and for the most part, have agreed on a new format that will solve the problem. Unfortunately, we need some technical assistance to move forward. Thank you. -- GoneIn60 (talk) 20:41, 26 April 2024 (UTC)[reply]

Lua date formats[edit]

Hello everyone, does anyone know how to get Lua accepted two date format at the same time? That is. YYYY-MM-DAY and DD-MM-YYYY. I have tried my all to get them both work together at the same time in lua module Wikipedia but that's impossible for me. Only one type of date format can only work at the same time.
Thisasia  (Talk)
06:40, 27 April 2024 (UTC)[reply]

Accepting a date like 01-02-2020 would not be a good idea at Wikipedia where some would think January 2, 2020 while others would see 1 February 2020. Where is this needed? Johnuniq (talk) 08:09, 27 April 2024 (UTC)[reply]
alright thanks for telling me that, I'm build a new dynamic and multipurpose infobox in lua by integrating all functionality in one Template, but the current programed date format is in something like 01-02-2020 so which date format is well acceptable for Wikipedia?
Thisasia  (Talk)
09:43, 27 April 2024 (UTC)[reply]
YYYY-MM-DD
Trappist the monk (talk) 11:05, 27 April 2024 (UTC)[reply]
See more at MOS:DATEFORMAT. YYYY-MM-DD is the only allowed format using a number for the month. PrimeHunter (talk) 12:04, 27 April 2024 (UTC)[reply]
@PrimeHunter noted that, I have changed it, thanks for your reply.
Thisasia  (Talk)
12:44, 27 April 2024 (UTC)[reply]
Thanks for your reply.
Thisasia  (Talk)
12:45, 27 April 2024 (UTC)[reply]
Module:Date accepts a variety of dates formats, for example, 2024-04-27 or 27 April 2024 or April 27, 2024 (all allowed at Wikipedia) and only allows valid dates. Johnuniq (talk) 03:47, 28 April 2024 (UTC)[reply]
Got it, Thanks very much for pointing out.
Thisasia  (Talk)
05:00, 28 April 2024 (UTC)[reply]
seconding YYYY-MM-DD which is not only the most logical but also sorts properly and is an international standard jp×g🗯️ 19:00, 28 April 2024 (UTC)[reply]
Why are we going through this again when MOS:DATE was settled years ago? We don't use all-numeric dates except in certain special situations, and even then, only CCYY-MM-DD is permitted. If you want that changing, WT:DATE is the place to do it but (i) make sure that you inform WP:VPP; (ii) be prepared for massive kickback. --Redrose64 🌹 (talk) 22:07, 28 April 2024 (UTC)[reply]
Ah I see, well I wasn't actually aware of the standard at first I'm now familiarising with the policy.
Thisasia  (Talk)
04:49, 29 April 2024 (UTC)[reply]

DOI-based unreliable/deprecated tagging error[edit]

Resolved

Please see the note I left here; there seems to be an implementation error in the tagging system for deprecated sources based on DOI. 100.36.106.199 (talk) 13:10, 27 April 2024 (UTC)[reply]

Strange line breaks in external URL?[edit]

I'm seeing external link URLs have line breaks is the middle of the URL. The example shown is from Special:Permalink/1221061666#c-RoySmith-20240427164200-Hawkeye7-20240426124700. The URL is marked up as:

<a rel="nofollow noopener noreferrer" class="external free" href="https://peterbondspace.com/" target="_blank">https://peterbondspace.com/</a>

and the applicable CSS according to Chrome is:

.mw-parser-output a.external.free {
    word-break: break-all;
}

Is there some (good) reason break-all is being used here, or is that just a bug in the CSS? RoySmith (talk) 16:57, 27 April 2024 (UTC)[reply]

This is apparently intentional; see phab:T327334. Suffusion of Yellow (talk) 17:22, 27 April 2024 (UTC)[reply]
It is to avoid urls from overflowing the viewport and infoboxes etc. This only applies to direct links, with no display contents and without wikicode [] surrounding them. Because we know so little about the length and context of a link (think 140 continuous characters for a link component sometimes), we have to be a bit more forceful with their linebreaking. Normal 'external' wikicode links break on word boundaries, because in those situations people generally have been more deliberate with placement and for display names, words are generally a lot smaller. —TheDJ (talkcontribs) 17:23, 27 April 2024 (UTC)[reply]
OK, that makes sense, thanks. RoySmith (talk) 19:04, 27 April 2024 (UTC)[reply]
@RoySmith well from what you highlighted, the css style seems to be applied to the url link text and not the url itself otherwise the url won't work nor even be accessible because no gap or space are allowed in the url . The word-break:break-all; in css means that it will adjust every items in their html container once they reach the maximum width limits, thus preventing them from overflowing, as you highlighted here,<a>https://peterbondspac
e.com/
</a> this was treated as the link text and not the url itself
Thisasia  (Talk)
17:34, 27 April 2024 (UTC)[reply]
Using Firefox 125.0.2 and Windows 10, when logged out, I see the offending wrapping in the example of the original post. This also occurs if I switch skin to legacy Vector (by inserting &useskin=vector into the URL), Cologne Blue or Modern. But if I switch skin to MonoBook (in a similar manner), I then get no wrapping. It's therefore a skin thing. --Redrose64 🌹 (talk) 18:05, 27 April 2024 (UTC)[reply]

Graph:PageViews[edit]

I have an idea that would remove several thousand talk pages from Category:Pages with disabled graphs, by changing Template:Graph:PageViews to display a link to https://pageviews.wmcloud.org/. If you know how to do (what I think is) straightforward template work or otherwise have views about this, please see Template talk:Graph:PageViews#Change this to a link. WhatamIdoing (talk) 04:19, 28 April 2024 (UTC)[reply]

Strange bug on Flag of Russia article[edit]

Is anyone else also seeing this bug on Flag of Russia? There are two major headers saying "User:CheezDeez ON TOP" that appear inside the infobox (this user is also blocked for sockpuppetry, but I don't think they have ever edited this article). I can't find anything in the wikitext that might produce this text, and the bug also doesn't show up in preview mode either. Liu1126 (talk) 13:41, 28 April 2024 (UTC)[reply]

I was reverting all these edits when it was happening (in this specific case, Special:Diff/1221172528), but it seems this article didn't refresh when I undid the changes. I gave the page a null edit, and the content is fixed again now. Aidan9382 (talk) 13:44, 28 April 2024 (UTC)[reply]
Ah, that explains it. Thanks for reverting! Liu1126 (talk) 13:48, 28 April 2024 (UTC)[reply]
Hi! I noticed the same issue in the Haaretz article (Template:Literal translation) and the Tiger article (Template:MirrorH). I see you've already reverted the vandalistic changes to both templates, but the articles I linked don't appear to have been refreshed yet. Could you refresh them as well, or otherwise let me know how I could do that? Thanks! Wavevari (talk) 15:17, 28 April 2024 (UTC)[reply]
I've gone ahead and fixed those pages. The process is called a null edit, though purging the page normally would probably also work. Aidan9382 (talk) 15:26, 28 April 2024 (UTC)[reply]
Thank you for the fixes and for the additional information! Wavevari (talk) 15:30, 28 April 2024 (UTC)[reply]
It’s the same for the Vagina article. Autisticeditor 20 (talk) 17:40, 28 April 2024 (UTC)[reply]
never mind Autisticeditor 20 (talk) 17:42, 28 April 2024 (UTC)[reply]

Erroneous page archiving by ClueBot III[edit]

ClueBot III (talk · contribs · count · logs · page moves · block log · edit summaries) seems to be occasionally archiving pages incorrectly to Archives/_1 and ignoring the configuration on the page. Examples from various namespaces: 1, 2, 3, 4. This was reported on the ClueBot Commons talk page yesterday by @MrPersonHumanGuy: ping. Other examples can be found in the contributions log. Local Variable (talk) 13:51, 28 April 2024 (UTC)[reply]

The four pages have one things in common: inside the {{User:ClueBot III/ArchiveThis}}, the first part of the |archiveprefix= parameter does not begin with the name of the page that is being archived. For three of the four, this is because a page move occurred at some point in the recent past and the archiving config wasn't amended to suit; in the case of User talk:Spiderjiu it's because the archiving was set up badly. The other main archiving bot, lowercase sigmabot III (talk · contribs), guards agains this by refusing to archive a page when the first part of the |archive= parameter does not begin with the name of the page that is being archived. --Redrose64 🌹 (talk) 17:27, 28 April 2024 (UTC)[reply]
@K6ka has since updated the docs to advise editors to change the template when moving the page (I'm not overly optimistic editors will heed that warning). Local Variable (talk) 23:26, 28 April 2024 (UTC)[reply]

“Request Desktop Site” on IPad does not work[edit]

I would like to use Desktop mode while on my iPad (IPad Air gen 4, IpadOS 17 , safari)

Although I have “request desktop site” selected, Wikipedia redirects to Mobile (en.m.wikipedia.org)

How can I use desktop Wikipedia on iPad? Tonymetz 💬 17:22, 28 April 2024 (UTC)[reply]

@Tonymetz: "request desktop site" is a feature in some mobile browsers. I don't know whether it's supposed to work with Wikipedia. The normal way to choose the desktop version of Wikipedia is the "Desktop" link at the bottom of pages in the mobile version. The link is made by MediaWiki and not the browser. PrimeHunter (talk) 17:47, 28 April 2024 (UTC)[reply]
In fact, the browser feature does not work. phab:T60425 is the task for it. Izno (talk) 18:14, 28 April 2024 (UTC)[reply]
Thanks I’ve subscribed. 11 years let’s keep our fingers crossed. Thanks for the tip on the desktop link I see it now. It had been cut off by my iPad keyboard bar. Tonymetz 💬 22:06, 28 April 2024 (UTC)[reply]
There are userscripts that will auto redirect you from the mobile to the desktop site, User:Þjarkur/NeverUseMobileVersion for instance. -- LCU ActivelyDisinterested «@» °∆t° 18:24, 28 April 2024 (UTC)[reply]

Removing gap between templates[edit]

After updating the template styling of my user page, I managed to get most things as I wanted except for a gap between the "Start tab" template and the bordered box that comprises the rest of the page. Is there a way I could put the bordered box into the template, or make an adjustment to how they are configured, to remove the gap between them? -CoolieCoolster (talk) 23:26, 28 April 2024 (UTC)[reply]

@CoolieCoolster i have seen your page, are you referring to the gap between the "start tab" and your userboxes section, if so then I can help you with that or can you be more specific and explain properly? You may discuss with me on my talk page if I didn't respond here on time.
Thisasia  (Talk)
05:23, 29 April 2024 (UTC)[reply]
I meant the thin white line that appears between the template that creates the tabs and the section that encloses the rest of the page's content. As I reused the format on the other three tabs, each one has the same white gap. -CoolieCoolster (talk) 05:26, 29 April 2024 (UTC)[reply]
OK the thin whit
line e u are talking abo are you referring the start tab or your userboxe table? t
Thisasia  (Talk)
05:29, 29 April 2024 (UTC)[reply]
Above that; it splits the dark red section at the top in two.-CoolieCoolster (talk) 05:41, 29 April 2024 (UTC)[reply]
Pretty not much clear, but see what I found so far.
  • there is a huge gap between the start tab and your userboxes section may be making it look unsatisfying since you applied the same background color to both of them
  • there is also a thin line that appears at the start tab when scrolled from either left or right. But except that I couldn't figure anything else.

Thisasia  (Talk)
05:54, 29 April 2024 (UTC)[reply]
I'm guessing the first issue you described is what it is; both halves using the same color is intentional, as ideally I'd like to find a way for the content of the page to be within the box connected directly to the tabs, but doing so while also having a border around the page seems to be a conundrum. -CoolieCoolster (talk) 06:36, 29 April 2024 (UTC)[reply]
Alright I do have solution for that. If you do permit me i will edit your page directly, and after that if that's not what you described we can find further. But first of all, take a look at the top of this page, it has similar start tab as yours and the start tab isn't separated from the rest of the page unlike yours that splits, check and tell if this is actually your point.
Thisasia  (Talk)
07:02, 29 April 2024 (UTC)[reply]
Move the closing div tag to after the table...then reduce the border width? — GhostInTheMachine talk to me 07:07, 29 April 2024 (UTC)[reply]
Someone did that for me earlier today it seems, so the issue has been resolved, but thanks for the help! -CoolieCoolster (talk) 18:52, 29 April 2024 (UTC)[reply]

Curious ephemeral js error[edit]

I turned on the "display js errors" gadget a few days ago. Today I got an error something like "unhandled exception missing ) for argument list line 23". Since the gadget pop-up fades away quickly, I refreshed the page a few times to try and select and copy the error. I then took a look at the source: line 23 is (for me) }];});});</script>. After looking at this I tried again to copy the error, but it had gone. I compared the script which runs from line 6 to 23 before an after the error with an on-line diff, no apparent difference.

Anyone know why this might have happened? All the best: Rich Farmbrough 08:34, 29 April 2024 (UTC).[reply]

I got it too, so I filed phab:T363701. It happened whenever the CentralNotice banner for the U4C voting was displayed. But it stopped at some point even when I got the banner. I wonder if something was backported and fixed it. Nardog (talk) 22:44, 29 April 2024 (UTC)[reply]
The banners are maintained on Meta-Wiki as wiki pages. You can find them on m:Special:CentralNotice, if you can figure out the interface (I struggle with it). I think this was the edit that fixed it: https://meta.wikimedia.org/w/index.php?title=MediaWiki:Centralnotice-template-u4c_election2024_vote2&diff=prev&oldid=26702487 Matma Rex talk 09:18, 30 April 2024 (UTC)[reply]

Help with regex statement[edit]

Hi, I need help with the following regex, which I did not write and don't understand well enough to fix. That statement is:

(?<!/)(?<!\\?url=)https?://(?:[\\w-]+\\.)*wikisophia[.]org[\\w/.\\-#?&=]*

The intent is to match all URLs such as:

http://wikisophia.org/index.php?title=Constitution_Act,_1871_(annotated)

But not archive URLs such as:

https://web.archive.org/web/20010101010101/http://wikisophia.org/index.php?title=Constitution_Act,_1871_(annotated)
https://webcitation.org/fgT654?url=http://wikisophia.org/index.php?title=Constitution_Act,_1871_(annotated)

Currently the regex is only partially matching and returning:

http://wikisophia.org/index.php?title=Constitution_Act

..anything after the "," is not matched. Same if there is a ":" or other similar characters.

Suggestions? -- GreenC 19:21, 29 April 2024 (UTC)[reply]

You need to add the relevant characters (possibly escaped?) to [\\w/.\\-#?&=]. Izno (talk) 19:59, 29 April 2024 (UTC)[reply]
Almost any character can appear in a URL, especially after ?title=. It may be better to accept anything except whatever delimits a URL in the relevant context, e.g. for parsing {{cite web|url=http...}} use [^|}]* or for space-delimited [http... Description of page] try \\S*. The former may pick up unwanted spaces unless we complicate it as something like .*?(?=\\s*[|}]) (grab any characters, but as few as possible, as long as optional spaces then | or } follows). Certes (talk) 00:14, 30 April 2024 (UTC)[reply]
OK, building on that idea, this solution is imperfect, but it will work in most cases. I'm not using it for critical purposes (log files, counting) so YMMV:
(?<!/)(?<!\\?url=)https?://(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])[.])*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])*wikisophia[.]org[^\\s\\]|}{<]*[^\\s\\]|}{<]*
The gobbly between https and wikisophia is for matching hostname(s) at multiple levels per this. -- GreenC 05:34, 30 April 2024 (UTC)[reply]
In case anyone is trying this regex, it had an error corrected: Special:Diff/1221562167/1221571619 -- GreenC 18:16, 30 April 2024 (UTC)[reply]

How does one correct a citation when the source is listed dozens of times?[edit]

In the entry on lyricist Robert Hunter, I noticed that at some point an editor must've accidentally cited another source that's already cited 22 times in the article. There are only three 2015 sources used, so perhaps someone inadvertantly used the wrong one. At any rate I tried to fix it using the visual editor and, while it corrected the citation, it left it with the wrong footnote number still. So I undid my failed correction and left a note on the article's Talk page. Correcting simple sources that are only cited once is pretty straightforward, but when they're used dozens of times it's another (way too intimidating) matter. Or am I simply not able to find "the easy way"? Peterh6658 (talk) 23:22, 29 April 2024 (UTC)[reply]

@Peterh6658: I've made the change you wanted, and given a link to how I did it on the article talk page. DuncanHill (talk) 23:33, 29 April 2024 (UTC)[reply]
Thanks, Duncan! I hope I wasn't out of line with that crack about the process being way too intimidating. (Another Maxwell Smart catchphrase.) I'm still a relatively new Wikipedian, and can never remember the best shortcut to help me remember that ref name technique. Peterh6658 (talk) 23:51, 29 April 2024 (UTC)[reply]
You can make this change in the visual editor too, but it's not very intuitive. There are two ways you could do it:
  1. After you select the reference marker (i.e. the "[5]"), instead of clicking "Edit" in the menu, you can just delete it (press Delete/Backspace on your keyboard), and then copy-paste the right reference marker in its place (i.e. the "[2]").
  2. Or, after you click "Edit" in the reference menu, you can click on "Change reference type" in the bottom-left corner, which will open the "Replace citation" menu – in that menu, go to "Re-use" and choose the correct citation from the list.
Hope that helps in your future editing. Matma Rex talk 10:00, 30 April 2024 (UTC)[reply]

Tech News: 2024-18[edit]

MediaWiki message delivery 03:31, 30 April 2024 (UTC)[reply]

Video viewing stats[edit]

Hi, is there a way to know how many readers watched a video in an article? Alaexis¿question? 06:30, 30 April 2024 (UTC)[reply]

Yes, you can look up this data using https://pageviews.wmcloud.org/mediaviews/ (although note that it just counts total views, it doesn't show how many are coming from a specific article). For example, here's a chart of page views for a few movies listed on Public domain film: https://pageviews.wmcloud.org/mediaviews/?project=commons.wikimedia.org&platform=&agent=user&referer=all-referers&range=latest-20&files=Night_of_the_Living_Dead_(1968).webm%7CFear_and_Desire_(1953).webm%7CWings_(1927).webm Matma Rex talk 09:31, 30 April 2024 (UTC)[reply]
Thanks! Do you know what counts as a view? According to this tool, this video had very few views, in spite of being used in an article with 30k daily viewers. Does it really mean that very few users choose to watch (admittedly hard-to-watch) video? Alaexis¿question? 14:20, 30 April 2024 (UTC)[reply]
According to GlobalUsage that file isn't used anywhere; I suspect you wanted to look up the stats for this file instead (GlobalUsage), which has more views: [14]. The autocomplete in the mediaviews tool is a bit fiddly sometimes, and apparently doesn't find files that have been renamed, like this one, if you use the redirect name when searching. I didn't know that before. Matma Rex talk 14:51, 30 April 2024 (UTC)[reply]
And to answer your actual question too, the technical documentation about what counts as a media view is available here: https://wikitech.wikimedia.org/wiki/Analytics/Data_Lake/Traffic/Mediacounts Matma Rex talk 14:58, 30 April 2024 (UTC)[reply]
This reminds me that if we ever make videos 'preload' by default, these stats will break, because every pageview will preload the first bytes of a file... —TheDJ (talkcontribs) 17:12, 30 April 2024 (UTC)[reply]

PETSCan and Images[edit]

I am looking to source free images for articles on plant genera that are lacking them. Therefore I was wondering whether it was possible to configure PETScan only to return pages which do not contain images. The closest thing I thought of was to show images from the metadata in the output and then scroll through them, looking for those for which no image is presented. However, that is getting progressively tedious. Does anyone know a more direct way to do this? Felix QW (talk) 09:33, 30 April 2024 (UTC)[reply]

Not an answer to your question, but the search facility may help you. A search for plant hastemplate:"automatic taxobox" insource:/image *= * returns 16,436 results with an image parameter in the taxobox. Note, it's not restricted for genera and some may have empty taxobox image parameters. Then a search for plant hastemplate:"automatic taxobox" -insource:/image *= * finds 1,298 results without the image parameter, most of which appear to be genera. The search can probably be refined. —  Jts1882 | talk  10:57, 30 April 2024 (UTC)[reply]
Thank you for the interesting suggestion! It does seem to me that empty taxobox image parameters are quite common, but then again, it is not like I am not going to ever finish this task. PETScan has the additional advantage of alphabetical sorting, so it is consistent across searches, and I can exclude pages linked from my userspace list of taxa for which I have already searched for images without any success. Therefore, a PETScan-based method seems preferable to me at the moment. Felix QW (talk) 12:33, 30 April 2024 (UTC)[reply]

pagelinks normalization[edit]

The pagelinks table is about to lose its pl_namespace and pl_title columns. This may break some tools and reports. Certes (talk) 15:26, 30 April 2024 (UTC)[reply]