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.
|
Lua date formats
Hello everyone, does anyone know how to get Lua accepted two date format at the same time? That is. YYYY-MM-DAY and DD-MM-YYYY. I have tried my all to get them both work together at the same time in lua module Wikipedia but that's impossible for me. Only one type of date format can only work at the same time.
Thisasia (Talk) 06:40, 27 April 2024 (UTC)
- Accepting a date like 01-02-2020 would not be a good idea at Wikipedia where some would think January 2, 2020 while others would see 1 February 2020. Where is this needed? Johnuniq (talk) 08:09, 27 April 2024 (UTC)
- alright thanks for telling me that, I'm build a new dynamic and multipurpose infobox in lua by integrating all functionality in one Template, but the current programed date format is in something like 01-02-2020 so which date format is well acceptable for Wikipedia?
Thisasia (Talk) 09:43, 27 April 2024 (UTC)- YYYY-MM-DD
- —Trappist the monk (talk) 11:05, 27 April 2024 (UTC)
- See more at MOS:DATEFORMAT. YYYY-MM-DD is the only allowed format using a number for the month. PrimeHunter (talk) 12:04, 27 April 2024 (UTC)
- @PrimeHunter noted that, I have changed it, thanks for your reply.
Thisasia (Talk) 12:44, 27 April 2024 (UTC)
- @PrimeHunter noted that, I have changed it, thanks for your reply.
- Thanks for your reply.
Thisasia (Talk) 12:45, 27 April 2024 (UTC)- Module:Date accepts a variety of dates formats, for example, 2024-04-27 or 27 April 2024 or April 27, 2024 (all allowed at Wikipedia) and only allows valid dates. Johnuniq (talk) 03:47, 28 April 2024 (UTC)
- Got it, Thanks very much for pointing out.
Thisasia (Talk) 05:00, 28 April 2024 (UTC)
- Got it, Thanks very much for pointing out.
- Module:Date accepts a variety of dates formats, for example, 2024-04-27 or 27 April 2024 or April 27, 2024 (all allowed at Wikipedia) and only allows valid dates. Johnuniq (talk) 03:47, 28 April 2024 (UTC)
- seconding YYYY-MM-DD which is not only the most logical but also sorts properly and is an international standard jp×g🗯️ 19:00, 28 April 2024 (UTC)
- See more at MOS:DATEFORMAT. YYYY-MM-DD is the only allowed format using a number for the month. PrimeHunter (talk) 12:04, 27 April 2024 (UTC)
- alright thanks for telling me that, I'm build a new dynamic and multipurpose infobox in lua by integrating all functionality in one Template, but the current programed date format is in something like 01-02-2020 so which date format is well acceptable for Wikipedia?
- Why are we going through this again when MOS:DATE was settled years ago? We don't use all-numeric dates except in certain special situations, and even then, only CCYY-MM-DD is permitted. If you want that changing, WT:DATE is the place to do it but (i) make sure that you inform WP:VPP; (ii) be prepared for massive kickback. --Redrose64 🌹 (talk) 22:07, 28 April 2024 (UTC)
- Ah I see, well I wasn't actually aware of the standard at first I'm now familiarising with the policy.
Thisasia (Talk) 04:49, 29 April 2024 (UTC)
- Ah I see, well I wasn't actually aware of the standard at first I'm now familiarising with the policy.
Strange bug on Flag of Russia article
![](http://upload.wikimedia.org/wikipedia/en/thumb/b/be/Bug_on_Flag_of_Russia_article.png/220px-Bug_on_Flag_of_Russia_article.png)
Is anyone else also seeing this bug on Flag of Russia? There are two major headers saying "User:CheezDeez ON TOP" that appear inside the infobox (this user is also blocked for sockpuppetry, but I don't think they have ever edited this article). I can't find anything in the wikitext that might produce this text, and the bug also doesn't show up in preview mode either. Liu1126 (talk) 13:41, 28 April 2024 (UTC)
- I was reverting all these edits when it was happening (in this specific case, Special:Diff/1221172528), but it seems this article didn't refresh when I undid the changes. I gave the page a null edit, and the content is fixed again now. Aidan9382 (talk) 13:44, 28 April 2024 (UTC)
- Ah, that explains it. Thanks for reverting! Liu1126 (talk) 13:48, 28 April 2024 (UTC)
- Hi! I noticed the same issue in the Haaretz article (Template:Literal translation) and the Tiger article (Template:MirrorH). I see you've already reverted the vandalistic changes to both templates, but the articles I linked don't appear to have been refreshed yet. Could you refresh them as well, or otherwise let me know how I could do that? Thanks! Wavevari (talk) 15:17, 28 April 2024 (UTC)
- I've gone ahead and fixed those pages. The process is called a null edit, though purging the page normally would probably also work. Aidan9382 (talk) 15:26, 28 April 2024 (UTC)
- Thank you for the fixes and for the additional information! Wavevari (talk) 15:30, 28 April 2024 (UTC)
- It’s the same for the Vagina article. Autisticeditor 20 (talk) 17:40, 28 April 2024 (UTC)
- never mind Autisticeditor 20 (talk) 17:42, 28 April 2024 (UTC)
- It’s the same for the Vagina article. Autisticeditor 20 (talk) 17:40, 28 April 2024 (UTC)
- Thank you for the fixes and for the additional information! Wavevari (talk) 15:30, 28 April 2024 (UTC)
- I've gone ahead and fixed those pages. The process is called a null edit, though purging the page normally would probably also work. Aidan9382 (talk) 15:26, 28 April 2024 (UTC)
Erroneous page archiving by ClueBot III
ClueBot III (talk · contribs · count · logs · page moves · block log · edit summaries) seems to be occasionally archiving pages incorrectly to Archives/_1 and ignoring the configuration on the page. Examples from various namespaces: 1, 2, 3, 4. This was reported on the ClueBot Commons talk page yesterday by @MrPersonHumanGuy: ping. Other examples can be found in the contributions log. Local Variable (talk) 13:51, 28 April 2024 (UTC)
- The four pages have one things in common: inside the
{{User:ClueBot III/ArchiveThis}}
, the first part of the|archiveprefix=
parameter does not begin with the name of the page that is being archived. For three of the four, this is because a page move occurred at some point in the recent past and the archiving config wasn't amended to suit; in the case of User talk:Spiderjiu it's because the archiving was set up badly. The other main archiving bot, lowercase sigmabot III (talk · contribs), guards agains this by refusing to archive a page when the first part of the|archive=
parameter does not begin with the name of the page that is being archived. --Redrose64 🌹 (talk) 17:27, 28 April 2024 (UTC)- @K6ka has since updated the docs to advise editors to change the template when moving the page (I'm not overly optimistic editors will heed that warning). Local Variable (talk) 23:26, 28 April 2024 (UTC)
“Request Desktop Site” on IPad does not work
I would like to use Desktop mode while on my iPad (IPad Air gen 4, IpadOS 17 , safari)
Although I have “request desktop site” selected, Wikipedia redirects to Mobile (en.m.wikipedia.org)
How can I use desktop Wikipedia on iPad? Tonymetz 💬 17:22, 28 April 2024 (UTC)
- @Tonymetz: "request desktop site" is a feature in some mobile browsers. I don't know whether it's supposed to work with Wikipedia. The normal way to choose the desktop version of Wikipedia is the "Desktop" link at the bottom of pages in the mobile version. The link is made by MediaWiki and not the browser. PrimeHunter (talk) 17:47, 28 April 2024 (UTC)
- In fact, the browser feature does not work. phab:T60425 is the task for it. Izno (talk) 18:14, 28 April 2024 (UTC)
- Thanks I’ve subscribed. 11 years let’s keep our fingers crossed. Thanks for the tip on the desktop link I see it now. It had been cut off by my iPad keyboard bar. Tonymetz 💬 22:06, 28 April 2024 (UTC)
- In fact, the browser feature does not work. phab:T60425 is the task for it. Izno (talk) 18:14, 28 April 2024 (UTC)
- There are userscripts that will auto redirect you from the mobile to the desktop site, User:Þjarkur/NeverUseMobileVersion for instance. -- LCU ActivelyDisinterested «@» °∆t° 18:24, 28 April 2024 (UTC)
Removing gap between templates
After updating the template styling of my user page, I managed to get most things as I wanted except for a gap between the "Start tab" template and the bordered box that comprises the rest of the page. Is there a way I could put the bordered box into the template, or make an adjustment to how they are configured, to remove the gap between them? -CoolieCoolster (talk) 23:26, 28 April 2024 (UTC)
- @CoolieCoolster i have seen your page, are you referring to the gap between the "start tab" and your userboxes section, if so then I can help you with that or can you be more specific and explain properly? You may discuss with me on my talk page if I didn't respond here on time.
Thisasia (Talk) 05:23, 29 April 2024 (UTC)- I meant the thin white line that appears between the template that creates the tabs and the section that encloses the rest of the page's content. As I reused the format on the other three tabs, each one has the same white gap. -CoolieCoolster (talk) 05:26, 29 April 2024 (UTC)
- OK the thin whit
- line e u are talking abo are you referring the start tab or your userboxe table? t
Thisasia (Talk) 05:29, 29 April 2024 (UTC)- Above that; it splits the dark red section at the top in two.-CoolieCoolster (talk) 05:41, 29 April 2024 (UTC)
- Pretty not much clear, but see what I found so far.
- there is a huge gap between the start tab and your userboxes section may be making it look unsatisfying since you applied the same background color to both of them
- there is also a thin line that appears at the start tab when scrolled from either left or right. But except that I couldn't figure anything else.
Thisasia (Talk) 05:54, 29 April 2024 (UTC)- I'm guessing the first issue you described is what it is; both halves using the same color is intentional, as ideally I'd like to find a way for the content of the page to be within the box connected directly to the tabs, but doing so while also having a border around the page seems to be a conundrum. -CoolieCoolster (talk) 06:36, 29 April 2024 (UTC)
- Alright I do have solution for that. If you do permit me i will edit your page directly, and after that if that's not what you described we can find further. But first of all, take a look at the top of this page, it has similar start tab as yours and the start tab isn't separated from the rest of the page unlike yours that splits, check and tell if this is actually your point.
Thisasia (Talk) 07:02, 29 April 2024 (UTC)
- Alright I do have solution for that. If you do permit me i will edit your page directly, and after that if that's not what you described we can find further. But first of all, take a look at the top of this page, it has similar start tab as yours and the start tab isn't separated from the rest of the page unlike yours that splits, check and tell if this is actually your point.
- I'm guessing the first issue you described is what it is; both halves using the same color is intentional, as ideally I'd like to find a way for the content of the page to be within the box connected directly to the tabs, but doing so while also having a border around the page seems to be a conundrum. -CoolieCoolster (talk) 06:36, 29 April 2024 (UTC)
- Pretty not much clear, but see what I found so far.
- Above that; it splits the dark red section at the top in two.-CoolieCoolster (talk) 05:41, 29 April 2024 (UTC)
- I meant the thin white line that appears between the template that creates the tabs and the section that encloses the rest of the page's content. As I reused the format on the other three tabs, each one has the same white gap. -CoolieCoolster (talk) 05:26, 29 April 2024 (UTC)
- Move the closing div tag to after the table...then reduce the border width? — GhostInTheMachine talk to me 07:07, 29 April 2024 (UTC)
- Someone did that for me earlier today it seems, so the issue has been resolved, but thanks for the help! -CoolieCoolster (talk) 18:52, 29 April 2024 (UTC)
Curious ephemeral js error
I turned on the "display js errors" gadget a few days ago. Today I got an error something like "unhandled exception missing ) for argument list line 23". Since the gadget pop-up fades away quickly, I refreshed the page a few times to try and select and copy the error. I then took a look at the source: line 23 is (for me) }];});});</script>
. After looking at this I tried again to copy the error, but it had gone.
I compared the script which runs from line 6 to 23 before an after the error with an on-line diff, no apparent difference.
Anyone know why this might have happened? All the best: Rich Farmbrough 08:34, 29 April 2024 (UTC).
- I got it too, so I filed phab:T363701. It happened whenever the CentralNotice banner for the U4C voting was displayed. But it stopped at some point even when I got the banner. I wonder if something was backported and fixed it. Nardog (talk) 22:44, 29 April 2024 (UTC)
- The banners are maintained on Meta-Wiki as wiki pages. You can find them on m:Special:CentralNotice, if you can figure out the interface (I struggle with it). I think this was the edit that fixed it: https://meta.wikimedia.org/w/index.php?title=MediaWiki:Centralnotice-template-u4c_election2024_vote2&diff=prev&oldid=26702487 Matma Rex talk 09:18, 30 April 2024 (UTC)
Thank you both. All the best: Rich Farmbrough 09:48, 1 May 2024 (UTC).
Help with regex statement
Hi, I need help with the following regex, which I did not write and don't understand well enough to fix. That statement is:
(?<!/)(?<!\\?url=)https?://(?:[\\w-]+\\.)*wikisophia[.]org[\\w/.\\-#?&=]*
The intent is to match all URLs such as:
http://wikisophia.org/index.php?title=Constitution_Act,_1871_(annotated)
But not archive URLs such as:
https://web.archive.org/web/20010101010101/http://wikisophia.org/index.php?title=Constitution_Act,_1871_(annotated)
https://webcitation.org/fgT654?url=http://wikisophia.org/index.php?title=Constitution_Act,_1871_(annotated)
Currently the regex is only partially matching and returning:
http://wikisophia.org/index.php?title=Constitution_Act
..anything after the "," is not matched. Same if there is a ":" or other similar characters.
Suggestions? -- GreenC 19:21, 29 April 2024 (UTC)
- You need to add the relevant characters (possibly escaped?) to
[\\w/.\\-#?&=]
. Izno (talk) 19:59, 29 April 2024 (UTC) - Almost any character can appear in a URL, especially after
?title=
. It may be better to accept anything except whatever delimits a URL in the relevant context, e.g. for parsing {{cite web|url=http...}} use[^|}]*
or for space-delimited [http... Description of page] try\\S*
. The former may pick up unwanted spaces unless we complicate it as something like.*?(?=\\s*[|}])
(grab any characters, but as few as possible, as long as optional spaces then | or } follows). Certes (talk) 00:14, 30 April 2024 (UTC)- OK, building on that idea, this solution is imperfect, but it will work in most cases. I'm not using it for critical purposes (log files, counting) so YMMV:
(?<!/)(?<!\\?url=)https?://(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])[.])*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])*wikisophia[.]org[^\\s\\]|}{<]*[^\\s\\]|}{<]*
- The gobbly between https and wikisophia is for matching hostname(s) at multiple levels per this. -- GreenC 05:34, 30 April 2024 (UTC)
- In case anyone is trying this regex, it had an error corrected: Special:Diff/1221562167/1221571619 -- GreenC 18:16, 30 April 2024 (UTC)
- OK, building on that idea, this solution is imperfect, but it will work in most cases. I'm not using it for critical purposes (log files, counting) so YMMV:
Out of interest I fed this into ChatGPT (I know...!). Here's its response, for what it's worth (minor tweaks for formatting) -
This regular expression (regex) is designed to match URLs that point to the domain "wikisophia.org" under specific conditions, while excluding URLs that are part of certain contexts or formats. Let's break down this regex to understand what it is specifically targeting:
1. Negative Lookbehind Assertions:
- `(?<!/)` ensures that the match does not directly follow a forward slash `/`. This might be used to avoid matching URLs that are part of a larger URL path or parameter. - `(?<!\\?url=)` ensures that the match does not directly follow the query parameter string `?url=`. This helps in avoiding matching URLs that are query parameters.
2. URL Scheme:
- `https?://` matches both "http://" and "https://". The `s?` means that the character "s" is optional.
3. Domain Name:
- The part `(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])[.])*` is somewhat complex but essentially matches sequences of alphanumeric characters separated by hyphens (not starting or ending with a hyphen) and followed by periods. This part matches subdomains as well, as it repeats zero or more times due to the `*` operator after the group. - `([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])` ensures the domain name or subdomain consists of alphanumeric characters, possibly with hyphens (but not starting or ending with them), much like the earlier subdomain matcher.
4. Specific Domain:
- `wikisophia[.]org` is very straightforward and matches the domain "wikisophia.org". The square brackets around the period `.` are technically not needed here, as they are used to escape special regex characters (though `.` would typically be escaped directly with a backslash).
5. Trailing URL Path and Parameters Exclusions:
- `[^\\s\\]|}{<]*` This part of the pattern is intended to consume any characters that are not whitespace, slashes, or certain special characters like `|`, `}`, `{`, `<`. However, there are syntax issues and potential misinterpretations in this segment: - `[^\\s\\]` seems intended to exclude backslashes and whitespace (though `\\s` would be invalid in most regex flavors and might be an error). - The character set `[^\\s\\]|}{<]` is followed by a `*` quantifier, meaning it matches zero or more of any character that is not a space, slash, or one of the special characters listed. This part could be attempting to match the rest of the URL while excluding specific trailing characters but is likely erroneous as presented.
Conclusion
The regex seems intended to match "wikisophia.org" URLs that do not follow a slash or the specific query parameter `?url=`. However, there are syntax issues that might cause it to behave unpredictably, particularly with the last part concerning non-whitespace and non-special characters, which appears to be syntactically incorrect. This regex should be reviewed for errors and tested thoroughly in its intended context to ensure it functions as expected.
I hope this is interesting and/or helpful. —Smalljim 11:23, 1 May 2024 (UTC)
How does one correct a citation when the source is listed dozens of times?
In the entry on lyricist Robert Hunter, I noticed that at some point an editor must've accidentally cited another source that's already cited 22 times in the article. There are only three 2015 sources used, so perhaps someone inadvertantly used the wrong one. At any rate I tried to fix it using the visual editor and, while it corrected the citation, it left it with the wrong footnote number still. So I undid my failed correction and left a note on the article's Talk page. Correcting simple sources that are only cited once is pretty straightforward, but when they're used dozens of times it's another (way too intimidating) matter. Or am I simply not able to find "the easy way"? Peterh6658 (talk) 23:22, 29 April 2024 (UTC)
- @Peterh6658: I've made the change you wanted, and given a link to how I did it on the article talk page. DuncanHill (talk) 23:33, 29 April 2024 (UTC)
- Thanks, Duncan! I hope I wasn't out of line with that crack about the process being way too intimidating. (Another Maxwell Smart catchphrase.) I'm still a relatively new Wikipedian, and can never remember the best shortcut to help me remember that ref name technique. Peterh6658 (talk) 23:51, 29 April 2024 (UTC)
- You can make this change in the visual editor too, but it's not very intuitive. There are two ways you could do it:
- After you select the reference marker (i.e. the "[5]"), instead of clicking "Edit" in the menu, you can just delete it (press Delete/Backspace on your keyboard), and then copy-paste the right reference marker in its place (i.e. the "[2]").
- Or, after you click "Edit" in the reference menu, you can click on "Change reference type" in the bottom-left corner, which will open the "Replace citation" menu – in that menu, go to "Re-use" and choose the correct citation from the list.
- Hope that helps in your future editing. Matma Rex talk 10:00, 30 April 2024 (UTC)
Tech News: 2024-18
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
![Screenshot of the visual improvements made on talk pages](http://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Talk_pages_default_look_%28April_2023%29.jpg/220px-Talk_pages_default_look_%28April_2023%29.jpg)
- The appearance of talk pages changed for the following wikis: Azerbaijani Wikipedia, Bengali Wikipedia, German Wikipedia, Persian Wikipedia, Hebrew Wikipedia, Hindi Wikipedia, Indonesian Wikipedia, Korean Wikipedia, Dutch Wikipedia, Portuguese Wikipedia, Romanian Wikipedia, Thai Wikipedia, Turkish Wikipedia, Ukrainian Wikipedia, Vietnamese Wikipedia. These wikis participated to a test, where 50% of users got the new design, for one year. As this test gave positive results, the new design is deployed on these wikis as the default design. It is possible to opt-out these changes in user preferences ("Show discussion activity"). The deployment will happen at all wikis in the coming weeks. [1]
- Seven new wikis have been created:
- You can now watch message groups/projects on Translatewiki.net. Initially, this feature will notify you of added or deleted messages in these groups. [9]
- Dark mode is now available on all wikis, on mobile web for logged-in users who opt into the advanced mode. This is the early release of the feature. Technical editors are invited to check for accessibility issues on wikis. See more detailed guidelines.
Problems
- Kartographer maps can use an alternative visual style without labels, by using
mapstyle="osm"
. This wasn't working in previews, creating the wrong impression that it wasn't supported. This has now been fixed. [10]
Changes later this week
The new version of MediaWiki will be on test wikis and MediaWiki.org from 30 April. It will be on non-Wikipedia wikis and some Wikipedias from 1 May. It will be on all wikis from 2 May (calendar). [11][12]
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
MediaWiki message delivery 03:31, 30 April 2024 (UTC)
Video viewing stats
Hi, is there a way to know how many readers watched a video in an article? Alaexis¿question? 06:30, 30 April 2024 (UTC)
- Yes, you can look up this data using https://pageviews.wmcloud.org/mediaviews/ (although note that it just counts total views, it doesn't show how many are coming from a specific article). For example, here's a chart of page views for a few movies listed on Public domain film: https://pageviews.wmcloud.org/mediaviews/?project=commons.wikimedia.org&platform=&agent=user&referer=all-referers&range=latest-20&files=Night_of_the_Living_Dead_(1968).webm%7CFear_and_Desire_(1953).webm%7CWings_(1927).webm Matma Rex talk 09:31, 30 April 2024 (UTC)
- Thanks! Do you know what counts as a view? According to this tool, this video had very few views, in spite of being used in an article with 30k daily viewers. Does it really mean that very few users choose to watch (admittedly hard-to-watch) video? Alaexis¿question? 14:20, 30 April 2024 (UTC)
- According to GlobalUsage that file isn't used anywhere; I suspect you wanted to look up the stats for this file instead (GlobalUsage), which has more views: [13]. The autocomplete in the mediaviews tool is a bit fiddly sometimes, and apparently doesn't find files that have been renamed, like this one, if you use the redirect name when searching. I didn't know that before. Matma Rex talk 14:51, 30 April 2024 (UTC)
- And to answer your actual question too, the technical documentation about what counts as a media view is available here: https://wikitech.wikimedia.org/wiki/Analytics/Data_Lake/Traffic/Mediacounts Matma Rex talk 14:58, 30 April 2024 (UTC)
- This reminds me that if we ever make videos 'preload' by default, these stats will break, because every pageview will preload the first bytes of a file... —TheDJ (talk • contribs) 17:12, 30 April 2024 (UTC)
- Thanks for the comprehensive answer! Alaexis¿question? 11:13, 1 May 2024 (UTC)
- Thanks! Do you know what counts as a view? According to this tool, this video had very few views, in spite of being used in an article with 30k daily viewers. Does it really mean that very few users choose to watch (admittedly hard-to-watch) video? Alaexis¿question? 14:20, 30 April 2024 (UTC)
PETSCan and Images
I am looking to source free images for articles on plant genera that are lacking them. Therefore I was wondering whether it was possible to configure PETScan only to return pages which do not contain images. The closest thing I thought of was to show images from the metadata in the output and then scroll through them, looking for those for which no image is presented. However, that is getting progressively tedious. Does anyone know a more direct way to do this? Felix QW (talk) 09:33, 30 April 2024 (UTC)
- Not an answer to your question, but the search facility may help you. A search for
plant hastemplate:"automatic taxobox" insource:/image *= *
returns 16,436 results with an image parameter in the taxobox. Note, it's not restricted for genera and some may have empty taxobox image parameters. Then a search forplant hastemplate:"automatic taxobox" -insource:/image *= *
finds 1,298 results without the image parameter, most of which appear to be genera. The search can probably be refined. — Jts1882 | talk 10:57, 30 April 2024 (UTC)- Thank you for the interesting suggestion! It does seem to me that empty taxobox image parameters are quite common, but then again, it is not like I am not going to ever finish this task. PETScan has the additional advantage of alphabetical sorting, so it is consistent across searches, and I can exclude pages linked from my userspace list of taxa for which I have already searched for images without any success. Therefore, a PETScan-based method seems preferable to me at the moment. Felix QW (talk) 12:33, 30 April 2024 (UTC)
- @Felix QW: the "Page properties" tab in PetScan has a radio button for "Lead image" where you can select "no". Plantdrew (talk) 21:20, 30 April 2024 (UTC)
- Brilliant, thank you! I don't know how I missed that. By the way, thank you very much for all your work on plant articles! Felix QW (talk) 07:18, 1 May 2024 (UTC)
- @Felix QW: the "Page properties" tab in PetScan has a radio button for "Lead image" where you can select "no". Plantdrew (talk) 21:20, 30 April 2024 (UTC)
- Thank you for the interesting suggestion! It does seem to me that empty taxobox image parameters are quite common, but then again, it is not like I am not going to ever finish this task. PETScan has the additional advantage of alphabetical sorting, so it is consistent across searches, and I can exclude pages linked from my userspace list of taxa for which I have already searched for images without any success. Therefore, a PETScan-based method seems preferable to me at the moment. Felix QW (talk) 12:33, 30 April 2024 (UTC)
pagelinks normalization
The pagelinks table is about to lose its pl_namespace and pl_title columns. This may break some tools and reports. Certes (talk) 15:26, 30 April 2024 (UTC)
- As advised at Wikipedia:Village pump (technical)/Archive 211#pagelinks normalization. --Redrose64 🌹 (talk) 20:33, 30 April 2024 (UTC)
- Yes: we've been able to use the linktarget alternative for a while now. Today's news, according to the Phabricator ticket, is that they are now ready to drop the columns. Certes (talk) 21:33, 30 April 2024 (UTC)
Non free file upload bug
Today, when I clicked the button "upload a non free file", it just reload the page, please fix this bug or glitch as soon as possible. SleepingJoe (talk) 04:30, 1 May 2024 (UTC)
Works for me ensure you are allowing javascript to run and try again. Alternatively, use the direct upload page here: Special:Upload. — xaosflux Talk 10:17, 1 May 2024 (UTC)
- Please if I may ask, when uploaded Files with Special:Upload which directly is it going to stay, is it wikimedia common or Wikipedia itself? because I have always thought that files can only be uploaded through wikimedia. Thisasia (Talk) 10:53, 1 May 2024 (UTC)
- @Thisasia: If you use Special:Upload here on English Wikipedia, you will upload to English Wikipedia. If you use c:Special:Upload, which is at Commons, you will upload to Commons. --Redrose64 🌹 (talk) 17:17, 1 May 2024 (UTC)
- Oww that's cool, thanks very much for the information. Thisasia (Talk) 21:37, 1 May 2024 (UTC)
- Coincidentally the OP is blocked for 'Abusing multiple accounts' on commons, so they can only use Special:Upload. – 2804:F1...C3:D952 (talk) 04:39, 2 May 2024 (UTC)
- @Thisasia: If you use Special:Upload here on English Wikipedia, you will upload to English Wikipedia. If you use c:Special:Upload, which is at Commons, you will upload to Commons. --Redrose64 🌹 (talk) 17:17, 1 May 2024 (UTC)
- Please if I may ask, when uploaded Files with Special:Upload which directly is it going to stay, is it wikimedia common or Wikipedia itself? because I have always thought that files can only be uploaded through wikimedia. Thisasia (Talk) 10:53, 1 May 2024 (UTC)
Stealth revdel
In this discussion at my Talk page, I made an assertion (diff) that traces of a revdel can always be seen in the revision history, with revisions in strikeout type, and the like. But now, I wonder if my response there was accurate. Is there such a thing as, for lack of a better term, what I will call a stealth revdel—that is, a revdel which wipes some revisions from the history, without leaving any evidence of the removal visible to non-admins? If that exists, what is it called, and is there a page that covers this? Mathglot (talk) 11:13, 1 May 2024 (UTC)
- Selective (un)deletion, i.e. deleting the page and undeleting all except certain revisions. If an admin really wanted to hide it, they'd have to then delete or revdel the log entries of the deletion and undeletion too. Anomie⚔ 11:35, 1 May 2024 (UTC)
- The thing being discussed in that discussion was some template vandalism, which was of course on a different page transcluded onto that one. Some varieties of oversight can remove edits without much trace, though not something like this purported situation. -- zzuuzz (talk) 11:42, 1 May 2024 (UTC)
- The "some varieties of oversight" being what mw:Extension:Oversight did before it was replaced by RevDel? If so, that's not available anymore. Anomie⚔ 11:45, 1 May 2024 (UTC)
- No, I do mean suppression oversight (and 'hiding'). It's not a thing to focus on here, but OS can make some disappearances hard to track. -- zzuuzz (talk) 11:48, 1 May 2024 (UTC)
- so maybe I meant oversighted? It's idle curiosity in this instance but I am pretty sure I have noticed stuff disappear before, especially identifying personal information. In fact, I distinctly remember telling an admin that somebody's address was in an article edit history, and this got removed, at lrast as far as a plain vanilla editor could see.
- Which is not what this was, granted; it would have been more of an unfortunate paste error or perhaps vandalism. Elinruby (talk) 12:22, 1 May 2024 (UTC)
- The "some varieties of oversight" being what mw:Extension:Oversight did before it was replaced by RevDel? If so, that's not available anymore. Anomie⚔ 11:45, 1 May 2024 (UTC)
- I seem to recall days when there was no revision deletion feature we have now, and the way to hide select revisions was to move the page to another name, delete it, restore okay revisions, and move it back. I assume it's possible still. Nardog (talk) 13:25, 1 May 2024 (UTC)
- Indeed it is. * Pppery * it has begun... 13:43, 1 May 2024 (UTC)
- Oh it's actually explained in the link Anomie gave above...
Nardog (talk) 13:46, 1 May 2024 (UTC)
- Oh it's actually explained in the link Anomie gave above...
- Indeed it is. * Pppery * it has begun... 13:43, 1 May 2024 (UTC)
- There are certainly beansy ways to cause obfuscation - that are best left unlisted here. Just replace "can always..." with "can generally...." and most use cases will be covered. — xaosflux Talk 14:11, 1 May 2024 (UTC)
- Thanks, all; this has been informative. And I got the read-between-the-lines stuff, so needn't go further. Cheers! Mathglot (talk) 00:35, 3 May 2024 (UTC)
- I know it's possible to delete summaries of log entries... including for the revdel log... and for the revdel log summary deletion log. I think you can set up an infinite regress this way. jp×g🗯️ 07:53, 3 May 2024 (UTC)
Caption on Image wikiMarkup?
Please may i ask if caption is possible inside the image wikiMarkup? Because since it does have the argument for sizing like for example: [[File:Example.jpg|100px]]
then i suppose I'd probably have an argument for caption and even perhaps, more arguments beyond? Thisasia (Talk) 12:31, 3 May 2024 (UTC)
Xtools 503 error
Is anyone getting a 503 error on Xtools? It says "Service Unavailable". Is the server down by any chance? Neko Lexi (talk) 13:53, 3 May 2024 (UTC)
- There is a problem with the tool indeed. @MusikAnimal is working on trying to fix it at the hackathon right now. —TheDJ (talk • contribs) 15:47, 3 May 2024 (UTC)
- good deal Neko Lexishe/her 15:55, 3 May 2024 (UTC)
- phab:T364151 is the actual problem. Taavi told me there's no quick fix, so I'm going to temporarily disable parts of XTools that are affected. That includes anything that touches the
logging
table, such as xtools:ec-generalstats and xtools:adminstats. Apologies for the disruption. — MusikAnimal talk 16:13, 3 May 2024 (UTC)- It's alright, but okay Neko Lexishe/her 16:54, 3 May 2024 (UTC)
- phab:T364151 is the actual problem. Taavi told me there's no quick fix, so I'm going to temporarily disable parts of XTools that are affected. That includes anything that touches the
- good deal Neko Lexishe/her 15:55, 3 May 2024 (UTC)
What links here says that a page transcludes itself, which should be an error
What transcludes Template:Requested move notice shows ~4 pages, including a self-transclusion, which should be impossible. When I edit the template to make it transclude itself, I see the error (in preview mode):
- Warning: This page calls Template:Requested move notice which causes a template loop (an infinite recursive call).
But it's not populating Category:Pages with template loops. Why is this spurious transclusion report happening, and how do I suppress it? My bot looks up all the pages that transclude this template, and is confused by this spurious transclusion. wbm1058 (talk) 14:30, 3 May 2024 (UTC)
- First thought is this is via some check related to Module:Unsubst that is called there. — xaosflux Talk 15:05, 3 May 2024 (UTC)
- Also noting that the identical Template:Requested move notice/sandbox doesn't show the same problem transclusion. – wbm1058 (talk) 15:12, 3 May 2024 (UTC)
- Take that back. The sandbox does transclude itself. So I can play with the sandbox to try to make it go away. – wbm1058 (talk) 15:28, 3 May 2024 (UTC)
- Problem is that the documentation subpage transcludes itself. When I removed the documentation from the sandbox, the sandbox stopped transcluding itself. – wbm1058 (talk) 16:13, 3 May 2024 (UTC)
- Self transclusions occur when a template uses the MW Lua library
getContent
on the page it's transcluded on. This happens for example with Module:Citation/CS1 (which hunts for the "use XXX date" templates in the page source, among others). Izno (talk) 16:20, 3 May 2024 (UTC) - It's common and allowed for pages to transclude themselves. A template loop error only occurs if the transcluded version of the page also tries to transclude itself. PrimeHunter (talk) 16:46, 3 May 2024 (UTC)
- This is very confusing. These pages compare identical yet one "transcludes itself" while the other does not. I'll assume that neither actually transcludes itself on a first-level basis, but the documentation only "transcludes itself" via the template transcluding the documentation, in other words, "cascading transclusion", or "circular transclusion" where the template transcludes the documentation while the documentation is simultaneously transcluding the template, and there is no way to differentiate regular transclusion from cascading/circular transclusion, so in order to work around this bizarre behavior, I'll need to make a special, kludgey edit to my bot's source code to specifically remove one specific page from the list of transcluded pages it gets from its "what transcludes this page" API call. I guess I've been kind of aware of this strange behavior for a while, but I think this is the first time I've found myself needing to actively code a work-around for it. – wbm1058 (talk) 17:59, 3 May 2024 (UTC)
- Many templates can cause a page to transclude itself. In this case it's caused by {{Bot use warning}} because it uses {{pagetype}} which examines the code of the page to identify certain page types. Module:Pagetype uses
getContent
to do it and as Izno said, this gives a self transclusion. Just work around it if needed as you say. It's not broken and doesn't require "fixing". Template:Requested move notice/doc/sandbox also transcludes itself. Maybe it had not been registered in link tables after your move.[14] PrimeHunter (talk) 21:19, 3 May 2024 (UTC)
- Many templates can cause a page to transclude itself. In this case it's caused by {{Bot use warning}} because it uses {{pagetype}} which examines the code of the page to identify certain page types. Module:Pagetype uses
- This is very confusing. These pages compare identical yet one "transcludes itself" while the other does not. I'll assume that neither actually transcludes itself on a first-level basis, but the documentation only "transcludes itself" via the template transcluding the documentation, in other words, "cascading transclusion", or "circular transclusion" where the template transcludes the documentation while the documentation is simultaneously transcluding the template, and there is no way to differentiate regular transclusion from cascading/circular transclusion, so in order to work around this bizarre behavior, I'll need to make a special, kludgey edit to my bot's source code to specifically remove one specific page from the list of transcluded pages it gets from its "what transcludes this page" API call. I guess I've been kind of aware of this strange behavior for a while, but I think this is the first time I've found myself needing to actively code a work-around for it. – wbm1058 (talk) 17:59, 3 May 2024 (UTC)
- I thought every page transcluded itself, to be honest. Every (article) I've looked at closely was 'transcluded' by both itself and its talk page. – 2804:F1...6E:399F (talk) 20:30, 3 May 2024 (UTC)
- Sometimes it feels like that to me too. I don't think the system always worked that way. At some point, something changed, I think, and I've yet to figure out exactly when, what, or why. – wbm1058 (talk) 21:16, 3 May 2024 (UTC)
Riddle me this. Compare and contrast. My initial example, limited to template namespace, followed by a similar example (my bot uses both):
- What transcludes Template:Requested move notice shows ~4 pages, including a self-transclusion
- What transcludes Template:Requested move/dated finds nothing!
Why does {{Requested move notice}} transclude itself, while {{Requested move/dated}} does not? They both have similar documentation sub-page configurations. – wbm1058 (talk) 21:16, 3 May 2024 (UTC)
- It's probably Module:Pagetype. Module:Citation/CS1/Date validation also uses GetContent, so any page that uses {{cite book}} or another template in that family, which is millions of pages, will also transclude itself. – Jonesey95 (talk) 21:26, 3 May 2024 (UTC)
- {{Requested move notice/doc}} uses {{Bot use warning}}. {{Requested move/dated/doc}} doesn't. But you don't have to work out why a given page transcludes itself since it's not a problem and doesn't require any action. PrimeHunter (talk) 21:35, 3 May 2024 (UTC)
- Gah! Well, thanks for solving my puzzle! No, it was a problem. My bot's console report was saying:
339 : Template:Requested move notice => NOT FOUND
!!! Failed to remove subject notice
- The transclusion made the bot think there was a {{Requested move notice}} sitting on the template – not unheard of that someone would request moving it, as it's been moved multiple times – the bot tried and failed to remove the template it thought was there, and thus reported the problem to me. THIS EDIT solved my problem by making the bot happy again. I added {{Bot use warning}} on 22 November 2023; guess I'd overlooked the bot's messages about this for months? Hey, I didn't realize that adding that template would change this template in a significant way! Who would have thunk that template needed to use {{pagetype}}, I never would have guessed that! {{Wikipedia:Article alerts/Bot use warning}} manages to give its warning without finding the {{pagetype}} first! Why would anyone ever need to find the {{pagetype}} to warn ppl that bots use their template? I'm just not gonna bother keeping the warning there, as it's just too much trouble and Murphy's Law says another WP:IAR editor is born every minute so resistance is futile. wbm1058 (talk) 22:22, 3 May 2024 (UTC)
- Gah! Well, thanks for solving my puzzle! No, it was a problem. My bot's console report was saying:
A new template to count the number of internal links
Hi, I searched for a template that returns the number of internal links, but couldn't find any so I created this Template:InternalLinkCounter now. Please take a look and improve it if you like. I just wanted the community to be aware of this new template. Thanks! ⇒ AramTalk 23:39, 3 May 2024 (UTC)
"bps" in interface messages?
Are the bit-rate messages Bitrate-...bits used anywhere in the interface? If yes, then "bps" in all of them should be changed to "bit/s" to be consistent with MOS:UNITS#Specific units ("bit per second: bit/s
(not bps, b/s)") and avoid setting a bad example. — Mikhail Ryazanov (talk) 02:38, 4 May 2024 (UTC)
- These are used in places like File:2024-04-24_Tours2024Stopmotion.webm. I personally can't be bothered to care about this issue, though, it seems very trivial. * Pppery * it has begun... 02:42, 4 May 2024 (UTC)
- MoS doesn't apply to "the interface". Nardog (talk) 07:39, 4 May 2024 (UTC)
- I know (obviously, because I did say "be consistent with" instead of "conform" to). But how does it help to have our own interface contradicting our own MoS? — Mikhail Ryazanov (talk) 08:52, 4 May 2024 (UTC)
- Yes they are contained in the interface see list. I do not think we should localize these for only those with their interface language set to English. You could make a case for this in a feature request which if accepted would "improve" this for all projects. — xaosflux Talk 10:10, 4 May 2024 (UTC)
- Some other languages already have them "localized" (such as "bit/s" in Finnish, "b/s" in French, "б/с" in Macedonian). Do you propose changing the defaults such that all the languages where these messages haven't been "translated" will automatically switch to "bit/s"? Although this would be nice ("bit/s" is at least defined by the international standard IEC 60027, whereas "bps" is not standard at all), doing so globally might be perhaps more difficult than redefining these messages just for English at translatewiki. — Mikhail Ryazanov (talk) 11:17, 4 May 2024 (UTC)
- Whether other projects follow English Wikipedia's MoS or not is their decision entirely. Even if you want it to, any conseus on that here has no effect. I am listing this as a reason to oppose extending your steward rights next year xaosflux, very disrepectful behaviour of you. Snævar (talk) 11:33, 4 May 2024 (UTC)
I recently noticed that {{ambox}}, when viewed using the night mode beta feature for advanced mobile web users, has a dark gray left border, not a colored one like when viewed using light mode. This is despite the relevant TemplateStyles specifying the color #36c ( ) as the default left border color, with other colors such as #b32424 ( ), #f28500 ( ), and #fc3 ( ) being specified for other ambox types. Does anyone know why this is? Thanks, Andumé (talk) 05:06, 4 May 2024 (UTC)
"The time allocated for running scripts has expired."
Hi. I created Portal:Washington, D.C., which contains some random elements. Most of the time, the page loads properly, just a bit slow. However, sometimes the page will only load some of the elements, and returns "The time allocated for running scripts has expired.". It's weird how the elements that don't load are static, and elements that do load are random. How can I fix this? Thanks. '''[[User:CanonNi]]'''
(talk|contribs) 11:09, 4 May 2024 (UTC)
- CanonNi, looking at the profiling data the lua time usage was around 8 seconds (out of 10). It says:
MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback::match 2960 ms 37.7%
MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback::find 1580 ms 20.1%
MediaWiki\Extension\Scribunto\Engines\LuaSandbox\LuaSandboxCallback::sub 1220 ms 15.5%
So it looks like some expensive match operations are being run. — Qwerfjkltalk 11:17, 4 May 2024 (UTC)- The only match operation in use are the {{Transclude selected recent additions}} and {{Transclude selected current events}} templates, which look for 3 matching terms in the ITN and DYK archives. Is there a way to optimize these templates?
'''[[User:CanonNi]]'''
(talk|contribs) 11:22, 4 May 2024 (UTC)
- The only match operation in use are the {{Transclude selected recent additions}} and {{Transclude selected current events}} templates, which look for 3 matching terms in the ITN and DYK archives. Is there a way to optimize these templates?