Jump to content

Wikipedia:Village pump (technical): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Tags: Mobile edit Mobile web edit
Line 312: Line 312:
:Correct, nested expansion is a little weird. You can use <nowiki>{{#tag:ref|{{cite web|etc}}}}</nowiki> —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 07:55, 13 July 2022 (UTC)
:Correct, nested expansion is a little weird. You can use <nowiki>{{#tag:ref|{{cite web|etc}}}}</nowiki> —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 07:55, 13 July 2022 (UTC)
::Actually refs are having a lot of problem nowadays as we can't use <code><nowiki><ref><ref></ref></ref></nowiki></code> (nested refs) as such we can expand {{tl|refn}} but after expansion will get problem. [[User:Thingofme|Thingofme]] ([[User talk:Thingofme|talk]]) 09:11, 13 July 2022 (UTC)
::Actually refs are having a lot of problem nowadays as we can't use <code><nowiki><ref><ref></ref></ref></nowiki></code> (nested refs) as such we can expand {{tl|refn}} but after expansion will get problem. [[User:Thingofme|Thingofme]] ([[User talk:Thingofme|talk]]) 09:11, 13 July 2022 (UTC)
:::This is one of the oldest issues regarding references. Where do you see "a lot of problems nowadays"? [[Special:Contributions/172.254.222.178|172.254.222.178]] ([[User talk:172.254.222.178|talk]]) 11:33, 13 July 2022 (UTC)

Revision as of 11:33, 13 July 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).

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.


SUL failing consistently

Ever since my Firefox upgraded itself recently (I'm now on FF 102), SUL is failing. I am logged in on English Wikipedia, but when I go to any other WMF site, such as meta or commons, I'm shown as logged out. I've tried explicitly logging out on en.wp, and logging in again to get a fresh login cookie, but no joy. Is this a Firefox bug, or MediaWiki? Is there a phab: ticket? --Redrose64 🌹 (talk) 19:00, 3 July 2022 (UTC)[reply]

This is phab:T226797. There is no simple solution. The Firefox team recommended rebuilding the auth system, which is being looked into in the Auth experiments 2022 project.--Snævar (talk) 19:40, 3 July 2022 (UTC)[reply]
You might be able to get it working again if you disable "Enhanced Tracking Protection" for SUL sites. To do that, click the shield icon at the left end of the URL bar while on the site, then click on the switch next to where it says "Enhanced Tracking Protection is ON for this site". The page should then reload and you should be logged in. Rummskartoffel 21:40, 3 July 2022 (UTC)[reply]
Do I do that when still on the en.wp page prior to following a link to commons, or after? --Redrose64 🌹 (talk) 22:07, 3 July 2022 (UTC)[reply]
Resolved

It's working as expected now, although I didn't disable "Enhanced Tracking Protection" for SUL sites. --Redrose64 🌹 (talk) 23:12, 8 July 2022 (UTC)[reply]

Glitches on Featured and good articles when using scripts

See here about an odd glitch in the duplicate link checker, that is only affecting Featured and good articles. There is a similar glitch, also only on Featured articles best I can tell, in the prose size script installed in tools. It is also generating duplicate info, only on FAs. So perhaps the glitch is not coming from the scripts, but from something else in the FA or GA template? The writer of the dup link script hasn't edited since Jan and hasn't responded; maybe someone else can locate the issue. SandyGeorgia (Talk) 21:56, 4 July 2022 (UTC)[reply]

@SandyGeorgia: Line 17 currently is:
var $content = isVisualEditor ? $(".ve-ce-documentNode.ve-ce-branchNode") : $(".mw-parser-output")
It should have been:
var $content = isVisualEditor ? $(".ve-ce-documentNode.ve-ce-branchNode") : $($(".mw-parser-output", "#mw-content-text")[0])
I'm unsure how this will help you (other than forking the script yourself) if its author has been inactive for quite a while. NguoiDungKhongDinhDanh 02:09, 5 July 2022 (UTC)[reply]
I was hoping someone would find instead that the error was in one of the templates, in which case we could fix it. I guess we're stuck. Thanks for looking ! SandyGeorgia (Talk) 03:59, 5 July 2022 (UTC)[reply]
Interface admins will take bug fix edit protected requests. You should file one at the appropriate talk page. Izno (talk) 04:16, 5 July 2022 (UTC)[reply]
Thx, Izno, but it still makes no sense to me why both of these scripts are failing only on articles that have a GA or FA template? SandyGeorgia (Talk) 04:17, 5 July 2022 (UTC)[reply]
Basically, Evad was looking for a (supposed-to-be) single element that bears a class named .mw-parser-output (without the leading dot). This class marks the outputs of the wikitext parser, which is the content of the page, and, unfortunately, indicator templates (e.g. FA/GA star, {{pp}} etc.). NguoiDungKhongDinhDanh 04:49, 5 July 2022 (UTC)[reply]
Ah, thanks again. I do not know where or how to request these be fixed by "interface admins". SandyGeorgia (Talk) 04:55, 5 July 2022 (UTC)[reply]
I've made an edit request. Many thanks to all of you for taking a look at this! Extraordinary Writ (talk) 05:07, 5 July 2022 (UTC)[reply]
The change for indicators to output .mw-parser-output is also fairly recent, so that is why these scripts have had issues only lately. Izno (talk) 06:59, 5 July 2022 (UTC)[reply]
I have been unable to figure where to find the host of the prose size script that I have installed in tools on the left-hand side of screen ... sorry, techno-dummy ... but that needs similar attention. Over at WT:FAC, I am told any of these people can do the fixing:
Maybe this is it? Wikipedia:Prosesize ? I know I installed it way back when DrPda wrote it, so maybe I have an old version or something? SandyGeorgia (Talk) 16:02, 5 July 2022 (UTC)[reply]
$($(".mw-parser-output", "#mw-content-text")[0]) seems unnecessarily complicated. Wouldn't $("#mw-content-text .mw-parser-output").first() do the job? Nardog (talk) 07:03, 5 July 2022 (UTC)[reply]
Maybe it would do the job, I don't know. I do know that Prosesize is still throwing result-anomalies on GA & FA articles. I am getting 3 or 4 results instead of the previous one result. Shearonink (talk) 22:31, 10 July 2022 (UTC)[reply]
Yes ... dup link checker is fixed, page size tool is not. SandyGeorgia (Talk) 02:02, 13 July 2022 (UTC)[reply]

"Create new section" tab and new editing interface

There has been a new editing interface added for the "Create new section" tab. There was an option to revert to the classic interface but this has disappeared. Why/how do I get it back. Regards, Cinderella157 (talk) 03:24, 6 July 2022 (UTC)[reply]

Disable "Enable quick topic adding" at Special:Preferences#mw-prefsection-editing. PrimeHunter (talk) 05:50, 6 July 2022 (UTC)[reply]
Thankyou PrimeHunter. I would note that the interface interferes with WP functions (eg AfD) that require adding a subst template. Cinderella157 (talk) 12:03, 6 July 2022 (UTC)[reply]
@Cinderella157 If you click the "Source" link on the top right of the new tool to switch to source mode, substing templates works just fine. You can also add dtenable=0 to the URL if there are specific cases where it should never be used. --Ahecht (TALK
PAGE
) 14:06, 6 July 2022 (UTC)[reply]
Support for templates in the visual mode is blocked on phab:T230683. See this old draft for something closer to plain English, but it's basically waiting on a way to stop WP:LISTGAP-type problems by declaring an arbitrary blob of wikitext to be one blob. Whatamidoing (WMF) (talk) 00:16, 9 July 2022 (UTC)[reply]

Dark mode Gadget and Vector 2022 skin

Hello, I'm using Vector 2022 Skin and Dark mode Gadget. In the recent Vector 2022 skin, the title has moved up the tab. However, there is a problem here. There is no problem in light mode, but in dark mode, another line appears above the title (shown in red squares above). I don't know if this is a bug in a Vector or a bug in a Dark mode Gadget. Bluehill (talk) 11:17, 7 July 2022 (UTC)[reply]

It is because .mw-body has a 1px transparent border-top property which is causing the line to appear on the dark mode from what I understand. It is transparent with a white background, just not with dark mode, you could always disable this with custom css or change the color to the background color. Terasail[✉️] 11:25, 7 July 2022 (UTC)[reply]
Pinging @SGrabarczuk (WMF), as I think he's familiar with both the gadget and Vector 2022. Whatamidoing (WMF) (talk) 00:20, 9 July 2022 (UTC)[reply]
Thanks, @Whatamidoing (WMF). Hi @Bluehill, what dark mode gadget do you use? This isn't this one, isn't it? Do you still experience the bug? SGrabarczuk (WMF) (talk) 00:29, 12 July 2022 (UTC)[reply]
@SGrabarczuk (WMF): see example page. — xaosflux Talk 00:47, 12 July 2022 (UTC)[reply]
Thanks @Xaosflux. This is odd. I don't see the line when I'm logged in. Instead, the content is in a box, with all four borders. But in the private/incognito mode, I do see the line instead of the box. What's going on? I'm not sure what gadget/user script I'm using may change my experience! :D SGrabarczuk (WMF) (talk) 01:32, 12 July 2022 (UTC)[reply]
Not sure, I don't think this is rally a software "bug" - there is a box there, maybe it isn't needed for something else - maybe it is, but the local CSS is styling it. Since darkmode here is just a local css, if someone wants to identify and change the element in it they can just make an edit request over at Wikipedia talk:Dark mode (gadget) to change the styling I suppose. — xaosflux Talk 09:51, 12 July 2022 (UTC)[reply]
I agree, this isn't necessarily a software "bug". Our team should be aware of this, though, because we're working on the grid system, and there are just things that may make this change again. SGrabarczuk (WMF) (talk) 12:16, 12 July 2022 (UTC)[reply]

Can't preview from Chrome using Vector 2022

I finally gave up and switched to Vector 2022 (see my post above) as it seems to be becoming the standard. But I can't preview from Chrome but can from Firefox. Doug Weller talk 16:44, 7 July 2022 (UTC)[reply]

At the risk of sounding like a broken record - have you disabled your personal user scripts and any special browser extensions and retested? — xaosflux Talk 17:33, 7 July 2022 (UTC)[reply]
I probably should have done that first, I was hoping there might be an easier answer. I’m finding everything a bit difficult with this damn chemo but I’ll do that tomorrow. Scripts are easier to disable now and that helps, but I can start by just blanking the relevant pages, easy to revert if it makes no difference. Doug Weller talk 17:41, 7 July 2022 (UTC)[reply]
@Xaosflux could it be as simple as not having a Vector 22.js file? Blanking Vector.js worked, but that might have been a script there. Doug Weller talk 08:37, 8 July 2022 (UTC)[reply]
@Doug Weller I think that right now vector-2022 skin loads both your Special:Mypage/vector.js and Special:Mypage/vector-2022.js scripts. — xaosflux Talk 09:26, 8 July 2022 (UTC)[reply]
@Xaosflux I don't have User:Doug Weller/vector-2022.js - easy to install but do I transfer my scripts there from vector.js? Doug Weller talk 10:00, 8 July 2022 (UTC)[reply]
Sort of: it currently loads both of those until phab:T301212 happens - so right now you should not put the same scripts in to both of those at once. If you are done with classic vector and just want to use -2022, then you can remove from the old and move to the new. — xaosflux Talk 10:20, 8 July 2022 (UTC)[reply]
@Xaosflux Thanks. Strangely enough, preview is working again. Doug Weller talk 10:40, 8 July 2022 (UTC)[reply]

Template:Uw-ew not substituting properly

When I tried to subst Template:Uw-ew onto someone's talkpage, any text I put in the additional text field disappeared, and I had to add it manually afterwards Nigel Ish (talk) 18:13, 7 July 2022 (UTC)[reply]

It should work find as long as you add the template in the format {{subst:uw-ew|pagenamehere|additionaltexthere}}. @Nigel Ish Do you have an example of this failing to subst additional text? Terasail[✉️] 18:21, 7 July 2022 (UTC)[reply]
It didn't here - the text in the additional text field completely disappeared - this was using the new and improved talk page editing system.Nigel Ish (talk) 18:25, 7 July 2022 (UTC)[reply]
Your text probably had en equals sign. The documentation says: use "2=" if the additional text contains an equals sign (such as a URL). The issue is the the second bullet at Help:Template#Usage hints and workarounds. PrimeHunter (talk) 20:58, 7 July 2022 (UTC)[reply]
Yes it did - there was a diff in the text - diffs are perfectly sensible things to include in things like edit warring templates, so this ideally needs to be fixed, or at least explicit warnings rolled out to all the user warning templates.Nigel Ish (talk) 07:23, 8 July 2022 (UTC)[reply]
It applies to all templates with unnamed parameters. User warnings are often given with tools like Twinkle which automatically handle it. The documentation of {{Uw-ew}} does mention it. If "explicit warning" means something more prominent then it could quickly get annoying to see on thousands of templates. Some template documentations include it in example code. {{subst:Uw-ew|Article|Additional text}} could be changed to {{subst:Uw-ew|Article|2=Additional text}} (articles rarely have equals signs so 1=Article is rarely needed). I think that would be helpful but subtle enough to not get annoying to see everywhere. PrimeHunter (talk) 14:16, 8 July 2022 (UTC)[reply]

Interface grammatical error

Moved to MediaWiki talk:Gadget-contribsrange.js. --Izno (talk) 05:28, 8 July 2022 (UTC)[reply]

Help for breton wikipedia

I'm working in Wikipedia in breton, the continental celtic language. I need some help and I would like to know if somebody might be willing to give a hand or to give me the name of somebody who could. I dont know anybody who could help here. We are a very small community and the holidays begun this month. The language itself should not give any problem. I linked the pages in breton (brezhoneg or br) to the pages in english and the code is mostly in english
I've been trying to adapt the template {{Uses Wikidata}} to our wiki to help to spread the use of infoboxes using Wikidata properties. I've created the template and module pages and also some of the other templates needed. Unfortunately it doesn't work as expected. I get the double bullets problem (in front of the properties names) you had in january and wich is mentioned in Module talk:Uses Wikidata. The box is also to large and on the left side of the page, the links are writen in bold.
It might be a problem in the template equivalent to {{Side box}} (where the sidebox is shown on the left side of the page, and in a size different from the english version) but I checked the code for the template and the module and it looks exactly the same as in english, as the breton module {{yesno}}. Kadwalan (talk) 11:31, 8 July 2022 (UTC)[reply]

Please link a page with the problem. You always have a better chance of getting help if people don't have to start by trying to work out where you want help. PrimeHunter (talk) 14:30, 8 July 2022 (UTC)[reply]
Thanks. I linked the pages to the similar english pages wich are linked in my explanation. Here are the direct links to breton wikipedia if it's easier :
You said "the double bullets problem". I don't see any bullets in any of your links and your version of {{Uses Wikidata}} doesn't have a single transclusion. PLEASE LINK A PAGE WITH THE PROBLEM. Why is it so bloody hard for posters to link a page with a problem they want help with? We shouldn't even have to ask for it. I'm out. Sorry if I sound rude but I have spent fifteen years searching for pages with a reported problem and asking posters for it. It's getting to me. PrimeHunter (talk) 16:13, 8 July 2022 (UTC)[reply]
Sorry for the lack of examples. You're right. Maybe because I didn't spend even one year searching for pages with a reported problem ? I tried not to use the template before because there was a problem. You can now have a look at the page br:Patrom:Infobox Skiantour/Teuliadur. Thank you. Kadwalan (talk) 17:02, 8 July 2022 (UTC)[reply]
br:MediaWiki:Common.css does not have the plainlist class CSS. Since you are here, you should use WP:TemplateStyles to add the definitions. Izno (talk) 17:45, 8 July 2022 (UTC)[reply]
Thank you very much. As I don't know much about code, and as I don't have the right to change this page anyway, I will let this for the time beeing. But would it be surprising if it is not the only problem ? The double bullets problem was mentionned on the english Module Uses Wikidata talk page in January and the the plainlist clas css was in use then, isn't it ? Kadwalan (talk) 17:57, 8 July 2022 (UTC)[reply]
I'm not going to attempt to figure out why there was an issue then. The issues are obviously unrelated at that point. Izno (talk) 19:18, 8 July 2022 (UTC)[reply]
As for "don't have the rights", you have the rights to use TemplateStyles instead of Common.css. Izno (talk) 19:18, 8 July 2022 (UTC)[reply]

thank you, a little difficult for me though :) Kadwalan (talk) 10:37, 9 July 2022 (UTC)[reply]

brwiki has intadmins who should be able to guide you a bit more as well. — xaosflux Talk 20:26, 8 July 2022 (UTC)[reply]
thanks Kadwalan (talk) 10:36, 9 July 2022 (UTC)[reply]
@Kadwalan, ask Vigneron ; he is a Wikidata guru. fr:Projet:Wikidata could be a place to go as well. A galon, Trizek from fr: 12:34, 11 July 2022 (UTC)[reply]
Thanks. I asked him already but he prefers to wait for another editor who is on holydays. Kadwalan (talk) 13:14, 11 July 2022 (UTC)[reply]
Try Llywelyn2000 (talk · contribs). --Redrose64 🌹 (talk) 22:37, 8 July 2022 (UTC)[reply]
thanks Kadwalan (talk) 10:35, 9 July 2022 (UTC)[reply]

Hello again

Hello! This is about password observation. If a user wants to log in to Wikipedia but forgets the password, then the user clicks the "forgot password" option to change the password. He gets a temporary password from Wikipedia through an email. The email states that if the user remembers the old password, he can now ignore the temporary password given to him by Wikipedia. Now that user has remembered the old password and successfully logged in to Wikipedia. What will happen next to the temporary password sent to him by Wikipedia through email? Is it still working even though you are now logged in using the old password? I'm confused. —Princess Faye (my talk) 12:54, 8 July 2022 (UTC)[reply]

I made a test and the temporary password still worked after logging in with the old password. PrimeHunter (talk) 14:24, 8 July 2022 (UTC)[reply]
@Princess Faye Temporary passwords are invalidated either after 7 days or when you reset your password with it. There is no way for you to force invalidate an unused temporary password, this is requested at Phab:T65837. 163.1.15.238 (talk) 14:27, 8 July 2022 (UTC)[reply]

SPA account name with no user or talk page appears blue instead of red

Recently an SPA made its one-and-only post to a talk page under DS sanctions. When I saw their post, their name was blue. Aren't user names with no history or userspace pages in red? Still unaware this was an SPA with no other contribs, I was surprised they had no talk page, but I tried to open one to post the DS alerts. That's when the user name turned red. After I closed my browser (which is configured to dump all history and other browser stuff) and log back in, the name is blue again. Can anyone teach me what is going on? Thanks here is the thread. The SPA is the OP NewsAndEventsGuy (talk) 18:53, 8 July 2022 (UTC)[reply]

@NewsAndEventsGuy links to userpages and usertalk pages are just like any other, they are blue if the page exists and red if they do not. There is nothing special that changes if it is a user that does or does not have local contributions or subpages. That OP doesn't have a userpage or usertalk page currently, so this is normal. Depending on your browser and any scripts/gadgets/feature you have installed the links could be recolored - most browsers will also treat "visited" and "unvisited" links differently. I don't see that link as blue at all, and hovering it shows that it has the &redlink=1 argument on the link as well - so it should be red. — xaosflux Talk 20:24, 8 July 2022 (UTC)[reply]
In User:NewsAndEventsGuy/common.js you import User:Kephir/gadgets/unclutter.js which changes signatures. PrimeHunter (talk) 20:27, 8 July 2022 (UTC)[reply]
Resolved
Dope! I forgot I did that. Thanks, PH, that explains it. (and thanks for the input, Xaosflux)NewsAndEventsGuy (talk) 20:30, 8 July 2022 (UTC)[reply]

How to create diagrams for Wikipedia and Commons?

How to create diagrams for Wikipedia and Commons? I remember there was also a template for it. Eurohunter (talk) 11:43, 9 July 2022 (UTC)[reply]

@Eurohunter diagrams of what? There are many templates for example Template:Routemap and Template:Tree chart that can produce diagrams. — xaosflux Talk 17:08, 9 July 2022 (UTC)[reply]
@Eurohunter see WP:Graphics lab -- Roger (Dodger67) (talk) 17:13, 9 July 2022 (UTC)[reply]

Prose-size gadget giving strange results

I just ran the Prosesize gadget on two different articles and I am seeing the results at least three times on the page and sometimes four. For instance, I ran it on George Washington and on Andrew Jackson. On GW I am seeing four different results - three partial results:

  • Document statistics (more information):
  • Prose size (including all HTML code): 188 kB
  • References (including all HTML code): 248 kB
  • Prose size (text only): 106 kB (16838 words) "readable prose size"
  • References (text only): 30 kB

And then an additional result:

  • Document statistics (more information):HTML document size: 1043 kB
  • Prose size (including all HTML code): 188 kB
  • References (including all HTML code): 248 kB
  • Wiki text: 227 kB
  • Prose size (text only): 106 kB (16838 words) "readable prose size"
  • References (text only): 30 kB

I see that something similar or possibly associated with this issue was reported earlier at Wikipedia:Village pump (technical)#Glitches on Featured and good articles when using scripts and so wanted to mention that GW is a GA and Andrew Jackson is an FAShearonink (talk) 05:15, 10 July 2022 (UTC)[reply]

Yes, that's likely the same issue. Izno (talk) 06:09, 10 July 2022 (UTC)[reply]

chess svg files inspect broken in browsers

Image when in article
Image when inspected

I am not entirely certain if this is an universal occurring problem however when inspecting images of svg's the preview breaks. I noticed this while viewing the svg of Los Alamos chess. I am using timeless but I checked with vector the issue still occurs, likewise I checked with Firefox, Chrome and Opera on all three browsers the bug was present. I highly doubt it's a hardware issue as my browser has standard API and nothing in my computer to my knowledge would cause this bug, the bug may only occur with chess related svg's as ther svg files such as this example displays correctly. As further analysis of board state on chess articles is useful it can be determental for people analyzing certain moves. I have brought an image of the bug for visual reference. Many thanks. Des Vallee (talk) 07:26, 10 July 2022 (UTC)[reply]

I don't see anything "broken". There are 36 images (6x6) in those two tables on the Los Alamos page. Iif you click one of the images, you'll see only that image. Malyacko (talk) 08:55, 10 July 2022 (UTC)[reply]
Malyacko It is likely an issue with my computer alone then upon inspect the preview turns into a zoomed in chess piece, on all svg's of chess irregardless of the browser. Des Vallee (talk) 12:53, 10 July 2022 (UTC)[reply]
The chess board you're seeing there is not one image. It's a grid of 36 images, one per square of the board. When you click on a square it shows the image for only that square. Anomie 14:15, 10 July 2022 (UTC)[reply]
Anomie Ah I see it is not a file on Wikimedia which explains why there is no inspect. Still this could easily be refined, under the current system someone studying the board must focus on the small blurry preview to the side, likewise it can be very difficult to transfer the svg to other wiki-projects (and more generally the internet) and drastically increases the byte size of an article for a simple svg, however I understand how this system could be more quick then creating an entirely new svg and uploading it to commons. With that mind this is not a bug, simply a misunderstanding thanks for explaining. Des Vallee (talk) 17:43, 10 July 2022 (UTC)[reply]
I've excluded chess diagrams from the mediaviewer now. —TheDJ (talkcontribs) 08:30, 12 July 2022 (UTC)[reply]

Wrong tab title

The page Quantum biology has the wrong tab. The tab bears the title Biology instead of Quantum biology (in Safari browser). I am not able to adjust that. Could someone else take care of that? Thank you very much Phacelias (talk) 07:59, 10 July 2022 (UTC) Whoever adjusted, thanks a lot Phacelias (talk) 10:07, 10 July 2022 (UTC)[reply]

$1 parameter in MediaWiki:Duplicate-args-warning not properly substituted on TRAPPIST-1

When I did a mass search-and-replace to add |display-authors=4 to TRAPPIST-1 I did at first get a "duplicate arguments" error. I did fix it but it seemed to me like the "edit" link in MediaWiki:Duplicate-args-warning was not being properly substituted, with it linking to $1"" rather than TRAPPIST-1. Jo-Jo Eumerus (talk) 10:02, 10 July 2022 (UTC)[reply]

Simplified example: Preview a page with {{foo|bar=1|bar=2}}, e.g. this. It says:
Warning: Wikipedia:Sandbox (edit) is calling Template:Foo with more than one value for the "bar" parameter. Only the last value provided will be used. (Help)
For me, the link on "edit" goes to https://en.wikipedia.org/w/index.php?title=$%27%221&action=edit which edits $'"1. Jo-Jo Eumerus said $1"". It's wrong either way. I don't know why it happens. The code says {{Plain link|{{fullurl:$1|action=edit}}|edit}}. This produces edit when nothing is substituted for $1. That edits $1 as expected so the problem doesn't merely appear to be that $1 isn't substituted. PrimeHunter (talk) 09:12, 11 July 2022 (UTC)[reply]
I removed the call of {{Plain link}} in [1] but it made no difference. PrimeHunter (talk) 09:20, 11 July 2022 (UTC)[reply]
Looks like it got broken in I6a7c04. What happens now is that the message intends to replace $1 with $'"1, then parse the wikitext, then replace $'"1 with the page name. But the fullurl percent-encodes the $'"1 so it's not there to be replaced anymore. Anomie 12:37, 11 July 2022 (UTC)[reply]
Thanks. That also explains why #ifeq:$1|{{FULLPAGENAME}} is apparently always false. I have used Special:Edit/$1 instead.[2] This works but the edit link seems pointless if it's always displayed. It's meant to only display if it's not the previewed page itself but that sounds impossible to implement if the value of $1 is only inserted after the wikitext is parsed. PrimeHunter (talk) 15:08, 11 July 2022 (UTC)[reply]

Decompress stuff that was compressed with mediawiki.deflate

mw.loader.using('mediawiki.deflate',function(){console.log(mediaWiki.deflate('testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest'))});

The decompression seems to currently only be available server side. I tried Pako as that's what mediawiki.deflate is according to phab:T236210 but I can't figure out how decompress something that was compressed with mediawiki.deflate. pako works with Uint8Arrays and isn't accepting what mediawiki.deflate produces. Alexis Jazz (talk or ping me) 16:04, 10 July 2022 (UTC)[reply]

Alexis Jazz, from looking at gerrit, it looks like they used deflateRaw, so the following works, as tested locally:
const pako = require('pako');

const bytes = Buffer.from("K0ktLimhAgYA", "base64");
const output = pako.inflateRaw(bytes, { to: 'string' });
console.log(output);
0xDeadbeef 16:37, 10 July 2022 (UTC)[reply]
0xDeadbeef, so this is only possible with Node.js? Bummer.. I created phab:T312720 but guess I'll have to stick with lz-string for now. Alexis Jazz (talk or ping me) 22:27, 10 July 2022 (UTC)[reply]
0xDeadbeef, I think I got it:
mw.loader.using('mediawiki.deflate',function(){
	compressed = mediaWiki.deflate('testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest')
	decompressed = pako.inflateRaw(atob(compressed.replace(/^rawdeflate,/,'')),{to:'string'});
});
But you have to use inflate from Pako 1.0.10 as to match MediaWiki's deflate. With the current version it just doesn't seem to work. Alexis Jazz (talk or ping me) 02:53, 11 July 2022 (UTC)[reply]

Tech News: 2022-28

19:23, 11 July 2022 (UTC)

How does ECP work from an API standpoint?

As discussed in Special:Diff/1097654748 with Joeytje50, I can't figure out how WP:ECP works. The docs don't mention it explicitly, but do hint that there might be other protection levels. Is this something that's configured on a per-wiki basis? Does it only exist on enwiki? -- RoySmith (talk) 22:48, 11 July 2022 (UTC)[reply]

It is configured on a per-wiki basis, and only exists on the English Wikipedia and several other WMF wikis. The relevant configuration setting is $wgRestrictionLevels, which is set here * Pppery * it has begun... 23:22, 11 July 2022 (UTC)[reply]
@Pppery: Would you be aware of any way to obtain this list of protection levels with JavaScript, either through the API or through something like mw.config.get()? I tried using the latter, and it returned null for this variable, and in my search to find this list through the former, I did not find any appropriate APIs. Joeytje50 (talk) 00:00, 12 July 2022 (UTC)[reply]
Special:ApiSandbox#action=query&format=json&meta=siteinfo&siprop=restrictions * Pppery * it has begun... 00:11, 12 July 2022 (UTC)[reply]
Also, the protection level names, as used in various contexts, can be accessed using action=query&meta=allmessages just like any other system messages. Example: [5]. The message keys starting with "action-", "protect-level-", "restriction-level-", and "right-" are the ones related to the user right (and protection level) rather than to the user group. PleaseStand (talk) 00:20, 12 July 2022 (UTC)[reply]
FWIW a better link to the enwiki settings is this newfangled page, as discussed in the latest tech news. Graham87 08:31, 12 July 2022 (UTC)[reply]

Missing edits from watchlist for personal talk page

Although I have the "Expand watchlist to show all changes, not just the most recent" option checked in my preferences, and have no issues with seeing all changes for other pages on my watchlist, today there were two edits to my own talk page, but only the most recent one appears in my watchlist. Does anyone know of anything that might cause this? isaacl (talk) 23:41, 11 July 2022 (UTC)[reply]

@Isaacl unless there was some fancy log action, Special:History/User talk:Isaacl says there was only one edit on that page. I can look in to this more if you can provide me the 2 diffs you are referencing. — xaosflux Talk 23:47, 11 July 2022 (UTC)[reply]
Ah, my mistake: misread the months. Thanks for your help! isaacl (talk) 00:01, 12 July 2022 (UTC)[reply]

Restoring access to my user account.

Hello -- I am User:CharlesGillingham, and I was locked out of my account by the password system. I think it was sending the "password reset" message to an old email, or something along those lines. The help page advised that, if I didn't receive the "password reset" message I should open a new account, so I did. However, I have lost the editing privileges I enjoyed as a long-time editor. (2006 or so, hundreds of thousands of edits.) Can anyone advice me on how to reset password of my old account? ---- CharlesTGillingham (talk) 00:45, 12 July 2022 (UTC)[reply]

@CharlesTGillingham: User:CharlesGillingham has not specified an email adress in the account. Special:CentralAuth/CharlesGillingham shows 21,415 edits here and a few to other projects but no advanced user rights. I don't know whether that is enough for somebody with the required access to verify your identity and set an email address for the account so you can get a password reset. It helps a lot that the user page states your identity (added by the user) so it can potentially be verified that the request is really from the account owner. Passwords never expire so you can keep trying. PrimeHunter (talk) 02:59, 12 July 2022 (UTC)[reply]
The only privilege I need is "auto confirmed", so that's not really a concern. (I remember being notified, around 2011 or so, that I had passed 100K edits ... but of course that's not an issue worth worrying about.)
The last password was Safari-generated, so there's no hope of my guessing the password -- literally intractable. It would still be nice to keep going in the same old account. Do you know how I might go about finding a person who might be able to set the email? ---- CharlesTGillingham (talk) 03:43, 12 July 2022 (UTC)[reply]
Without an email or committed identity, the chances of you getting your account back are slim to none (see Help:Logging in#What if I forget my password?). Nardog (talk) 04:10, 12 July 2022 (UTC)[reply]
And, as the fourth bullet point there says, the process is to email the Trust and Safety team at ca@wikimedia.org * Pppery * it has begun... 04:12, 12 July 2022 (UTC)[reply]

MediaWiki SVG-from-PNG upload bug/problem?!

Hi, WPVPT!! I'm using Mozilla Firefox PC version. I uploaded an SVG image which is currently deleted unless sought via the suppressors to WP for use in articles, but it isn't showing on WP. It is an SVG converted from a PNG image, which I did through SVG converter websites obtained via Google Search. Before uploading it, it had the typical feel of an SVG, but it became blank on its upload to WP. Does this happen to such SVG converts from PNGs uploaded to WP? Is something wrong with MediaWiki or that new SVG converts from PNGs get uploaded on WP and don't show straight from upload? Intrisit (talk) 10:22, 12 July 2022 (UTC)[reply]

@Intrisit: The deleted File:2022 WAFCON.svg can also be viewed and undeleted by administrators but we cannot see how MediaWiki will treat it while it's deleted. MediaWiki converts SVG files to PNG files when they are displayed. This can fail for different reasons, e.g. an error in the SVG format which may not affect other SVG software (my browser can show the deleted SVG), compatibility issues with MediaWiki, or a temporary server delay. Can I undelete it? You will not be punished for uploading an image which doesn't display properly, but don't add it to articles while it fails. PrimeHunter (talk) 14:39, 12 July 2022 (UTC)[reply]
You can try using https://svgcheck.toolforge.org to get some feedback about possible issues. A lot of SVG converters are very bad at what they do. Also if you have a brand or something with a PNG, in MANY cases it is possible to find an SVG original (often as part of marketing materials or brand guidelines or whatever), which is simply much better because PNG -> SVG is always a lossy process, whereas if you have an SVG original any sizing is always lossless (which is why SVG is preferred in the first place). —TheDJ (talkcontribs) 14:44, 12 July 2022 (UTC)[reply]
In this case, the "conversion" was just to create an SVG that has an embedded PNG inside it with no actual vector content. Anomie 01:57, 13 July 2022 (UTC)[reply]

Considerations for edit notices on mobile

On mobile platforms like the Android app and likely soon https://en.m.wikipedia.org, edit notices are delivered as a popup that needs to be dismissed (and can be revisited with a button), as opposed to a passive box above the editing window. I've implemented the same in the editor script I'm using right now which causes edit notices to appear as a popup on desktop platforms too. On mobile, there often just isn't enough screen real estate to display warnings in a passive box.
This is good for warnings like Template:Editnotices/Page/Talk:Goofy, it makes them harder to miss. But not all notices are used like this, Template:Editnotices/Namespace/File for example contains more generic information and pops up on every file description page the user hasn't edited before. Whether that's really needed is an open question, personally I lean towards no: I'd rather reserve edit notices for actual warnings specific to a particular page or subject.

  • To stop a particular notice from showing on mobile platforms it can be wrapped in an element with the nomobile class. We should consider this for notices that are primarily informative and not really warnings.
  • A wall of text is unlikely to impress a mobile user, so consider wrapping everything outside the core message in an element with the nomobile class.
  • Many edit notices use markup to draw attention: background colors, images of exclamation marks, red and/or bold text, borders, etc. In a passive box these make sense due to banner blindness, but they are largely inappropriate when already shoving a popup in the user's face. They can also cause issues at limited screen width. Mobile platforms try to strip at least some (if not all) of this stuff, but please keep this in mind when designing a new notice.
  • Shouldn't edit notices be popups on desktop too? It'll make them harder to miss, and do you really enjoy having that box sitting permanently above the edit window?
  • How should we handle more generic information for mobile platforms that is best delivered passively? One solution I'm thinking of is the introduction of a new class for editnotices that, when detected, suppresses the popup but still enables the button to revisit the notice so the content is accessible. Maybe call it "nopopupnotice" or something.

But I'd love to hear some more thoughts on this. Alexis Jazz (talk or ping me) 18:18, 12 July 2022 (UTC)[reply]

Wow... this topic just made me realize how blind to edit notices I really am. Also, since I'm now thinking about it, we should probably revisit the idea of edit notices such as the one on Talk:Goofy entirely. The new reply tool skips the edit notice entirely, so if someone is using that they will never see the warning about Goofy not being a cow. ~ ONUnicorn(Talk|Contribs)problem solving 18:30, 12 July 2022 (UTC)[reply]
ONUnicorn, solid argument for saying "Farewell, DiscussionTools!" right there. Alexis Jazz (talk or ping me) 18:41, 12 July 2022 (UTC)[reply]
Whilst that's all great (and is a very good idea), it'd be even better if the developers could get around to iOS users and Mobile web users being able to see edit notices at all... Black Kite (talk) 18:44, 12 July 2022 (UTC)[reply]
Alexis Jazz says that mobile web users will soon be receiving edit notices as a popup... that's the first sentence. ~ ONUnicorn(Talk|Contribs)problem solving 19:04, 12 July 2022 (UTC)[reply]
It can now be tested. Alexis Jazz (talk or ping me) 20:14, 12 July 2022 (UTC)[reply]

Some some of pdf widget to select text in references and automatically create cites with page numbers (and other information)

Hope this is the right place for this post. Tell me if I should put it somewhere else. I've been thinking for a while about references in wikipedia. I think it might be nice if a reference could identify precisely which section of text supports a claim, and it might be nice if there were a GUI to do this.

This sort of GUI would:

  • Make it easier for people to cite, creating fewer errors, and speeding up the editing process.
  • Help ensure that all references had page numbers.
  • Make it easier for people to check citations.
  • Provide a more useful data set for machine learning tasks (can you see my real motivation?). Some machine learning tasks might be valuable for wikipedia, e.g. checking citations, suggesting to the reader which part of a page or document supports the claim, in a far flung universe automatically generating citaitons.
  • I imagine such data could be use of to wikipedia's internal team.

There is some prior work for this sort of stuff in the open source hypothes.is library associated with Jeff Atwood of stackoverflow fame. And meta have been messing around with citations for fact checking recently and open sourced their work. I'm not sure we should particular try to help meta, but we could make it easier for the community as a whole to build on their work. Talpedia (talk) 23:26, 12 July 2022 (UTC)[reply]

There are two aspects here, 1 creating an citation from pdf, 2 verifying pdf citation. For 1 there are a bunch of programs that help users to cite an pdf. There is no need for an wikipedia specific thing, because it is enough just to get an citation in an academic format. The requirement of an page number and section does filter these tools quite a bit. For 2, it is worth mentioning that IAarchiveBot started adding urls to pdfs to references with ISBNs. As for the problem itself, Wikipedia does require editors to reword things so they are not equal to the citation, so it would probably have to search for key words instead.
As for why this is not a thing in the three editors (VisualEditor, 2017 Wikitext editor and 2010 wikitext editor) much of the information you want is in the pdf itself. Getting the information needed is not the issue, but as I understand it, the developers are hesitant to temporarily store an pdf just to get information out of it. As for the page and section, you kind of need to get that from an PDF viewer, as then you can ask for the page the editor is currently viewing. The three editors can however tick most of the boxes if you give it an identifier, like an ISBN, if it has one.--Snævar (talk) 06:56, 13 July 2022 (UTC)[reply]
Thanks for the reply. I agree that all of this could be handled outside of wikipedia proper and through and external tool which provides citations. In fact, I imagine if this were to get into wikipedia proper it might have to be proven in such an external tool. I can see the "linuxy" argument for separate compatible tools. It's interesting to know that there is a tool that can give me page numbers from pdfs if I highlight a region, I'd like to give one of those a whirl if anyone new about them. The lazy version of me would love something to find the ISBN/doi from a pdf I'm viewing and include the page number.
I guess the main addition within wikipedia associated with is the idea of selecting which span of text within a document contains the information, as well maybe as providing urls that select the page and piece of text. I don't quite know how you would deal with multiple references to different spans on different pages.
I could also imagine people reviewing references selecting the bit of text that matches - assuming they are actually motivated to review what has been added. One thing I do sometimes when reviewing other people's claims is add page numbers.Talpedia (talk) 10:45, 13 July 2022 (UTC)[reply]

Planet: small font on block quotes

When viewed from an iPhone, without being logged in to Wikipedia, two of the blockquotes (but not the others) in Planet show in a font much too small to read:

How can the font be fixed in the article so that all browsers will see a normal font? SandyGeorgia (Talk) 01:57, 13 July 2022 (UTC)[reply]

@SandyGeorgia, when you say it is in font too small to read, which skin are you using? The default mobile skin ("Minerva") as is found at the mobile site? Or desktop ("Vector"), as are the links you provided? Just checking. Izno (talk) 04:51, 13 July 2022 (UTC)[reply]
Both of those quotes look larger than the surrounding text (and, weirdly, are rendered in serif font instead of the sans serif used in the body) on my iPhone using Safari, not logged in. – Jonesey95 (talk) 05:54, 13 July 2022 (UTC)[reply]
Izno does skin apply when not logged in? (How do I find which skin I'm using?) SandyGeorgia (Talk) 07:16, 13 July 2022 (UTC)[reply]
When reading it from iPhone, I click on the desktop view ... is that what you mean? SandyGeorgia (Talk) 07:18, 13 July 2022 (UTC)[reply]
You are likely running into automatic font size inflation that phones provide. With this, they increase the size of elements like headers and paragraphs etc compared to items the device thinks are less important like block quotes and images. It's expected behaviour on a phone when using the desktop version of a website (which was not designed to be used on mobile) and is an attempt to make desktop websites more readable on phones. So actually the block quote is at the 'proper' text size, its the paragraphs around it that are 'too big'. Our normal paragraph font size is around 14px, but on mobile with text inflation, that becomes a font-size around 24px. —TheDJ (talkcontribs) 08:03, 13 July 2022 (UTC)[reply]

Special:ExpandTemplates can't expand refs

This special page can't expand templates in references. Thingofme (talk) 02:11, 13 July 2022 (UTC)[reply]

Correct, nested expansion is a little weird. You can use {{#tag:ref|{{cite web|etc}}}} —TheDJ (talkcontribs) 07:55, 13 July 2022 (UTC)[reply]
Actually refs are having a lot of problem nowadays as we can't use <ref><ref></ref></ref> (nested refs) as such we can expand {{refn}} but after expansion will get problem. Thingofme (talk) 09:11, 13 July 2022 (UTC)[reply]
This is one of the oldest issues regarding references. Where do you see "a lot of problems nowadays"? 172.254.222.178 (talk) 11:33, 13 July 2022 (UTC)[reply]