Jump to content

Wikipedia:Village pump (technical): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 339: Line 339:


Hello! Can someone experienced in the translation feature in Commons help me with adding translation and language tags to some project pages? The pages and the details can be found [https://commons.wikimedia.org/w/index.php?title=Commons:Translators%27_noticeboard&oldid=628251358#General_help_-_Translation here]. I asked in the Translators' noticeboard there but I didn't get an answer and thought that maybe I can have some more luck here. Any kind of help would be appreciated as I've never had a chance to work with that feature before. - [[User:Klein Muçi|Klein Muçi]] ([[User talk:Klein Muçi|talk]]) 03:35, 8 February 2022 (UTC)
Hello! Can someone experienced in the translation feature in Commons help me with adding translation and language tags to some project pages? The pages and the details can be found [https://commons.wikimedia.org/w/index.php?title=Commons:Translators%27_noticeboard&oldid=628251358#General_help_-_Translation here]. I asked in the Translators' noticeboard there but I didn't get an answer and thought that maybe I can have some more luck here. Any kind of help would be appreciated as I've never had a chance to work with that feature before. - [[User:Klein Muçi|Klein Muçi]] ([[User talk:Klein Muçi|talk]]) 03:35, 8 February 2022 (UTC)

== imdbtitle external wikilink? ==

* <nowiki>[[imdbtitle:4699982|Rebellion]]</nowiki> = [[imdbtitle:4699982|Rebellion]]
* <nowiki>{{IMDb title | id= 4699982 | title= Rebellion}}</nowiki> = {{IMDb title | id= 4699982 | title= Rebellion}}
::: [[User:0mtwb9gd5wx|0mtwb9gd5wx]] ([[User talk:0mtwb9gd5wx|talk]]) 04:46, 8 February 2022 (UTC)

Revision as of 04:46, 8 February 2022

 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).

Newcomers to the technical village pump are encouraged to read these guidelines prior to posting here. If you want to report a JavaScript error, please follow this guideline. Questions about MediaWiki in general should be posted at the MediaWiki support desk. Discussions are automatically archived after remaining inactive for five days.


Email notifications - Phabricator

Currently, the emails you receive from Phabricator lack an "Unsubscribe" kind of button that would mute the task they were coming from without you having to go there and mute it manually. Or do they? Is there a way I can do what I want to do? Should I consider asking at Phab for that as a new feature? - Klein Muçi (talk) 13:34, 2 February 2022 (UTC)[reply]

Suggest checking on this at mw:Talk:Phabricator/Help. — xaosflux Talk 13:59, 2 February 2022 (UTC)[reply]
@Xaosflux, thank you! I was checking in Phabricator to see if there was a place like this but I didn't find one. I guess that will do.
You know we already talked together a very similar thing but I keep getting 5-10 emails per day from Phabricator lately and things are quickly going out of hands. - Klein Muçi (talk) 14:04, 2 February 2022 (UTC)[reply]
@Klein Muçi: The frontpage at https://phabricator.wikimedia.org/ has a link where to "ask questions about Phabricator itself". I'd like to know where else to link it, as you could not find the place. --AKlapper (WMF) (talk) 08:26, 3 February 2022 (UTC)[reply]
@AKlapper (WMF), maybe not the right place but I checked the sidebar and then here: https://phabricator.wikimedia.org/applications/ (before giving up and coming to ask here). - Klein Muçi (talk) 11:17, 3 February 2022 (UTC)[reply]

AfC Random submission broken

https://iw.toolforge.org/randomincategory/Pending_AfC_submissions%26server%3Den.wikipedia.org%26namespace%3D2!118%26type%3Dpage

The Random Submission button found on AfC project page is leading to a category searchbar instead of finding a random submission.Slywriter (talk) 18:05, 2 February 2022 (UTC)[reply]

@Slywriter: That means there are no pages in that category. ― Qwerfjkltalk 21:11, 2 February 2022 (UTC)[reply]
If only that were true, but the general category has over 3k submissions. Hint hint for any experienced editors reading along that AfC can ALWAYS use help.Slywriter (talk) 21:30, 2 February 2022 (UTC)[reply]
@Slywriter Something's wrong with my random in category tool. I'll look into it. --Ahecht (TALK
PAGE
) 21:19, 2 February 2022 (UTC)[reply]
Thanks.Slywriter (talk) 21:30, 2 February 2022 (UTC)[reply]
@Slywriter It should be working now. Long story short, WP:ITSTHURSDAY. Toolforge is still running an old version of PHP that defaults to using HTTP/1.0. A few hours ago a new version of mediawiki was deployed whose API requires HTTP/1.1 (see WP:ITSTHURSDAY), so I had to tweak the code to make it work. --Ahecht (TALK
PAGE
) 22:08, 2 February 2022 (UTC)[reply]
But but its still Wednesday. Seriously, thanks. Glad it was a "small" issue.Slywriter (talk) 22:15, 2 February 2022 (UTC)[reply]
Seems to be related to phab:T300366 and phab:T271421. --Ahecht (TALK
PAGE
) 22:24, 2 February 2022 (UTC)[reply]
WP:THURSDAY comes a bit early for the non-Wikipedias. ;-) Whatamidoing (WMF) (talk) 20:58, 4 February 2022 (UTC)[reply]

Get matched string in replace function

I'm wondering if it's possible to get the matched pattern text and use it in the replace string. For example:

Wiki Source Rendered Result
{{#invoke:String
|replace
|text text... [[other text]] more text
|[[.*]]
|<b>.*</b> additional text
|plain=false
}}
Original text to be replaced:
text text... other text more text

What I'd like the result to be:
other text additional text

As you can see, what I desire is that any time [[.*]] is matched, I would like to use the text that matched (the ".*" in this example) in the replacement string. Is this in any way possible? ― Levi_OPTalk 16:29, 2 February 2022 (UTC)[reply]

Put the text you want to capture in parentheses in your search pattern, and %1 in your replacement pattern: {{#invoke:String|replace|foo bar Baz boz|[A-Z]([a-z]+)|Q%1Q|plain=false}} produces foo bar QazQ boz. %2 will be replaced with the second capture group, and so on.
The search pattern in your invocation above doesn't work. Lua uses a horrifically neutered variant of regular expressions, and I haven't been able to come up with a pattern that non-greedily matches up to a pair of close brackets, or even a single close bracket. Escaping the open (and close!) brackets with %[ and %] prevents your pattern from erroring out, at least. —Cryptic 16:53, 2 February 2022 (UTC)[reply]
Luckily, the brackets were only an example and I don't need to use them in my actual application. Thanks for the help though. I now see the section at Help:Manipulating strings that talks about this. ― Levi_OPTalk 16:59, 2 February 2022 (UTC)[reply]
%[%[(.-)%]%] matches the contents of a link non-greedily, leaving the innards in %1, but won't handle nesting such as [[File:appletree.jpg|An [[apple]] tree]]. Certes (talk) 17:25, 2 February 2022 (UTC)[reply]
It should, but it doesn't. {{#invoke:String|replace|text text [[it didn't work]] more text|%[%[(.-)%]%]|it worked!}} should produce "text text it worked! more text", but instead gives "text text it didn't work more text". —Cryptic 18:11, 2 February 2022 (UTC)[reply]
Umm, |plain=false:
{{#invoke:String|replace|text text [[it didn't work]] more text|%[%[(.-)%]%]|it worked!|plain=false}} – capture not used here
text text it worked! more text
Trappist the monk (talk) 18:35, 2 February 2022 (UTC)[reply]
That sound you hear is my head thunking against a wall. Thanks. —Cryptic 18:39, 2 February 2022 (UTC)[reply]
@Levi OP: A belated thought: %b[] should handle nested wikilinks such as my apple tree example, as long as there are no unpaired single [ or ] characters in the caption. Details: mw:Extension:Scribunto/Lua reference manual, search for "%b". Certes (talk) 11:17, 4 February 2022 (UTC)[reply]
Like I said above I wasn't actually handling brackets or wikilinks when I was using it; It was just an easy example. Cool to know and helpful to learn, though. ― Levi_OPTalk 13:41, 4 February 2022 (UTC)[reply]

Generic last name

Hello! In the article List of most-played video games by player count, ref 13 has the error of |last1= has generic name. I attempted to fix it by just moving the last name to be part of the first name, however that just made the error worse. The ref does not give an actual author name and instead just lists the author as "Guest Author (sponsored)". What do I do here? ― Blaze WolfTalkBlaze Wolf#6545 21:31, 2 February 2022 (UTC)[reply]

Is it really important that your ref displays "Guest Author"? Why not just omit it? {{cite news}}'s documentation says to give it an explicitly-blank author parameter, but it works fine even without that. —Cryptic 21:46, 2 February 2022 (UTC)[reply]
@Cryptic: Didn't know that would work since it threw another error when the |last1 parameter was empty. ― Blaze WolfTalkBlaze Wolf#6545 21:50, 2 February 2022 (UTC)[reply]
@Blaze Wolf You can't have |first1= without |last1=. If you remove both it should work. --Ahecht (TALK
PAGE
) 22:39, 2 February 2022 (UTC)[reply]
The error is accidentally highlighting the poor quality of the source. The cited source is a sponsored post that looks like a press release. The real solution is to find a reliable source to support the claim in the article. – Jonesey95 (talk) 22:45, 2 February 2022 (UTC)[reply]
The help link in the error message says:
False positives are possible. When the name is valid, wrap the parameter value in the accept-this-as-written markup:
|author=((Super User))
The actual credit in the source is "Guest Author (Sponsored)". When the website explicitly says this, I think it's misleading if the citation only specifies the website as source. You could write |author=((Guest Author (Sponsored))) to display what the website says without getting the error message. Or look for a better source. PrimeHunter (talk) 04:58, 3 February 2022 (UTC)[reply]

Empty, but not empty? categories

I have a strange problem involving, of course, categories. The categories state that they aren't empty. If you look at Category:Empty categories awaiting deletion, you can see a few categories that indicate they have one or two pages in them, including Category:2000 establishments in Angola, Category:2022 Polish television seasons, Category:2022 Thai television series endings, Category:2022 Winter Olympics pictograms, Category:2004 Croatian television series endings and Category:2009 Peruvian television series endings are some examples you can see in the Empty Categories category.

And, if you look at these category pages, there is a bright red message "This category does not appear to be empty!". But the categories are, in fact, empty. I thought this might be a problem with a system lag or something (a layman's guess) and I was going to add this message last night when I noticed the problem but decided to wait to see if it went away. But they still appear to be non-empty empty categories. I did a "purge cache" and still, no change. I've been working with empty categories since 2015 and I've never seen this happen before.

Of course, as far as technical problems go, this is more of a curiosity than anything else but I wondered if anyone had an idea why this would suddenly happen now, and to more than one category page. Thank you. Liz Read! Talk! 23:05, 2 February 2022 (UTC)[reply]

@Liz: that red error is from the db template making use of the PAGESINCAT magic word; it is not reliable as it is subject to database and replication lag, which can't be fixed with a purge (phab:T85696). So either ignore it, or wait. — xaosflux Talk 23:33, 2 February 2022 (UTC)[reply]
The code is in Template:Db-c1: {{#ifeq:{{PAGESINCAT:{{PAGENAME}}}}|0||{{error|This category does not appear to be empty!}}}}. "does not appear" is a hint that it may not be certain. If it's currently very uncertain then we could state it more clearly or link a page which mentions the issue. PrimeHunter (talk) 04:28, 3 February 2022 (UTC)[reply]
Well, I don't quite understand but I appreciate the explanations. That doesn't have to do with your explanations but my lack of understanding of templates and all things database. It's nice that others can figure out what is going on when weird, unexpected things happen. Many thanks. Liz Read! Talk! 05:40, 4 February 2022 (UTC)[reply]
Today we ran a script to recount categories so that counts are well, correct. It's possible said script has a bug or there's some other race condition going on. I re-opened T299823 for now. Legoktm (talk) 08:11, 4 February 2022 (UTC)[reply]
Okay, Legoktm, another VERY LITTLE BUG which can drive CSD patrolling admins a little nuts. Category:Candidates for speedy deletion as spam always has 1 page too many in the content listing (see right-side listing of categories on the page). If there are 2 pages in this category, it will say there are 3 pages. But mostly, it says there is 1 page when the category is actually empty.
A few weeks ago, the CSD categories were completely out-of-whack but this is a very specific mistake that is only happening in the Spam CSD category but it's been a couple of days now. Admins who patrol CSD categories like to clear them out so to still have a 1 page indicated when the category is empty can be a little irritating. Not, stop the world irritating, but if you have a solution, that would be awesome! Thank you. Liz Read! Talk! 05:08, 6 February 2022 (UTC)[reply]
@Liz: There is a long-standing known bug causing counts to be wrong. Basically whenever a page is added or removed to MediaWiki, it just adds +1 or -1 to the count, so if that fails for any reason, there will permanently be one more or less page in the category and it just tends to get worse over time. The first step to making that less worse is T299823, which I mentioned earlier. We now recount all categories from scratch on the first of the month.
The second part is T85696, which once deployed (still in progress) will let you purge the category page to recount it from scratch. Hopefully that'll be available in a few weeks and then in the future if you find a category with counts that are off, purging it will do the trick. Legoktm (talk) 06:29, 6 February 2022 (UTC)[reply]

API policy question

I am considering writing a script to analyze data from WP:AIV. The script will need to query about 10,000 diffs using the compare action of Wikipedia's API. The script is purely read-only: I am not making any edits, just downloading the JSON outputs for offline use. I have read MediaWikiWiki:API:Etiquette and don't want to run anything that exceeds a reasonable rate of API requests. My questions are:

  • Is running my script allowed by policy?
  • Do I need to get BRFA approval to proceed?

I am willing to spread the API requests out over time and limit myself to batches of 500 requests at a time. I appreciate any technical advice from more seasoned editors as this is my first foray into using the API. Best, Altamel (talk) 03:55, 3 February 2022 (UTC)[reply]

  • Yes
  • No (you are not doing any actions that modify en.wp)
TheDJ (talkcontribs) 09:23, 3 February 2022 (UTC)[reply]
Yup, that. Not something that the English Wikipedia will care about - however if you do flood the server developers may shut you down. Your request is really not "that big" in the grand scheme (20x 500 result requests) - just don't do something silly like make 10000 individual requests - each with a new session - and all in parallel :D — xaosflux Talk 10:48, 3 February 2022 (UTC)[reply]
@Altamel: just to be clear, don't make 500 requests at the same time, requests should be made in series, not in parallel. Legoktm (talk) 08:09, 4 February 2022 (UTC)[reply]
Hope we didn't confuse you with terms - yes you can make 1 "request" that has 500 results; then repeat that process in series, 20 times. If you really have to you could make 10,000 requests, but also do them in series - and if it is public-read only data: skip authentication steps too. Don't make hundreds of parallel requests. — xaosflux Talk 15:24, 4 February 2022 (UTC)[reply]
The compare API only supports one result at a time. Though I'm not sure @Altamel why you want to query diffs. Sounds like you'd be better off querying the revisions, which can be done in bulk (50 revisions per request, although if you have a bot account you could upto do 500 {but there's a 12 MB size limit on the API response which 500 revisions could break}) and then compute the diffs locally. – SD0001 (talk) 15:51, 4 February 2022 (UTC)[reply]
@TheDJ, Xaosflux, and Legoktm: thanks everyone for the replies. Good to know this is a permissible use of the API, though I must admit I am still a little confused about the difference between parallel and series. I have not run any requests en masse yet (still testing small bits of code in the API sandbox). So to clarify – even though I can't pipe requests for the compare API, if I write the code so that it waits until a JSON is returned, and then loops back to making the next request, and repeat that 10,000 times – that's what you mean by making requests in parallel?
SD00001, I did not know that the compare API can only handle one revision at a time – thanks for the clarification. That explains why my tests in the API sandbox, where I tried to use the pipe character to request multiple revisions at once, kept returning errors. I had planned to use diffs because it was easier to match up the content that was added with the account that added it – as you pointed out, otherwise I would have to back out the diffs manually. Altamel (talk) 19:55, 5 February 2022 (UTC)[reply]
Some programming languages/libraries allow for making multiple HTTP requests at the same time (see Asynchronous I/O), which would be requests in parallel. To make requests in series, just wait for the first request to finish and then make the next one. I would recommend using one of the pre-existing API client libraries, they all should take care of that for you. Legoktm (talk) 06:32, 6 February 2022 (UTC)[reply]
@Altamel, why do you want to do that? Whatamidoing (WMF) (talk) 21:08, 4 February 2022 (UTC)[reply]
Whatamidoing (WMF), I am hoping to analyze statistics regarding the frequency of reports and average response times. If I ever find the time to finish the analysis, I might write my results up as a report and offer suggestions for improving AIV. Best, Altamel (talk) 19:55, 5 February 2022 (UTC)[reply]
In that case, would you rather be counting "edits", or would you rather count "comments"? mw:Extension:DiscussionTools has a hidden tag that would let you identify new (signed) comments (e.g., in RecentChanges), and there's a way to identify and count the individual comments on the page, too. Whatamidoing (WMF) (talk) 05:22, 7 February 2022 (UTC)[reply]
@Altamel, take a look at what https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)?dtdebug=1#API_policy_question does to this discussion. Would that kind of comment parsing be more useful to you than the diffs? Whatamidoing (WMF) (talk) 17:30, 7 February 2022 (UTC)[reply]
@Altamel, you may be interested in User:Enterprisey/AIV analysis. I have a document describing the raw data format and can prepare more data over any timespan you want. Enterprisey (talk!) 00:34, 8 February 2022 (UTC)[reply]

Any way to show page preview on a new tab in user scripts?

Hi, I'm currently writing a user script (on a different wiki) and wondering if there's any way to generate page preview from a textbox on a dialog (using jQuery UI). It's a script that asks the user to fill out a bunch of fields and then edits a certain page when the form is submitted, and it'd be best if the user could see page preview on a new tab before posting, when clicking a dialog button. I'm guessing the "preview" parameter of mw:API:Parsing_wikitext could be used or User:SD0001/private-sandbox.js could be forked somehow, but it's just a guess and I'm really not sure exactly how. Do you guys have any idea about this, or know any user script that actually has page preview functionality? Any help would be appreciated. --Dragoniez (talk) 04:58, 3 February 2022 (UTC)[reply]

I don't know why you would want to open a whole new tab instead of a popup like Twinkle does, especially if you already have a dialog. The parse API only gives you the content of the parser output, so you'd have to reconstruct the CSS in the new tab to make it resemble the actual result. I suggest looking at the live preview code (search for "postData") and tinkering with Special:ApiSandbox#action=parse to get what you want. Nardog (talk) 14:36, 3 February 2022 (UTC)[reply]
@Nardog: Thanks for your comment. I'll check it out. (I guess this is a long way to go.) --Dragoniez (talk) 19:47, 4 February 2022 (UTC)[reply]

Problems with navigating wikipedia on Chrome on chromebook OS

"Version 94.0.4606.124 (Official Build) (64-bit)" is the version of Chrome I'm using. This problem has been ongoing for at least two weeks. About 2/5 of the time I click on edit source, the side-scrolling widget on the right side of the editing space will not come up, I have tried disabling my add-ons, without better results. Obviously this greatly hinders my ability to scroll down and up through articles. It doesn't happen when I switch to "visual editing", but I much prefer "source editing". I believe my device updated at around the same time that this problem began.--Phil of rel (talk) 06:40, 3 February 2022 (UTC) Edit: it seems to be happening even in visual editor right now. Even refreshing the page doesn't help.--Phil of rel (talk) 06:46, 3 February 2022 (UTC)[reply]

side-scrolling widget on the right side of the editing space is not standard, so, you're going to have to tell us what you think that is. Izno (talk) 16:56, 3 February 2022 (UTC)[reply]
I'm sorry, it used to come up for me, maybe I'm referring to something different when I use the term "widget", I mean the scrolling bar on the right side of the editing box. It used to come up all of the time, but if you're right and it's just not standard to have a side-scroller, then that answers my query. Thanks.--Phil of rel (talk) 19:44, 3 February 2022 (UTC)[reply]
Your standard scrollbar is missing, is how I read that. Is that correct? Izno (talk) 23:24, 3 February 2022 (UTC)[reply]
That's correct. Phil of rel (talk) 12:49, 4 February 2022 (UTC)[reply]
@Phil of rel, is it broken when you click this link to edit my sandbox? Whatamidoing (WMF) (talk) 21:11, 4 February 2022 (UTC)[reply]
No, it works fine then. Phil of rel (talk) 21:51, 4 February 2022 (UTC)[reply]
@Phil of rel, it's probably a broken script or gadget in your account, then. mw:Help:Locating broken scripts has some advice on how to figure out where the problem is. Whatamidoing (WMF) (talk) 23:34, 4 February 2022 (UTC)[reply]
Thank you for your help. Phil of rel (talk) 00:54, 5 February 2022 (UTC)[reply]

Live preview not working with Vector 2022

File:Vector-2022-preview-problem.webp (direct link)

I'm been using the Vector (2022) for around a year, but strangely, something happened today, when I go into edit source, and then with or without making any changes, clicking the Show Preview button, after which the content area will shrink and the various button at the top of the page will become messy as seen in the attached video. I have tried switching between Firefox, Edge, Chrome, and Brave but all yields the same result. Was there a code update when wrong somewhere? Paper9oll (🔔📝) 07:43, 3 February 2022 (UTC)[reply]

Unified login

When I go to a different language Wikipedia I am automatically logged in with my global account. But when I go to Wikidata or Commons, I usually have to log in again. Is this normal? — Martin (MSGJ · talk) 10:50, 3 February 2022 (UTC)[reply]

@MSGJ: Do you have your browser set to disallow third party cookies or any kind of browser extension that would block them? Does the issue occur on other non-wikipedia sites like meta or wiktionary? All the wikipedias are hosted at variations of the xx.wikipedia.org domain whereas commons and wikidata have different addresses. 192.76.8.77 (talk) 10:56, 3 February 2022 (UTC)[reply]
@MSGJ: unfortunately, yes sometimes: see phab:T217519 for the general problem, phab:T226797 if it is only for a browser in strict mode, and also meta:Community Wishlist Survey 2022/Miscellaneous/Automatically log in to all projects if you are logged in to one for the current wish to fix it. — xaosflux Talk 10:58, 3 February 2022 (UTC)[reply]
Thanks for the quick replies and I'm glad it's not just me. — Martin (MSGJ · talk) 21:09, 3 February 2022 (UTC)[reply]
I can confirm that the same login behavior occurs for me. On a related note, will it be possible to establish a common thread between the supposedly unified logins across Wikimedia, etc. The reason I'm asking is in the Metaverse, someone could pose as me in an alternate universe, and usurp my logins across all universes, eventually. Could WMF assert those same rights to identity for us, right now in the real universe, before a usurped identity metastasizes before our eyes. --Ancheta Wis   (talk | contribs) 23:20, 3 February 2022 (UTC)"[reply]
Ummmm. You already have a unified username/identity/login across all public Wikimedia wikis if that's what you're asking. Legoktm (talk) 08:17, 4 February 2022 (UTC)[reply]
It looks like the answer to my 'usurped identity metastasizes' question is "Wikimedia's implementation of Unified login is the way we are handling Identity.". — Preceding unsigned comment added by Ancheta Wis (talkcontribs) 09:16, 4 February 2022 (UTC)[reply]
So I had to login to Wikimedia to vote Support on a "Disable/enable the unified login" --Ancheta Wis   (talk | contribs) 23:46, 3 February 2022 (UTC)[reply]

Load functions from other user scripts

Hi, this may be a naive question but is it possible to put utility functions I often use in a separate user script and call them in another? Thanks for your help.—182.251.108.127 (talk) 00:22, 4 February 2022 (UTC)[reply]

Yes, you can use something like jQuery's $.getScript to load another JavaScript file from on-wiki and then on its callback, use those functions. Legoktm (talk) 08:13, 4 February 2022 (UTC)[reply]
@Legoktm: I see, thank you! (My IP changed but I’m the OP.) —2001:268:900C:A331:49C7:ACF5:71DF:9DF9 (talk) 11:56, 4 February 2022 (UTC)[reply]

Default to soft redirects in specific scenarios

Would it be possible to make the "Article" tab a soft redirect (not sure if there is a more appropriate technical term)? For example, in the default "Vector" skin, if I am reading the revision history (or talk page, or "What links here") of a redirect and I want to edit the redirect (say, to retarget it or convert it to a disambiguation page), I will click the "Article" tab. This will take me to the target of the redirect rather than the redirect itself, when the latter is what I intended. (e.g. user is reading page history of UK → user clicks "Article" tab to make a change → user is redirected to United Kingdom → user must click "(redirected from UK)" to backtrack to their intended destination.)

Soft redirects, as I have described it, are already widely in use: if a change to a redirect comes across my watchlist or is in my contribution history, clicking the link bypasses the redirect and takes me straight to the page (which is what should happen). For example: https://en.wikipedia.org/w/index.php?title=UK&redirect=no. Schierbecker (talk) 00:36, 4 February 2022 (UTC)[reply]

I find User:BrandonXLF/NoRedirect useful. Certes (talk) 00:44, 4 February 2022 (UTC)[reply]
Interesting. Although it's overkill for me because, with the exception of my example, I do want to follow redirects in most other cases. Schierbecker (talk) 00:50, 4 February 2022 (UTC)[reply]
Just wrap the user script loader in "if on history page then load this script". It will then only work there. wgAction = "history" should do.--Snævar (talk) 08:07, 4 February 2022 (UTC)[reply]
E.g.
if (mw.config.get( "wgAction") == "history" ) {
  mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3ABrandonXLF%2FNoRedirect&action=raw&ctype=text/javascript')
}
(I think.) ― Qwerfjkltalk 17:58, 4 February 2022 (UTC)[reply]

Coord not displaying correctly

The {{coord}} template is supposed to put the geographical coordinates at the top right of the article when the parameter "display=title" (or its variants "display=inline,title" and "display=it") is used. Instead, when I'm logged in it displays the coordinates at the point the template is used, right-aligned. With the variants, it displays the coordinates in place twice, once directly and again right-aligned. I believe this changed yesterday, although it may be it happened earlier and I didn't notice until then. The template and the module it invokes haven't changed, so I'm not sure where to look. For an example of use, see Oban, New Zealand, just below the map in the infobox.

I'm using Firefox on a desktop with vector non-legacy; I'm aware that display=title doesn't work on mobile. If this is something unique to my preferences, it's not important but I'd be grateful if anyone could suggest a conflict with some gadget I may have enabled (I don't recall changing anything in my preferences or .css and .js files recently, apart from removing a few gadgets today to see if they affect this problem). If this does apply to all logged in users, it's a significant regression as coord is used in over a million articles and I suspect display=title is a common parameter.-gadfium 04:38, 4 February 2022 (UTC)[reply]

This week WMF has made Vector 2022 its own skin and this is probably one of the results. Coord has been a troublesome template generally. It won't impact anyone who isn't logged in at this time and of course only those who use Vector 2022.
I don't know how to fix this one. Izno (talk) 04:47, 4 February 2022 (UTC)[reply]
Thanks. I can confirm that changing my skin to Vector legacy (2010) fixes the problem, but I'll stick with Vector (2022) and know this glitch doesn't affect most viewers.-gadfium 05:07, 4 February 2022 (UTC)[reply]
Thank you for reporting this. I'll now revert an edit I just made as a workround to the problem in an infobox coordinate display. Thincat (talk) 12:00, 4 February 2022 (UTC)[reply]
This is intended behaviour and preferable to the other situation where the coordinates were overlapping the text. See phab:T281974 for all the gorey details and Template_talk:Coord/Archive_11#Use_page_status_indicator_for_coord?
@Izno earlier in that Phab ticket you wrote "Because there is no way to differentiate between new and old Vector that I know of, there's no way to fix this that makes both new and old variants of the skin happy. Either a) it's time to split new Vector out, b) time to give up on legacy vector for all involved, or c) give me a vector2 somewhere in one of elements toward the top of the DOM."
You now have a way to differentiate between the two.. so can this be solved now, or do we understand the problem differently now?
Feel free to edit MediaWiki:Vector-2022.css if you have a better idea for how to handle this.
In eu:MediaWiki:Vector-2022.js, an imperfect solution exists, where JavaScript is being used to inject it into the table of contents so perhaps that could be used here as an interim solution. Jdlrobson (talk) 21:35, 4 February 2022 (UTC)[reply]
@Jdlrobson (WMF), "intended behavior"? Yikes. This is causing infoboxes to exceed their intended width, and the duplication is absolutely not something that can remain. I've never seen any explanation of why language switching is such an essential feature that it needs to commandeer that top right corner, but if you're also going to then just shove everything that used to be there into the article and tell the community to clean it up, that's a problem. {{u|Sdkb}}talk 23:23, 4 February 2022 (UTC)[reply]
I can't judge whether it's worse to have:
  • overlapping text which make both text unreadable/unclickable
  • the coordinates inline - a larger infobox
  • the coordinates hidden.
However the first option was clearly bad, judging by the many bug reports I've had to handle over the last 6 months since the problem was originally identified (in May 2021). In my better judgement I thought the second was a better. As I said before, feel free to revert the change in MediaWiki:Vector-2022.css or provide a different solution. It was a good faith suggested improvement on something that has been a problem for over a half a year that I'm constantly seeing bug reports on from users complaining.
I'm trying to be helpful here. I've spent the entire week addressing problems with gadgets in my own free time so I am hurt by the accusation here that I'm unnecessarily dumping work on the community, particularly for a skin which is opt-in exactly because of these kinds of bugs, that together we need to fix. Jdlrobson (talk) 23:53, 4 February 2022 (UTC)[reply]
@Jon (WMF), it's telling that putting the language switcher somewhere else isn't even listed in your options. It appears that decision was made long ago, with as far as I know zero community input. {{u|Sdkb}}talk 00:35, 5 February 2022 (UTC)[reply]
{{Coord}} appears below, not beside, the top heading so I don't see how moving the language dropdown could help. That said, canceling position: absolute; is a weird choice. top: -3em; works perfectly for me. Also, Vector 2022 can show topicons like {{Administrator topicon}} just fine, so wrapping {{Coord}} with <indicator>...</indicator> is another option. Nardog (talk) 00:53, 5 February 2022 (UTC)[reply]
Nardog, I will take an edit request for the Vector 2022 sheet if you post one. Izno (talk) 03:21, 5 February 2022 (UTC)[reply]
@Sdkb, I understand that more than half people who speak English do so as a second language, and almost half the traffic to the English Wikipedia is from countries where English isn't the primary language. It's possible that while the language switcher is not especially relevant to monoglots like us that it's still useful to many millions of people. Whatamidoing (WMF) (talk) 01:40, 5 February 2022 (UTC)[reply]
Hey @Sdkb, just wanted to chime in with some details on the research and feedback we did on language switching during the development of the new button.  We were able to get feedback from multilingual readers in India (results available here), as well as about 200 logged-in editors and community members across 10 languages (feedback summary available here).  This feedback round showed that most people preferred the new location of the language switching functionality.  Upon deployment, we did see some data and received feedback showing it was more difficult for some people previously familiar with the feature to find the new version.  We are currently working on iteration to make sure languages are sufficiently visible for the folks who need them.  More information can be found in this blog post and the feature page within the documentation. Hope this is helpful! OVasileva (WMF) (talk) 19:18, 7 February 2022 (UTC)[reply]
Jdlrobson I'm really sympathetic to Sdkb here right now given that I know that the test that was performed that "supported" this change was fundamentally shit. Yes, of course more people are going to see it if it takes up more space at the top of the page. That was the wrong null hypothesis to begin with.
That said, here's some further recommendations on the technical side of what can be done now since it will apparently take heaven and earth to get WMF to back that change out, and I am not strong enough to move that much. Either:
  1. ensure that MediaWiki:Vector-2022.css is always concatenated after MediaWiki:Vector.css, or
  2. remove the Vector 2022 dependency on MediaWiki:Vector.css.
I have a strong preference for the latter just from a cleanliness and 'trainability' perspective.
Right now my console is telling me that -2022.css is getting concatenated into the file before Vector.css, likely defeating the purpose of having the dependency on Vector.css in the first place. Review Brooklyn, where the .vector-2022 #coordinates CSS has insufficient specificity to override the CSS in Vector.css (notably, the .mw-indicator #coordinates block), because it's appearing before and not after the other.
(Please also consider renaming the skin too. I hate writing the numbers after. Some pun off Vector would be cool, I've seen Matrix tossed around. Or possibly Space, from vector space, because of all the whitespace [everyone will have a wry laugh at that one].) Izno (talk) 05:05, 5 February 2022 (UTC)[reply]
And following this up, it looks like having the interlanguage links there/not there affects what the offset should be when we make the system an indicator and keep using position absolute. 3.5em when it displays and 0 when it doesn't. So, nothing I can do to fix that at all without just making it an indicator and tossing our absolute positioning. I can maybe undeploy the change I made to Module:Coordinates and then try to position stuff from there, but I doubt that will work the way I want seeing as no one has moved on that. Izno (talk) 06:26, 5 February 2022 (UTC)[reply]
Maybe this is fixed now, IDK, I've reverted the Module:Coordinates change and adjusted MediaWiki:Vector-2022.css. It works for collapsed interwiki list which is standard? in Vector 2022. Still seeing that Vector-2022.css is concatenating into the file before Vector.css. Izno (talk) 21:30, 5 February 2022 (UTC)[reply]

Reply tool might get here soon

I know that several of you are already using the [reply] tool, but just a heads-up that it might finally be turned on for all "desktop" users early next week. Please see Wikipedia:Village pump (proposals)#Offering the Reply Tool as an opt-out feature.

If you don't already know what I'm talking about, then click https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)?dtenable=1#Reply_tool_might_get_here_soon to see the new [reply] buttons after each signature on this page. If you click the [reply] button, you will get a little quick-reply widget, which has the important advantage of auto-signing the comment. The other tools (e.g., the [subscribe] button that we played with here last year) won't be deployed yet. (Maybe we should ask the team to give us all the subscribe button, though. I'm really liking it.)

For the regulars, on the assumption that somoene's going to ask about this new tool here:

I know this has been delayed several times already, but I do think it's finally on track to happen. Thanks for your support during this very slow process. Whatamidoing (WMF) (talk) 21:34, 4 February 2022 (UTC)[reply]

little happy dance emoji (or something something) —TheDJ (talkcontribs) 23:15, 4 February 2022 (UTC)[reply]

Lando is italicized

It's odd, but the article title for Lando Calrissian is currently italicized despite no use of {{DISPLAYTITLE}} or {{italic title}}. The page had been vandalized and required my semiprotection. Can anyone figure the title out? – Muboshgu (talk) 01:59, 5 February 2022 (UTC)[reply]

italic title = no. Izno (talk) 02:19, 5 February 2022 (UTC)[reply]
Izno, thank you! I didn't put two and two together with {{Infobox book}} being in the middle of it. – Muboshgu (talk) 02:19, 5 February 2022 (UTC)[reply]
But is the book fiction? -- Tamzin[cetacean needed] (she/they) 06:31, 5 February 2022 (UTC)[reply]

Show draft creators that an article already exists

If a user attempts to create Example when Draft:Example already exists, a message pops up "There is a draft article for this article at Draft:Example" (see Harpreet Kaur for an demonstration). It would be good to have the opposite functionality: an editor attempting to create Draft:Albert Einstein should, assuming Albert Einstein is not a redirect, get a message along the lines of "Albert Einstein already exists; please consider improving that existing article." (more draconian, but with its advantages, would be to prevent creation of any draft with the same title as a non-redirected mainspace article). Anyone willing to tackle this? Thoughts? UnitedStatesian (talk) 04:24, 5 February 2022 (UTC)[reply]

When I go to Draft:Albert Einstein, I do indeed see "Note: There is a Wikipedia article named Albert Einstein (diff)" (with a link to the diff). I agree that this could be made bigger, similar to the message that pop ups vice-versa. 🐶 EpicPupper (he/him | talk) 05:30, 5 February 2022 (UTC)[reply]
{{Draft at}} is the message you're referring to, and I agree a similar mbox would be a good idea here. Or could mirror the logic I added to {{draft at}} recently, where it doesn't show if the draft is a redirect outside draftspace, and have it so it shows the current small message if the article in question is a redirect, but an mbox if it's not. -- Tamzin[cetacean needed] (she/they) 06:37, 5 February 2022 (UTC)[reply]
or, better still, all the other such messages could be made smaller. Thincat (talk) 11:08, 5 February 2022 (UTC)[reply]
Although I dislike the screenful of messages that pops up when I edit certain pages, this is a rare case where a big warning is appropriate. Anyone attempting to create the duplicate article would normally help us and themselves better by improving the existing page instead. Certes (talk) 11:48, 5 February 2022 (UTC)[reply]

Enable live updates by default

Is there a way to enable the live updates for one's watchlist by default, rather than having to manually turn it on each time? I asked at the Teahouse and was told that another user's always stayed active when he turned it on, but that doesn't appear to be the case for me -- mine always turns off any time I refresh the page. — Czello 16:46, 5 February 2022 (UTC)[reply]

Don't think that's natively supported. There's User:SD0001/watchlist-update-title though that does this as well as updates the count of unread changes in the browser tab title. – SD0001 (talk) 03:23, 6 February 2022 (UTC)[reply]

If $1 links to $2 and if I then go to $1 and click on "related changes", I get a list of changes to $2. But if I have $1 on my watchlist, I also can view changes to Talk:$2. Will it be difficult to implement a corresponding feature in related changes? It would be useful to monitor talk pages easily without having to link to them specifically or manually add the links to my watchlist. Utfor (talk) 08:43, 6 February 2022 (UTC)[reply]

Hello all, I don't really want to go messing with a highly used template that uses a module, so I was wondering if it was a simple job to create a version of this template that is in a default collapsed state. It's taking up a lot of real estate on year pages and I am guessing that 99.9% of the readers of those pages don't even look at it. TIA, Black Kite (talk) 14:39, 6 February 2022 (UTC)[reply]

Something like:
{{cot | Year in various calendars | right=true | b-color=transparent | border2=transparent | bg2=transparent | bg=transparent}} {{Year in various calendars}} {{cob}} ― Qwerfjkltalk 16:18, 6 February 2022 (UTC)[reply]
The template's documentation says (in bold italic, no less): "Please do not rename or remove these classes nor collapse nested elements which use them."
I do not know why that should be so but before you go off and collapse all of those infoboxen (which I don't find to be all that obtrusive) you should discover why the template documentation is so averse to collapse.
The text in the template's documentation is added by {{Microformat message}}. Alas, that template's author, Sardanaphalus, is, apparently, no longer with us. Perhaps someone else knows the reason.
Trappist the monk (talk) 16:22, 6 February 2022 (UTC) 16:32, 6 February 2022 (UTC) (spelling + more)[reply]
Thanks both. I'll have a mess about with it in userspace and see if it breaks anything. Black Kite (talk) 19:18, 6 February 2022 (UTC)[reply]

Special:Allpages and redirects

Would it be possible to give Special:allpages the ability to filter out redirects? We have a redirect discussion where someone wants to delete redirects because of the inability to filter them out, and we shouldn't be deleting redirects merely because of a shortcoming with our tools. Thanks. Oiyarbepsy (talk) 21:04, 6 February 2022 (UTC)[reply]

The thing about special pages is that they are for every wiki, including the sister projects and all of the wikis listed on wikiapiary (it lists wikis that use Mediawiki). Creating an Wikipedia:Database reports for this purpose on the other hand is entirely possible.--Snævar (talk) 21:15, 6 February 2022 (UTC)[reply]
Plus all redirects on Special:Allpages are in italics.--Snævar (talk) 21:18, 6 February 2022 (UTC)[reply]
Special:PrefixIndex supports hiding redirects for what it's worth, so it is indeed a bit of a weird asymmetry. Nardog (talk) 21:33, 6 February 2022 (UTC)[reply]
As does mw:API:Allpages! Nardog (talk) 21:35, 6 February 2022 (UTC)[reply]
It used to. However it seems it was disabled in March 2017 to resolve an issue where someone mass screen-scraping special:allpages caused outages (phab:T160916). A request to re-enable it in August 2017 was declined (phab:T173479). The task to actually fix the issue (phab:T160983) has been open since March 2017, but no actual action appears to have taken place since then (it wasn't even prioritised until September 2021, when it was rated low priority). So it seems like a database report or similar is going to be the only useful way forward for the next several years (deleting redirects is not a useful way forward). Thryduulf (talk) 01:35, 7 February 2022 (UTC)[reply]

Over on the page Mary Robinson#Resignation as president, I have tried to put wikilinks on the words "Cathaoirleach" and "Ceann Comhairle". These words are in Irish, so I have also put them in a {{lang}} template. It's formatted like this: [[Ceann Comhairle|{{Lang|ga|Ceann Comhairle}}]]. Weirdly enough, in the visual editor it appears an a blue-link in italics. But in the reader view, it just shows the square brackets etc.. Any advice about where I've gone wrong? Thanks. Xx78900 (talk) 22:26, 6 February 2022 (UTC)[reply]

@Xx78900: See Template:Lang#Syntax and usage, last paragraph, and use [[Ceann Comhairle|{{Lang|ga|Ceann Comhairle|nocat=true}}]]. --Redrose64 🌹 (talk) 22:53, 6 February 2022 (UTC)[reply]
Thank you! Xx78900 (talk) 22:55, 6 February 2022 (UTC)[reply]

Please can someone copy over Template:Graph:Map from English Wikipedia to Meta?

Hi

I'm working on some documentation on Meta and have built a map using Template:Graph:Map not realising it wasn't available on meta. Please could someone who knows how to copy templates copy it over for me? I would ask there but I doubt my message would get seen.

Thanks very much

John Cummings (talk) 19:18, 7 February 2022 (UTC)[reply]

m:Template:Graph:Map already existed, but was missing some required dependencies. I've now created them, so it should work now. I always hate how much other wikis are a graveyard of broken templates ... * Pppery * it has begun... 22:43, 7 February 2022 (UTC)[reply]
Pppery thanks so much, works like a charm https://meta.wikimedia.org/wiki/User:John_Cummings/map. John Cummings (talk) 01:09, 8 February 2022 (UTC)[reply]
Pppery maybe they should have a soundtrack to accompany them... Mathglot (talk) 02:52, 8 February 2022 (UTC)[reply]

21:14, 7 February 2022 (UTC)

Modify header for vect0r-2022.js and css

In a standard JS there is skin specific infornation header (e.g. User:Nux/vector.js) -- "The accompanying .css page for this skin is at...". In the latest skin there seem to be a generic info (e.g. User:Nux/vector-2022.js). Nux (talk) 23:13, 7 February 2022 (UTC)[reply]

I have updated Template:Script doc auto/core2.[2] PrimeHunter (talk) 04:14, 8 February 2022 (UTC)[reply]

Commons - translation

Hello! Can someone experienced in the translation feature in Commons help me with adding translation and language tags to some project pages? The pages and the details can be found here. I asked in the Translators' noticeboard there but I didn't get an answer and thought that maybe I can have some more luck here. Any kind of help would be appreciated as I've never had a chance to work with that feature before. - Klein Muçi (talk) 03:35, 8 February 2022 (UTC)[reply]

imdbtitle external wikilink?

  • [[imdbtitle:4699982|Rebellion]] = Rebellion
  • {{IMDb title | id= 4699982 | title= Rebellion}} = Rebellion at IMDb
0mtwb9gd5wx (talk) 04:46, 8 February 2022 (UTC)[reply]