Wikipedia:Village pump (technical)
Policy | Technical | Proposals | Idea lab | WMF | Miscellaneous |
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.
Frequently asked questions (see also: Wikipedia:FAQ/Technical) Click "[show]" next to each point to see more details.
|
substring from strings
Hi! How can I return a substring from a string, beginning with the fourth character to the fourth-last character, using it in a template.
And I have a date string: "4. October 2023" and what to return the day (without point), the month (but numerical = 10) and the year separately. – Doc Taxon • Talk • 01:52, 5 October 2023 (UTC)
- There's {{str right}}. Nardog (talk) 01:59, 5 October 2023 (UTC)
- See more at {{String-handling templates}} and mw:Help:Extension:ParserFunctions##time.
{{#time:j|4. October 2023}} {{#time:n|4. October 2023}} {{#time:Y|4. October 2023}}
produces 4 10 2023. PrimeHunter (talk) 02:28, 5 October 2023 (UTC)- @PrimeHunter: I noted that
{{#time:j|4. October 2023}}
works in Englisch, but in German the month spells "Oktober". So{{#time:j|4. Oktober 2023}}
doesn't work.{{#timel:j|4. Oktober 2023|de}}
doesn't work too. I get "Error: Invalid time". Can I format the German month "Oktober" to English month "October"? Sorry for this special question. – Doc Taxon • Talk • 03:22, 5 October 2023 (UTC)- See Module:User:Mr._Stradivarius/convertTime. Then in lua #time is mw.language.new('de'):formatDate( format, string, language ). This is also the long standing bug Phab:T21412. Snævar (talk) 10:36, 5 October 2023 (UTC)
- This is the English Wikipedia. Always say if your post is about another wiki. You can translate to English and use #time. There may be easier ways with existing German Wikipedia templates but I don't know which templates you have. PrimeHunter (talk) 11:15, 5 October 2023 (UTC)
- @PrimeHunter: I noted that
- See more at {{String-handling templates}} and mw:Help:Extension:ParserFunctions##time.
Thank you – Doc Taxon • Talk • 20:55, 8 October 2023 (UTC)
Prototype for readability improvements
Introduction to a new project
As the Wikimedia Foundation Web team, we are beginning a project called Accessibility for reading. The goal is to make the wikis more accessible and comfortable for reading. We are starting with the font size and typography for articles. In the next phase, we will focus on color palette customizations, such as dark mode. All these will be available for both logged-in and logged-out users as settings, on both desktop and mobile web.
This project is a consequence of the many requests from volunteers. We would like to thank everyone who has asked about this. On the technical side, dark mode is easier now than the font size, but it will need more involvement from the communities. This is why we are asking you to follow our project. Watch the project page and subscribe to our newsletter. We'll share more details on that in the coming weeks and months.
Test out our prototype
Now, we would like to focus on making articles easier to read and scan for casual readers. We aim for:
- Making the default font size bigger (but not too big) to improve readability
- Increasing the information density to improve scanning
- Increasing the space between paragraphs and sections to improve scanning
- Allowing readers (including logged-out users!) to customize the density of text
This will apply to articles in the reading mode and in VisualEditor, but not in the wikitext editor. We are planning these changes to apply across all the wikis. The default may vary based on the language or script of the project. To confirm, we will also add preferences for logged-in and logged-out users.
We have prepared a prototype that allows for various changes in the font size and spacing. To use the prototype, force a banner to appear and click on it. Next, try out different combinations and share what works for you. This prototype is not a reflection of the final design. Instead, we would like to learn what font sizes Wikimedians want to see across languages. We will use this data to determine the proposed default and options. Read more about the test. OVasileva (WMF), SGrabarczuk (WMF) (talk) 22:30, 5 October 2023 (UTC)
- @SGrabarczuk (WMF), my firefox is not letting me open the site/link. Every time I click on the banner, I get the following message: "Content Security Policy violation detected! Tried to load something from https://xtools.wmcloud.org/enwiki/api/page/articleinfo/en.wikipedia.org/Wikipedia:Village_pump_(technical)?format=html&uselang=en" Ponor (talk) 00:17, 6 October 2023 (UTC)
- @SGrabarczuk I am getting errors on load. The full message is "Content Security Policy violation detected! Tried to load something from https://redwarn.toolforge.org/cdn/css/materialicons.css." NW1223<Howl at me•My hunts> 01:05, 6 October 2023 (UTC)
- @User:NightWolf1223 and @Ponor both of those issues are gadget related, XTools and Redwarn. An error in those userscript might be preventing the prototype from loading. JDrewniak (WMF) (talk) 01:15, 6 October 2023 (UTC)
- It works with safe mode on, but it is only broken with your banner. Also, the banner does not work. NW1223<Howl at me•My hunts> 01:23, 6 October 2023 (UTC)
- @NightWolf1223, if you saw the banner, clicked, and the page was reloaded, you will see the prototype widget as soon as you go to the main namespace. I hope this addresses your second sentence. SGrabarczuk (WMF) (talk) 01:32, 6 October 2023 (UTC)
- And it looks like MediaWiki:Gadget-BugStatusUpdate.js. I am not entirely sure it's the fault of those scripts since those scripts don't cause issues otherwise..... Izno (talk) 05:00, 6 October 2023 (UTC)
- The problem is phab:T199055, previewing a CentralNotice banner will cause CSP warnings for anyone loading external content. It's intended as a security feature for CentralNotice banner developers, but causes issues when sharing those links with others. the wub "?!" 12:45, 6 October 2023 (UTC)
- It works with safe mode on, but it is only broken with your banner. Also, the banner does not work. NW1223<Howl at me•My hunts> 01:23, 6 October 2023 (UTC)
- Ehm.. how do I get rid of this thing ? There doesn't seem to be a way to disable it ? I can dismiss but then it shows up again after a while. What cookie/LS key am I looking for ? —TheDJ (talk • contribs) 13:24, 9 October 2023 (UTC)
- @SGrabarczuk (WMF) please also see your metawiki talk. There are other problems with this banner as well. — xaosflux Talk 13:26, 9 October 2023 (UTC)
- (
it is being shown on all skins but doesn't appear to be working on all skins
— xaosflux) Aaron Liu (talk) 13:33, 9 October 2023 (UTC)
- (
Change to wiki appearance
I just got a banner – something about changing the appearance of WMF wikis again – but, when I tried to click it, it vanished. Does anyone have a link please? (Alternatively, I'm really hoping someone will tell me I just nodded off and was only having a nightmare.) Certes (talk) 10:35, 9 October 2023 (UTC)
Perhaps I should ask a more general question: is there anywhere one can see banners one has accidentally dismissed (short of creating a second account)? I've browsed a few random pages on Wiktionary, frwp, etc. but it didn't appear. Certes (talk) 12:26, 9 October 2023 (UTC)
- All I know about opening it is that 1. it's JavaScript so you probably can't trigger it by link 2. It's not a skin redesign, just text, see mw:Reading/Web/Accessibility for reading/Community prototype testing 3. centralnotice banners should in theory be listed at m:CentralNotice/Calendar but this isn't thereTL;DR: IDK Aaron Liu (talk) 13:27, 9 October 2023 (UTC)
- Thanks. It says there that it's
not a proposal for changes
. (It's in bold, so it must be true.) I feared it was a another unwanted redesign, and was listing the things I need to turn off before retiring from Wikipedia (good practice anyway), but I'll assume good faith and take that assurance at face value. Certes (talk) 13:34, 9 October 2023 (UTC)
- Thanks. It says there that it's
- Oh hey, look above! WMF gave us a link to force it! Aaron Liu (talk) 13:31, 9 October 2023 (UTC)
Did External links search (Special:LinkSearch) change?
Hi, back in 2020 I used Special:LinkSearch to find articles contaning certain URL patterns. I used it to search for articles that contain URLs that started with strictly "http://kb.nl" (so not "https://kb.nl", "http://www.kb.nl", "http://*.kb.nl" or similar patterns). Back then this query only returned URLs stricty starting with "http://kb.nl"
3 years later: I just tried this query again (https://en.wikipedia.org/enwiki/w/index.php?title=Special:LinkSearch&limit=500&offset=0&target=http%3A%2F%2Fkb.nl), but now I get results with URLS starting with http://www.kb.nl, http://liber-maps.kb.nl, http://poortman.kb.nl/, http://bltvn.kb.nl, http://opc4.kb.nl and other subdomains of http://kb.nl as well. That's not what I need.
Has the functionality of Special:LinkSearch indeed changed since 2020? And how can I get back the 'old' functionality? Can I tweak the API-call to serve the old functionality? OlafJanssen (talk) 13:02, 6 October 2023 (UTC)
- Yes it changed this year. Think of the search as being split into 3 parts. protocol, host and path. These all have separate context. Searching for kb.nl will include all hosts that end with kb.nl right now it seems. The wildcard seems to have become implicit. This is probably in oversight in the changes that were made to the logic when the table structure was modified. I'll file a ticket. —TheDJ (talk • contribs) 13:27, 6 October 2023 (UTC)
- Results in the meantime. —Cryptic 13:43, 6 October 2023 (UTC)
- And in Special:Search form. Izno (talk) 17:02, 6 October 2023 (UTC)
- Thanks for these helpful pointers, I'll check them out, it's a good opportunity to learn more about Quarry and the insource: parameter, I'm not yet very familiar with them OlafJanssen (talk) 09:28, 10 October 2023 (UTC)
- And in Special:Search form. Izno (talk) 17:02, 6 October 2023 (UTC)
- Results in the meantime. —Cryptic 13:43, 6 October 2023 (UTC)
- @OlafJanssen: See Wikipedia:Village pump (technical)/Archive 206#Tech News: 2023-28 and phab:T14810. --Redrose64 🌹 (talk) 12:15, 7 October 2023 (UTC)
Finding all IA-WayBackMachine URLs that match a certain URL pattern
In Dutch (or any language) Wikipedia I'm trying to find all external URLs that start with "http(s)://web.archive.org/web" AND contain a given URL pattern, for example "resolver.kb.nl"
I could theoretically do this by using https://nl.wikipedia.org/enwiki/w/api.php?action=query&list=exturlusage&eunamespace=0&eulimit=max&euquery=web.archive.org/web&format=json and a Python script to loop over all (10.000s) articles that have external links starting with "http(s)://web.archive.org/web" and loop over that result set to filter for URLs containing "resolver.kb.nl". Is there a smarter, more direct approach (without looping over 10.000s articles) to match both URL patterns in 1 go? OlafJanssen (talk) 10:57, 7 October 2023 (UTC)
- See this Quarry query. It should contain every such link on the Dutch Wikipedia; if you want it for a different Wikipedia you just need to change it from "nlwiki_p" to "enwiki_p" or similar. Note that it will take longer to run on the English Wikipedia than the Dutch; you will probably be waiting a few minutes.
- Note that it only includes mainspace links outside of redirects; if you want a broader scope, let me know and I can expand it. BilledMammal (talk) 11:18, 7 October 2023 (UTC)
- You're missing the trailing dot from the http url. Combined with the namespace, redirect, and especially path restrictions, that doesn't actually prevent any hits either on nl or en; but it still excludes about 166k hits on the url part too soon (compared to 13 million for https). —Cryptic 15:40, 7 October 2023 (UTC)
- @BilledMammal, @Cryptic Thanks for these Quarry examples, I just tried runnig them (I'm a Quarry noob, so not sure how to read the SQL and interpret the results, but a good opportunity to learn more about this topic. OlafJanssen (talk) 09:33, 10 October 2023 (UTC)
- You're missing the trailing dot from the http url. Combined with the namespace, redirect, and especially path restrictions, that doesn't actually prevent any hits either on nl or en; but it still excludes about 166k hits on the url part too soon (compared to 13 million for https). —Cryptic 15:40, 7 October 2023 (UTC)
- If you need to loop over your result set you should start with the more restrictive query:
- Searching insource:web.archive.org/web yields 342,452 results.
- Searching insource:resolver.kb.nl yields 10,626 results.
- That's 32x fewer results to loop over. - Cabayi (talk) 12:18, 7 October 2023 (UTC)
- Thanks for this idea, this order of doing things makes perfect sense. I'm playing with the insource paramater in the action API. (never used that param before). So far I'm trying things like
- https://nl.wikipedia.org/enwiki/w/api.php?action=query&list=search&srsearch=insource:web.archive.org&srwhat=text&format=json
- Is there a way (within the API call) to get rid of all in the json? OlafJanssen (talk) 09:42, 10 October 2023 (UTC)
- Seems some words have been nullified in my response above. It should read: "Is there a way (within the API call) to get rid of all <span class="searchmatch"> in the json?" OlafJanssen (talk) 09:48, 10 October 2023 (UTC)
- If indeed you are specifically looking for archive.org addresses, they are sufficiently regular that you can probably wrestle up an actual insource search / Quarry query to find it. Here's what it would look like on en.wp. [1] Special:Search has an action API available as well. You may or may not need the quoted insource markers, those sometimes aid finding things quickly enough not to timeout but occasionally change the search results depending on how partial of a match they are to the rest of the 'word' they're in. This particular search doesn't need them on en.wp. Izno (talk) 18:28, 7 October 2023 (UTC)
- Excellent, this looks very much the ultimate solution of what I'm trying to achieve. Let my try translating this into an API call and see what the exact results are! Regards, OlafJanssen (talk) 09:46, 10 October 2023 (UTC)
Template-generated redlinked category problems, again
The latest run of Special:WantedCategories featured four redlinks of the "CS1 language sources" variety, all for various iterations of the Serbian language in different scripts. Of course, since I don't normally work in the CS1 area, I have no idea whether they're warranted or not, and since they're template-generated I can't just remove them without breaking other stuff — but one in particular, Category:CS1 српски (ћирилица)-language sources (sr-ec), is obviously problematic as the words in the category name need to be in English on the English Wikipedia. So I've had to "create" it for the time being since I don't know how to fix that but can't just leave it to simmer on articles as a redlink, but obviously it needs some attention to fix the name that the template is autogenerating for "sr-ec" code. As well, Category:CS1 srpski (latinica)-language sources (sr-el) also seems like that should be "Serbian" rather than "srpksi" for the same reason — but I also note that the other two categories I had to create were Category:CS1 Serbian (Latin script)-language sources (sr-latn) and Category:CS1 Serbian (Cyrillic script)-language sources (sr-cyrl), which both seem (from my admittedly limited knowledge of the subject area) like they might be the same things as the first two categories: they might actually be redundant categories for two scripts rather than genuinely distinct categories for four. So could somebody with more knowledge of this subject area than I've got look into this, and fix whatever needs to be fixed?
The other question is about Category:AfC pending submissions by age/2 weeks ago, which was being autogenerated by an AFC submission template even though that category was deleted three years ago per a CFD discussion due to a project decision to refine that into more detailed subcategories by number of days. I actually have brought a case of the exact same thing to VPT before, at Wikipedia:Village_pump_(technical)/Archive_194#Artificially-generated_redlinked_maintenance_category from February 2022, but after that the problem never recurred again until now (or at least I never came across it if it did). As it turns out, the category actually got emptied out once I rejected the draft that was in it (Draft:Maggie Fimia, if anybody needs that info) as not being properly sourced to establish the subject's notability — but the fact that the category came back at all is still a problem that should be looked into, because it was a bug in a module the last time I brought it here. (And, of course, even rejected drafts are still supposed to stay age-sorted anyway, so I'm not sure why rejecting the draft actually resolved a problem with an age-sorting category.) So could somebody check that one as well, if possible? Bearcat (talk) 13:43, 7 October 2023 (UTC)
- For the cs1|2 categories phab:T117845 and phab:T348366.
- So far as I can tell,
sr-Cyrl
is redundant tosr-ec
andsr-Latn
is redundant tosr-el
but for reason of necessity at sr.wiki,sr-ec
andsr-el
are retained and only 'defined' with Serbian-language names. At en.wiki,sr-Cyrl
andsr-Latn
tags are preferred because they are valid IETF language tags and MediaWiki returns English language names for those tags.sr-ec
andsr-el
tags in cs1|2 templates should be replaced withsr-Cyrl
orsr-Latn
as appropriate. - Any further discussion on this topic (cs1|2) should take place at Help talk:Citation Style 1.
- —Trappist the monk (talk) 14:14, 7 October 2023 (UTC)
- Okay, with that information I've redirected the ec and el categories to the cyrl and latn categories so that any future usages won't generate redlinks, and did an AWB run to switch the coding in use in the articles so that they would be moved over. Still think it's worth doing something at en to make ec and el automatically use the cyrl and latn categories instead of this having to be manually monitored over and over again, but I'll go to that other help talk page to pursue that. Bearcat (talk) 15:12, 7 October 2023 (UTC)
- The two weeks one is really odd. The one draft in it was submitted at 20230916000020, which was (as of the time I investigated) 1869626 seconds ago, which is 21 days and 15 hours (so clearly more than 3 weeks, and was more than 3 weeks when this discussion started). Yet
{{time ago|20230916000020|magnitude=weeks}}
-> 67 weeks ago. It looks like the reason for this is that the draft was submitted only 20 seconds after midnight, which means that {{time ago}} thinks that it is being given a date without a time and thus fills in midnight yesterday/today as the time, which is 20 seconds short of 3 weeks after the draft was submitted, and rounds that down to two weeks. This bug has existed forever, but it only happens if someone submits a draft in the first minute of a day, and it happens to be exactly 3 weeks before a day when you check Wanted Categories (as the category would have cleared itself at midnight today/tomorrow if you hadn't declined it). I'm not at all surprised that took years to happen. * Pppery * it has begun... 15:40, 7 October 2023 (UTC)- Wow. How weird. Bearcat (talk) 16:20, 7 October 2023 (UTC)
Only display image if user is not using the Wikipedia mobile app
The app appears to always render images full-width by default, unlike Minerva. Compare F104 highway (Nigeria) on both mediums. {{if mobile}} does not seem to distinguish between the mobile apps and the mobile site, so is there a similar template or way specifically for the app? Aaron Liu (talk) 20:23, 7 October 2023 (UTC)
- @Aaron Liu, I doubt anyone is going to download the app just to review your problem. Please take a screenshot and place it on an appropriate website so we can take a look without doing so, so that we can understand what the problem is. Izno (talk) 23:58, 7 October 2023 (UTC)
- Also, pick an article that doesn't have a "temporarily deleted for copyvio concerns". Izno (talk) 23:58, 7 October 2023 (UTC)
- Here. Installing an Android app should be trivial though and the Copyvio/core template was the best example I could find as it has a small, floating image and is in the article space. Compare that to the mobile view of the aforementioned article. Aaron Liu (talk) 00:18, 8 October 2023 (UTC)
- Is this an issue only with that template?
- Whether you think installing an app is trivial is irrelevant. Izno (talk) 01:00, 8 October 2023 (UTC)
- I’ve viewed a lot of articles with floating pictures and they all do that. If you could find another template with an image used in mainspace that should also have it. Aaron Liu (talk) 02:16, 8 October 2023 (UTC)
- That's not really what I'm asking. There are not many images that are floated in articles that aren't already thumbnails, for which the behavior between app and Minerva is identical (full width, and also Timeless).
- If this is just the one template, I don't see a reason to spend time on it locally to work around the issue, nor do I wish to since it is ultimately an upstream issue. You can consider filing something in phab: for this case if you wish, but I do not anticipate them spending time on the problem. Izno (talk) 02:57, 8 October 2023 (UTC)
- I’ve viewed a lot of articles with floating pictures and they all do that. If you could find another template with an image used in mainspace that should also have it. Aaron Liu (talk) 02:16, 8 October 2023 (UTC)
- You can see an approximate preview of how the article looks in the mobile apps here: https://en.wikipedia.org/enwiki/api/rest_v1/page/mobile-html/F104_highway_(Nigeria) Matma Rex talk 20:16, 8 October 2023 (UTC)
- Please don't use if mobile. Things should generally work without those kinds of hacks. And if it doesn't we should make it work, but not by adding ALTERNATIVE content. —TheDJ (talk • contribs) 13:17, 9 October 2023 (UTC)
- How do I make it work on the app then? Aaron Liu (talk) 13:22, 9 October 2023 (UTC)
- It seems to me that this is a warning template that was never converted to the mbox family of warning templates and is now trying to visually emulate one. As such the provisions taken to have these templates adapt, are missing. However mbox gets special behaviour in the app and minerva skin, which I'm not entirely certain will work icw the unclosed div hack that this template uses. —TheDJ (talk • contribs) 15:22, 9 October 2023 (UTC)
- I did a convert at Template:Copyvio/core/sandbox (hacking in the title by making the entire thing inside the text= parameter). The [show] buttons are awkwardly pushed to the left. For some reason, on minerva, only the title is shown. The blanking div is outside of the ambox in my implementation, so it'll still work.
Also, as you probably know, mboxes disappear entirely on the app which might be confusing to mobile app readers seeing a blank page
You can see the version of this template before the mbox-mimicing here. Aaron Liu (talk) 15:29, 9 October 2023 (UTC)
- I did a convert at Template:Copyvio/core/sandbox (hacking in the title by making the entire thing inside the text= parameter). The [show] buttons are awkwardly pushed to the left. For some reason, on minerva, only the title is shown. The blanking div is outside of the ambox in my implementation, so it'll still work.
- It seems to me that this is a warning template that was never converted to the mbox family of warning templates and is now trying to visually emulate one. As such the provisions taken to have these templates adapt, are missing. However mbox gets special behaviour in the app and minerva skin, which I'm not entirely certain will work icw the unclosed div hack that this template uses. —TheDJ (talk • contribs) 15:22, 9 October 2023 (UTC)
- How do I make it work on the app then? Aaron Liu (talk) 13:22, 9 October 2023 (UTC)
justify text
Hi, how can I justify a Text from the left to the right of a page or a div?
– Doc Taxon • Talk • 13:35, 8 October 2023 (UTC)
- Normally you would use
text-align: justify
as you attempted above, and as shown here:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
That intentionally doesn't justify the last line of a paragraph though, as it's easy for that line to be short and wind up looking silly if justification is attempted. text-align-last: justify
can be used to specify that that's what you really want:
Anomie⚔ 13:51, 8 October 2023 (UTC)
Thank you – Doc Taxon • Talk • 20:55, 8 October 2023 (UTC)
How do I create an UPPERCASE title, please
Example is Euromod whose name is more correctly EUROMOD
Tried DISPLAYTITLE and retreated in disarray! 🇺🇦 FiddleTimtrent FaddleTalk to me 🇺🇦 14:23, 9 October 2023 (UTC)
- All you need to do is move the article to EUROMOD; I have done so for you :) BilledMammal (talk) 14:33, 9 October 2023 (UTC)
- You really don't want to, unless "EUROMOD" is an acronym or initialism and the article doesn't mention it. WP:MOSTM, WP:MOSTITLE#Typographic effects. —Cryptic 14:36, 9 October 2023 (UTC)
- @Cryptic Hmm. The org's title appears to be all capitals. Thoughts, please?
- @BilledMammal Duh! Thank you. Facepalm 🇺🇦 FiddleTimtrent FaddleTalk to me 🇺🇦 14:38, 9 October 2023 (UTC)
- This is not an ancronym or initialism as far as I can tell. And it is pronounced as a word, not as the individual letters. Per MOS:TM and Cryptic please move it back. Jenks24 (talk) 21:05, 9 October 2023 (UTC)
- Done. I apologise that my question triggered a well intentioned but incorrect move. 🇺🇦 FiddleTimtrent FaddleTalk to me 🇺🇦 21:17, 9 October 2023 (UTC)
- This is not an ancronym or initialism as far as I can tell. And it is pronounced as a word, not as the individual letters. Per MOS:TM and Cryptic please move it back. Jenks24 (talk) 21:05, 9 October 2023 (UTC)
Tech News: 2023-41
Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Recent changes
Changes later this week
- The new version of MediaWiki will be on test wikis and MediaWiki.org from 10 October. It will be on non-Wikipedia wikis and some Wikipedias from 11 October. It will be on all wikis from 12 October (calendar).
- Starting on Wednesday, a new set of Wikipedias will get "Add a link" (Swahili Wikipedia, Walloon Wikipedia, Waray Wikipedia, Wolof Wikipedia, Kalmyk Wikipedia, Xhosa Wikipedia, Mingrelian Wikipedia, Yiddish Wikipedia, Yoruba Wikipedia, Zhuang Wikipedia, Zeelandic Wikipedia, Min Nan Wikipedia, Zulu Wikipedia). This is part of the progressive deployment of this tool to more Wikipedias. The communities can configure how this feature works locally. [3]
- At some wikis, newcomers are suggested images from Commons to add to articles without any images. Starting on Tuesday, newcomers at these wikis will be able to add images to unillustrated article sections. The specific wikis are listed under "Images recommendations" at the Growth team deployment table. You can learn more about this feature. [4]
- In the mobile web skin (Minerva) the CSS ID
#page-actions
will be replaced with#p-views
. This change is to make it consistent with other skins and to improve support for gadgets and extensions in the mobile skin. A few gadgets may need to be updated; there are details and search-links in the task.
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
MediaWiki message delivery 14:36, 9 October 2023 (UTC)
Making VE allow for longer alt texts in templates?
I'm looking at a {{Infobox officeholder}} right now, which has a long alt text. The problem is the visual editor puts up an edit dialog which only allows for a single line of text (i.e. it renders it as <input type="text">
). You can enter text that's bigger than the box, but that's a pain to edit. I usually edit it off-wiki and paste it in. By comparison, the image caption field is rendered as a <textarea>
, which is exactly what it should do for alt. I assume this distinction is encoded in the template somewhere, but the template code makes my brain hurt.
This is a generic problem that needs to be fixed in lots of templates, not just {{Infobox officeholder}}. This is related to T346835, but I suspect the solution is different. RoySmith (talk) 15:42, 9 October 2023 (UTC)
- I think that what you are seeing is caused by the
type
for|alt=
being set toline
in the TemplateData section of the template's documentation. Strangely, this part of the documentation is programming code that tells VisualEditor how to behave. The|caption=
parameter has itstype
set tostring
. mw:Extension:TemplateData#Param object explains the difference betweenline
andstring
. The documentation, even though it is programming code that affects how the template works with VisualEditor, is not protected, so you can edit it if you want. – Jonesey95 (talk) 16:03, 9 October 2023 (UTC)- OK, that makes sense. So now the next job will be to figure out how many templates have that (I suspect a boatload) and come up with an automated way to fix them all. RoySmith (talk) 16:39, 9 October 2023 (UTC)
- Um, please don't replace them indiscriminately. There certainly are parameters in which a line break can break the template and therefore the type should be set to
line
. Perhaps OOUI should provide a widget that uses<textarea>
so the text wraps but rejects line feeds for VisualEditor/TemplateWizard (which I had to write myself for RefRenamer). Nardog (talk) 17:49, 9 October 2023 (UTC)- Can you be more specific? What about an alt text is different from the caption that makes a multi-line input box acceptable for one but not the other? I'm only vaguely aware of what OOUI is. Reading mw:OOUI mostly what I learn is that it's obsolete and being replaced by mw:Codex, which I know even less about. RoySmith (talk) 21:11, 9 October 2023 (UTC)
- The point I was making with the sentence about OOUI is that this should be solved not by replacing
line
in TemplateData but by allowing text wrapping to occur in the GUI that receives input for a parameter that's marked astype: line
. Nardog (talk) 21:18, 9 October 2023 (UTC)- OK, that makes sense, thanks. I've opened T348482 and subscribed you to it. RoySmith (talk) 22:03, 9 October 2023 (UTC)
- Have you actually tested a File invocation with
|alt=
on multiple lines? Here's what you get. Bad results. (I know I gave the answer above, but that was a "why" answer, not necessarily a "you should do this" answer. All technical answers should be tested to see if they result in good things happening.) – Jonesey95 (talk) 00:10, 10 October 2023 (UTC)- Yeah, I understand what's going on. That's part of what T348482 is about. My mind boggles that in 2023 we're still writing programs (and I consider a page of HTML to be a program) by smashing strings together and hoping nothing bad happens. RoySmith (talk) 00:18, 10 October 2023 (UTC)
- Have you actually tested a File invocation with
- OK, that makes sense, thanks. I've opened T348482 and subscribed you to it. RoySmith (talk) 22:03, 9 October 2023 (UTC)
- The point I was making with the sentence about OOUI is that this should be solved not by replacing
- Can you be more specific? What about an alt text is different from the caption that makes a multi-line input box acceptable for one but not the other? I'm only vaguely aware of what OOUI is. Reading mw:OOUI mostly what I learn is that it's obsolete and being replaced by mw:Codex, which I know even less about. RoySmith (talk) 21:11, 9 October 2023 (UTC)
- Um, please don't replace them indiscriminately. There certainly are parameters in which a line break can break the template and therefore the type should be set to
- OK, that makes sense. So now the next job will be to figure out how many templates have that (I suspect a boatload) and come up with an automated way to fix them all. RoySmith (talk) 16:39, 9 October 2023 (UTC)
- Using long alt text and the phrasing "Picture of" and "Pictogram" is generally discouraged. See for example this University: https://kb.iu.edu/d/arwg . Personally I think this request and the phab task is invalid. Snævar (talk) 20:21, 9 October 2023 (UTC)
- I tend to trust the advice I get at WT:ALT. In any case, the software should allow for convenient editing of longer text strings. How long we make the strings is an editorial decision, which should be driven by editorial judgement, not coerced by technical limitations of the software. RoySmith (talk) 22:09, 9 October 2023 (UTC)
Account/IP blocks also block purging
On my iPhone, I use Apple's built-in VPN to read Wikipedia, which (since millions of other people are in the same IP range) is understandably blocked from editing. But I discovered today that that same block also prevents me from purging articles on my device (I'm guessing because it uses the same prefix of ?action=...?, though that could be wrong). Unlike editing, though, there are actually legitimate use cases for purging that can't be done elsewhere: mine in particular came from wp:Help desk#Why is the lead image in an article different than on Commons?, where I was experiencing the same bug described there on my phone, and where I suspected the issue was that the wrong image had been cached when I originally requested the page--but I couldn't purge the page on my device to fix it, nor could I perform a null edit (for obvious reasons), meaning I was stuck with the incorrect image.
Are purge blocks a built-in byproduct of IP/account blocking? If not, how should I go about requesting purging be reenabled for that IP range; otherwise if it is, how should I go about requesting that be changed? (I've heard people occasionally mention Phabricator, but the general impression I've gotten from seeing others discuss it is that it's largely a dev/null where even highly-impactful bugs/requests will sit for years before they are addressed, if they're ever seen at all--though again that might be completely wrong, I wouldn't have the slightest idea.) 2600:1012:B183:9AB6:7577:C3BA:1288:6250 (talk) 21:36, 9 October 2023 (UTC)
- Blocked users/IP's may not use purge by design, this is a security mechanism (slightly related to phab:T280232). If you want to issue actions that make changes (including invalidating the cache) you will need to stop using a blocked VPN first. — xaosflux Talk 22:03, 9 October 2023 (UTC)
- The relevant task that removed it is phab:T280226, due to abuse. Izno (talk) 22:37, 9 October 2023 (UTC)
- iPhones have a built-in VPN? InfiniteNexus (talk) 02:53, 10 October 2023 (UTC)
- iCloud Private Relay. Izno (talk) 02:58, 10 October 2023 (UTC)
- I don't think that's a VPN, but I guess it works the same? InfiniteNexus (talk) 03:19, 10 October 2023 (UTC)
- iCloud Private Relay. Izno (talk) 02:58, 10 October 2023 (UTC)
False-positive disambiguation tag
I posted about this at Wikipedia talk:Tags but received no response. Adding {{WikiProject Disambiguation}} to a page incorrectly triggers the disambiguator-link-added
tag, for example here and here. I don't know what is causing the problem, could be the tag or the template or something else, but please fix this. Thanks. InfiniteNexus (talk) 02:48, 10 October 2023 (UTC)
- I expect it has something to do with the template transcluding its corresponding content page in an attempt to be more clever (see Special:Whatlinkshere/Private use area and Special:Whatlinkshere/Moderate Republicans).Also, creating talk pages just to claim them for Wikiprojects is lame in general already - a bluelinked talk page used to mean something! - but for WikiProject Disambiguation it's specifically documented against. —Cryptic 03:01, 10 October 2023 (UTC)
- Now I'm really confused, because I checked Recent changes to see if others were creating talk pages just for WikiProject tags, and I can't figure out why this and this were flagged as having DAB links. The articles themselves are not DAB pages, and they aren't linked to any DAB pages either. Very strange. InfiniteNexus (talk) 03:18, 10 October 2023 (UTC)
- Talk:Mauro Morelli is because Wikipedia:WikiProject Catholicism/to do includes a link to Chiro, a dab page. Talk:Jonathan Carbe is because {{WikiProject Athletics}} calls Module:WikiProject banner, which checks if Athletics, a dab page, exists, which adds it to the list of outgoing links. Found via [5]. Nardog (talk) 03:39, 10 October 2023 (UTC)
- Wow. So any idea how this can be fixed? InfiniteNexus (talk) 04:47, 10 October 2023 (UTC)
- There is nothing to fix. I've just shown you these are not false positives. An ability to check if a page exists without being counted as a link has been requested though. Nardog (talk) 04:58, 10 October 2023 (UTC)
- If you really need to check whether a page exists without recording a link and understand the consequences, I created {{Linkless exists}}. Certes (talk) 09:00, 10 October 2023 (UTC)
- There is nothing to fix. I've just shown you these are not false positives. An ability to check if a page exists without being counted as a link has been requested though. Nardog (talk) 04:58, 10 October 2023 (UTC)
- Wow. So any idea how this can be fixed? InfiniteNexus (talk) 04:47, 10 October 2023 (UTC)
- Talk:Mauro Morelli is because Wikipedia:WikiProject Catholicism/to do includes a link to Chiro, a dab page. Talk:Jonathan Carbe is because {{WikiProject Athletics}} calls Module:WikiProject banner, which checks if Athletics, a dab page, exists, which adds it to the list of outgoing links. Found via [5]. Nardog (talk) 03:39, 10 October 2023 (UTC)
- Yes, do elaborate, what did it mean back then? Gonnym (talk) 09:12, 10 October 2023 (UTC)
- That someone had actually talked about the article, e.g. suggested a change that required discussion? Certes (talk) 09:14, 10 October 2023 (UTC)
- There are enough talk pages posts that clearly show otherwise (also, I wasn't really expecting an answer, as the premise of "back in the old days" comment is ridiculous seeing as how WikiProjects have been around since 2001 and Template:WPBannerMeta since 2008, so for at least 15 years it hasn't meant what they implied it did). Gonnym (talk) 09:23, 10 October 2023 (UTC)
- That someone had actually talked about the article, e.g. suggested a change that required discussion? Certes (talk) 09:14, 10 October 2023 (UTC)
- Now I'm really confused, because I checked Recent changes to see if others were creating talk pages just for WikiProject tags, and I can't figure out why this and this were flagged as having DAB links. The articles themselves are not DAB pages, and they aren't linked to any DAB pages either. Very strange. InfiniteNexus (talk) 03:18, 10 October 2023 (UTC)
- It's because {{WikiProject Disambiguation}} calls {{#invoke:Redirect|isRedirect}} with the name of the subject page, which adds the page to the list of outgoing links. Nardog (talk) 03:27, 10 October 2023 (UTC)