< Tech‎ | Archives

Lua equivalent of mw:API:Categorymembers?

I'm working on commons:Module:Tricolor, and it would be useful if I could generate a list of all the direct subcategories of commons:Category:Combinations of 3 colors. It seems like the categorymembers API does something in this vein for JavaScript, PHP and Python. Is there a way to access this information from a Lua module? —CalendulaAsteraceae (talkcontribs) 09:18, 25 December 2023 (UTC)

@CalendulaAsteraceae: I don’t think there is. Due to the complexity invalidating the right caches, it’s not that easy to implement a such function – a problem that doesn’t exist when using the action API. —Tacsipacsi (talk) 21:22, 25 December 2023 (UTC)
Thank you, that's good to know! —CalendulaAsteraceae (talkcontribs) 07:52, 2 January 2024 (UTC)

CSS help for this page

I've made Tech/Header use CSS (Tech/Header/styles.css), which makes the page code look nicer and fixes the appearance of the "Ask a question" button. Based on the note at the top of the header page which says "this page contains changes which are not marked for translation" I assume I need to do something to make the changes propagate to this page; what is it? —CalendulaAsteraceae (talkcontribs) 08:41, 2 January 2024 (UTC)

Thanks for the improvements! The interface message is referring to an action that only Meta:Translation administrators can do, and one of them has done so. Thanks again. Quiddity (WMF) (talk) 23:46, 5 January 2024 (UTC)

HotCat gadget not working on hy.wikipedia

Hi! On Armenian wikipedia (hywiki) HotCat gadget is not working since January 5, 2024.

Please can you help to solve this problem!

Thank you in advance! Kareyac (talk) 16:59, 5 January 2024 (UTC)

@Kareyac: See mw:Help:Locating broken scripts for how you can investigate the problem yourself. Or maybe phab:T354416 is related. --AKlapper (WMF) (talk) 07:36, 6 January 2024 (UTC)
AKlapper (WMF), thank yu again. - Kareyac (talk) 07:45, 6 January 2024 (UTC)

search problems at Wk-kbd

Hi. On Kabardian wiktionary the palochka is causing problems with search. The problem is that they use the Unicode characters for cap and l.c. palochka, but people using the search engine will generally use the digit '1' or a capital Latin 'I' (occasionally Ukrainian Cyrillic 'I' or Latin l.c. el). These are not treated as equivalent by the engine, so no search results are returned. I assume the solution would be similar to how straight/curly quotes are treated, or apostrophe for Hawaiian okina. Where would be the proper place to go for this?

Thanks, Kwamikagami (talk) 23:54, 6 January 2024 (UTC)

@Kwamikagami: Following mw:How to report a bug and filing a feature request against CirrusSearch. --AKlapper (WMF) (talk) 08:18, 7 January 2024 (UTC)
Thank you! Kwamikagami (talk) 08:24, 7 January 2024 (UTC)

Admin Access Request


IT sent me over here to request admin access for As part of the onboarding process, Ops adds new hires to that site. Please advise.

Thank you,

Ally Stariha AStariha-WMF (talk) 20:29, 19 January 2024 (UTC)

@AStariha-WMF Hi, I do some maintenance on To my knowledge, a super admin account can't create new users. We don't have admin accounts for the whole site (only superadmin which has a pretty large access). If you want to add emails for new hires to some mailing lists (and remove them in case of offboarding), you don't even need to create an account for them, you can just add the email address directly. You just need to be admin in some mailing lists (like wmfreqs-l, etc.) and I can take care of that.
TLDR: What is your specific usecase and I can help you get it done. ASarabadani (WMF) (talk) 15:05, 22 January 2024 (UTC)

I cannot vote

I have been trying to hit the vote button for Turkmen's Steward campaign, but the message will not show up. Is my account not actually eligible to vote or is it something else? GoutComplex (talk) 15:11, 6 February 2024 (UTC)

@GoutComplex: You could try to manually cast a voce clicking on "Edit" if you're not able to see the script (maybe your javascript is disabled) :) --Superpes15 (talk) 15:14, 6 February 2024 (UTC)
@GoutComplex: Ah, just noticed, the right page is this one :) Superpes15 (talk) 15:16, 6 February 2024 (UTC)
Some users had such problems last year as well. The peculiarity is that all these users had few or 0 local edits. I think this happening because users are not autoconfirmed. In this case, need to add vote manually, through "Edit", yes. ❄️Mykola❄️ 15:21, 6 February 2024 (UTC)

Adding comments and quotes by the visual editor

I don't have the button to add comments and quotes. I really need this, and I'm pretty new to using mediaWiki. Would appreciate help. Nchmn (talk) 21:43, 12 February 2024 (UTC)

Question about using the MediaWiki API to edit pages

I want to use the MediaWiki API to edit pages. And when:

  • My query parameters include "token" (CSRF token), it told me "The following parameter was found in the query string, but must be in the POST body: token."
  • When I move it to the body of the POST, 'The "token" parameter must be set.'
  • No matter how I use it, it responds with a 301 error.

Is it something wrong with the server? Or my code... The content below is my code(in Dart):

final headers = {
  'User-Agent': 'WikiApp/1.0 contact: [email]',
  'Authorization': 'Bearer $credentials', 
final code = await
      scheme: 'https',
      host: fullServerName,
      path: '${wgScriptPath}api.php',
      queryParameters: {
        'action': 'query',
        'meta': 'tokens',
        'format': 'json',
var data = code.body;
final Map wikiTOC = jsonDecode(data);
String token = wikiTOC['query']['tokens']['csrftoken'];
final apiUrl = Uri(
  scheme: 'https',
  host: wgServer,
  path: '${wgScriptPath}api.php',
  queryParameters: {
    'action': 'edit',
    'format': 'json',
    'title': PageName,
    'summary': 'Edited via MyApp',
    'text': textContent,
    'token': token,

final response = await
  headers: headers,

--Creamycd (talk) 06:44, 17 February 2024 (UTC)

By the way, the full code has been MITed to GitHub--Creamycd (talk) 08:58, 17 February 2024 (UTC)

Sorry, wrong place --Creamycd (talk) 09:01, 17 February 2024 (UTC)

Getting Details Of Videos and Audio From the API


I'm writing to follow up on my API call results. While I was able to successfully retrieve images and descriptions for my search keyword.


I couldn't locate any information related to audio files & a video files.

Could you please clarify if audio & video files are included in the API response for this particular search? If not, is there another way to access audio & video files related to my search keyword on this platform using Specific API?

Thank you! UsmanKhanLodhi (talk) 07:29, 11 March 2024 (UTC)

OpenStreetMap does not work anymore

I have noticed that OpenStreetMap does not work in any wiki, including Commons, Wikipedia, Wikidata etc. Instead of showing a dynamic map from OpenStreetMap, it shows a white screen. I have noticed this thing in commons:Category:Kolkata and also in wikidata:Q1348. Sbb1413 (he) (talkcontribs) 18:41, 25 March 2024 (UTC)

Works for me. AntiCompositeNumber (talk) 01:26, 26 March 2024 (UTC)
I have now opened commons:Data:Lok Sabha constituencies/2019/West Bengal/Kolkata and it still shows a white screen without any dynamic map. Sbb1413 (he) (talkcontribs) 14:35, 26 March 2024 (UTC)
Map works fine here. Please check for relevant errors in your web browser's developer tools (network tab and console tab), and/or try a different web browser and/or internet connection. --AKlapper (WMF) (talk) 15:10, 26 March 2024 (UTC)
Thanks, it works! I've removed the following code in commons:User:Sbb1413/commons.js:

importScript('User:Kanonkas/twinkle.js'); mw.loader.load('//');

Sbb1413 (he) (talkcontribs) 15:17, 26 March 2024 (UTC)
However, after refreshing the webpage, the problem comes back. Sbb1413 (he) (talkcontribs) 15:20, 26 March 2024 (UTC)
See my previous comment: Please check for relevant errors in your web browser's developer tools (network tab and console tab), and/or try a different web browser and/or internet connection. --AKlapper (WMF) (talk) 15:53, 26 March 2024 (UTC)

Mediawiki latest file download problem

Anyone can gave me the solution of mine problem, because i downloaded the mediawiki and the file is corrupted. 10:01, 26 March 2024 (UTC)

Wrong place; see mw:Project:Support_desk instead (and provide way way more information there). --AKlapper (WMF) (talk) 15:09, 26 March 2024 (UTC)

en.wikt: Request for list of pages by time usage

Please see [1]. Here on Wiktionary we have the problem that some pages occasionally runs out of time for a while, usually until someone performs a null edit on the page. So I thought a list of pages that use a lot of time would be helpful. I figured that there are some Special Pages that generate lists of entries, so perhaps my requested information could be generated similarly. --Kc kennylau (talk) 21:29, 30 March 2024 (UTC)

There is a slow parse log but im not sure its public. Maybe someone with access can give you a list filtered to enwikt. Bawolff (talk) 21:44, 7 April 2024 (UTC)

Disable hiding the sidebar for anonymous users in Vector 2022


I want to change default Vector 2022 behavior for anonymous users and make is the same as for logged in users. By default, wiki hides the sidebar with every new page load, and displays the TOC. We want to achieve the following: - Keep the sidebar open by default - Keep the table of contents hidden by default

Failing that, is there any way to maybe move the table of contents back inline (into main content area, as it was in the previous version of Vector) or maybe push the table of contents under the sidebar? We created custom navigation for our wiki content and placed in the sidebar, but we need to keep the sidebar open for users. What can we do to keep the sidebar and do something to move the TOC out of the way? 08:34, 9 April 2024 (UTC)

Hi, see the page header: Tech-related questions about third-party wikis should be asked at mw:Project:Support desk. Thanks, --AKlapper (WMF) (talk) 09:00, 9 April 2024 (UTC)
Sorry, missed that. I moved the question, thank you. 12:36, 9 April 2024 (UTC)

Search Results Metadata Issue on Wikimedia or Infobox

I conducted a search for "Solar eclipse of 2024 April 8" in English on Wikimedia, expecting an accurate page description.

Here are the search results for the page and search results for the Category.

However, the metadata provided was in languages such as Spanish, Hungarian, Basque (I think), and German. Additionally, no image was displayed for the page with the metadata. Both instances show strange metadata in unrelated languages, alongside the presence of code like "<nowiki> 2024ko 8ko," which is counterintuitive and requires attention.

Results for other pages appear normal; it's just these two pages that are affected.


Solar eclipse of 2024 April 8

<nowiki>eclipse solar del 8 de abril de 2024; 2024. április 8-i napfogyatkozás; 2024ko apirilaren 8ko eguzki eklipsea; eclipse solar del 8 d'abril de 2024; Sonnenfinsternis...

The page seems to be using {Wikidata Infobox}. The description on the page appears to be the names of the corresponding page as listed on Wikidata at d:Q2620078. It's unclear why this template is pulling in data in this manner.

I suspect the issue might not be caused by a software malfunction but rather by an error in the infobox code or user-provided data.

Can you please address this issue? Thank you. AceSeeker (talk) 17:44, 14 April 2024 (UTC)

Renderization of symbol "not greater than"

Depending on the browser, the LaTeX alternative is the only one which correctly overlays the slash over the angle bracket:

  • Poor-man's: 1≯ 2
  • Unicode: 1≯2
  • HTML: 1≯2
  • LaTex:  

On Windows, it works in Firefox but it doesn't work in Chrome.


- Would it be possible to make it work in any browser? Otherwise, fellow editors are suggesting rewriting everything in LaTeX. Previous discussions:

Thanks! Fgnievinski (talk) 18:02, 10 April 2024 (UTC)

FTR, the first three techniques are all effectively the same, just using U+226F. Beland (talk) 01:44, 12 April 2024 (UTC)
Just for the record, the input text is different: Fgnievinski (talk) 12:55, 12 April 2024 (UTC)
It seems to me that this is due to incomplete support of these characters in one or more of the fonts of Windows (which happens to be used by Chrome). I don't have Windows, but there is no guaranteed way of fixing this, other than outputting images. It should be noted however that latex input is switching to mathml (non-image) output, so switching everything over to latex does not seem like a good idea. Better is to complain with Microsoft to fix their fonts, or problems like these will never be fixed. —TheDJ (talkcontribs) 09:25, 15 April 2024 (UTC)
It works in Firefox for Windows. Fgnievinski (talk) 02:12, 16 April 2024 (UTC)
The best way to fix it would probably be for Wikipedia to ship a font including all of the necessary math glyphs, and list it first in CSS. Jacobolus (talk) 03:42, 20 April 2024 (UTC)

Escalated here: en:Wikipedia talk:Manual of Style/Mathematics#Not-greater-than rendering problems. Fgnievinski (talk) 04:40, 18 April 2024 (UTC)

Broken century format - Occitan Wikipedia


So the Occitan Wikipedia has started using Modèl:Infobox Persona, pulling information from Wikidata. When only the century of a person's birth is known on Wikidata, such as Aliç de Montmorencí, we want it to say "sègle XII" and link to the twelfth century. Yet somehow it instead says "sègle de 12", and links to the YEAR TWELVE! I've been poking and prodding the code and Translatewiki and can't figure this out. Can someone please help me?

Best, Briantin de Montrei (talk) 07:29, 24 April 2024 (UTC)

It's since been fixed. All good! Briantin de Montrei (talk) 07:23, 25 April 2024 (UTC)

Spaces in Lua

Hello. Is there a way to throw an error in Lua with consequent spaces? I want to do something like

error('The name "New       York" is not correct, please use "New York" instead')

but none of regular tricks I try do not help. Thank you. IKhitron (talk) 12:48, 24 April 2024 (UTC)

@IKhitron: I guess what you want is not "make this code work", but "make the error render with multiple spaces" (since multiple spaces in HTML are always reduced to one).
For example, you could replace multiple spaces with underscores or non-breaking spaces (but these will probably be escaped on render) with code like mw.ustring.gsub(str, string.rep(' ', 2) .. '+', function (m) return string.rep('_', #m) end)
Isn't it possible to just make the code sanitize the input and accept multiple spaces? --Matěj Suchánek (talk) 16:25, 28 April 2024 (UTC)
Thanks for your answer. This is fine, but not enough, unfortunately. For now, I've replaced them by "<multiple spaces>", and it's not enough either.
I could sanitize it, of course, but in this particular case I prefer a non-ambiguous input. IKhitron (talk) 16:51, 28 April 2024 (UTC)

Search bar disappeared

There used to be a search bar where I could search for whatever I want. However, the search bar is no longer present in any wiki, and the search button is also non-functional. I have to go to Special:SpecialPages to search. Sbb1413 (he) (talkcontribs) 05:44, 1 May 2024 (UTC)

osm4wiki - new version in progress

My tool osm4wiki shows coordinates on an OpenStreetMap map and is used by

  • Vorlage:All Coordinates
  • Vorlage:Hinweis Seiten-Koordinaten
  • Vorlage:CoordinatesPage

I started to write this tool in 2011 and it is time to update it.

  1. if too many locations are close together, the markers shall be replaced by an ellipse which shows the number of replaced markers.
  2. I replace the tool "kmlexport" and include its functions into my tool.
  3. The tool "kmlexport" is able to search for coordinates up to three levels, that means it is able to search for coordinates in an articel which was linked by another article which was linked by another article which was linked by the article where "kmlexport" was invoked. If I understand correctly, the actual versions of the above mentioned templates have only the option "linked = 1" which means that there is only one level available. I agree with this limitation totally!
  4. The old version of my tool had to wait until "kmlexport" had collected all coordinates from linked pages before it could start working, and this may take long time. The new version shall show the coordinates from the first linked page, then it adds the coordinates from the second linked page and so on. Perhaps this takes a little bit longer than before, but the user can see that something is happening!
  5. New markers with shadow :)

The new version is under development on my own server. There are only a few articles linked as example but you can get an idea how it works: Test links
Have fun! --Plenz (talk) 20:05, 2 May 2024 (UTC)

Custom local buttons in WikiEditor panel get inserted in random unpredictable order in Chechen Wikipedia

Buttons of connected gadgets, for example, a Wikificator after renewal. Pages are mixed in the middle and back to the right. In Russian, all the gadget buttons on the left. Mozilla Firefox browser. Can't you make them stay in its place? 20:41, 8 May 2024 (UTC)

I wrote this! Takhirgeran Umar (talk) 20:51, 8 May 2024 (UTC)

Email: $wgSMTP not working

Hello With $wgSMTP i have a problem, it ist not working. I don't know from which update- status this happens. For sure this was working in march 2024.

I get this error-message if i wnat sent a email: Failed to connect to tls:// [SMTP: Failed to connect socket: (code: -1, response: )]

to the History i can tell that before i use 1und1. I got a Hotmail adress taking the parameters and i got the above error message. I switched back to the old konfiguration and find out, getting the same error massage (see above)

Version: MW 1.39.7

LocalSettingsparameter. $wgSMTP = array(

   'host'     => 'tls://', // could also be an IP address. Where the SMTP server is located
   'IDHost'   => 'Sokradia von CC-Zeitlos',  // Generally this will be the domain name of your website (aka
   'port'     => 587,                        // Port to use when connecting to the SMTP server
   'auth'     => true,                      // Should we use SMTP authentication (true or false)
   'username' => '',   // Username to use for SMTP authentication (if being used)
   'password' => 'XXXXX'             // Password to use for SMTP authentication (if being used)


Can somebody help to this topic Sokradia (talk) 05:56, 11 May 2024 (UTC)

Please see the notice at the top of this page. This page only provides support for issues related to a Wikimedia wiki. — JJMC89(T·C) 18:54, 11 May 2024 (UTC)
Thank you for this help.
With this parameters it is working for Outlook/Hotmail.
'host' => '', // could also be an IP address. Where the SMTP server is located
'IDHost' => 'Sokradia von CC-Zeitlos', // Generally this will be the domain name of your website (aka
'port' => 587, // Port to use when connecting to the SMTP server
'auth' => true, // Should we use SMTP authentication (true or false)
'username' => '', // Username to use for SMTP authentication (if being used)
'password' => 'XXXXX' // Password to use for SMTP authentication (if being used)
for Outlook there is no need take the TLS with.
I not understand really because the port 587 is used for TLS. but it seems that for Outlook they are using STARTTLS which is not supported by the PHP-Server.
I use PHP 8.2.xx
Thanks a lot Sokradia (talk) 05:19, 12 May 2024 (UTC)
This is NOT THE PLACE FOR THIRD-PARTY WIKI SUPPORT. Read the header and ask at the appropriate place. You won’t get an answer here. —Tacsipacsi (talk) 19:25, 12 May 2024 (UTC)

Registration date

Hi, I registered on EN Wikipedia at 04:24, 12 October 2007, yet CentralAuth shows Registered: 00:18, 28 February 2012 (12 years ago). I understand that the reason given is always that the account became a global account, But why does it have to be like this? A registration date is what it is, and the global account date decreases the precision of registration time. I hope it changes. Mystrixo (talk) 06:56, 10 May 2024 (UTC)

You registered in a time before registration dates were being tracked. As you didn't have activity between 2007 and 2012, it cannot give a more accurate date for your account registration unfortunately. —TheDJ (talkcontribs) 09:40, 13 May 2024 (UTC)

Are you going to migrate to Jetpack Compose for the android app?

Maybe this is the wrong place but I think that migrating to Jetpack Compose would be a good idea for making the code more simple and "modern" because it's the new and recommended way by Android to build android apps with it. Richard5ADev (talk) 19:03, 13 May 2024 (UTC)

I don’t know if it’s planned, but you’ll probably get an answer more quickly on mw:Talk:Wikimedia Apps. By the way, my opinion is “don’t fix it if it’s not broken”: it may make sense to write new things with Compose, or even rewriting parts that need to be touched anyway, but touching code only to rewrite it from XML to Kotlin has no real benefit, but has the potential for introducing regressions. —Tacsipacsi (talk) 20:36, 14 May 2024 (UTC)