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.
|
Identifying and Removing Predatory Sources
[edit]Hey everyone, I was wondering if there are any tools available that could help identify citations that link to PDFs, as many predatory journals often use direct PDF links instead of proper journal indexing. While manually checking for predatory sources is possible, a tool to automate or streamline this process would be really useful. This is a consistent problem in wikipedia, as many articles are out there with almost all predatory sources. For instance, do look at Mizo names. After I removed all the predatory sources, there is only one citation left.
I understand that Special:Linksearch can be used to find citations linking to specific domains, which is helpful for flagging known predatory journals. However, I don’t think there’s currently a way to search for all citations that link to PDFs in general.
Would it be possible to implement such a search function, or has anyone come across a method to filter citations by file type? If not, I’d like to discuss whether this is something that could be proposed at WP:VPT or WP:RSN. Looking forward to hearing your thoughts! — Flyingphoenixchips (talk) 01:29, 3 April 2025 (UTC)
- @Flyingphoenixchips: You should check out @Novem Linguae:'s script User:Novem Linguae/Scripts/CiteHighlighter which could help with this task. Polygnotus (talk) 01:49, 3 April 2025 (UTC)
- Do you know any other predatory journals? Searching for insource:ijnrd.org and insource:ijsr.net yields 64 results. Polygnotus (talk) 01:52, 3 April 2025 (UTC)
- Really cool to say the least. Just downloaded it. There are many predatory journals out there, and as someone working in academia I can for sure say that 99% of times, the citations that leads to pdf of a Journal, is most definitely predatory. This is why I was hoping to search for a tool, that can search the database of wikipedia, to find all citations that link to a pdf. Yes, there are many other predatory journals like http://www.ijst.co.in/ https://tlhjournal.com/ https://ijssrr.com/journal and https://www.mkscienceset.com/. There are many more besides these, and many more that I might not be aware of. This is partly the reason I am interested in this. I did a few clean up of ijnrd.org
- But yea the script you shared is quite cool :) installed it Flyingphoenixchips (talk) 02:03, 3 April 2025 (UTC)
- @Flyingphoenixchips I don't know how nerdy you are, but AutoWikiBrowser includes a database scanner and I don't think you even need AWB permission to use it. I also have a tool that can search through the dump. Polygnotus (talk) 02:09, 3 April 2025 (UTC)
- Could you share the link for it. Much appreciated. Flyingphoenixchips (talk) 02:10, 3 April 2025 (UTC)
- WP:AWB. Polygnotus (talk) 02:11, 3 April 2025 (UTC)
- Thanks will have a look :) Flyingphoenixchips (talk) 02:12, 3 April 2025 (UTC)
- @Flyingphoenixchips The scanner is explained here. If you want someone else to do it you can ask at WP:AWBREQ. Polygnotus (talk) 02:13, 3 April 2025 (UTC)
- @Flyingphoenixchips I was too lazy to download a new dump so I used one that I had laying around. A text file containing just the articlename and then the PDF URL is 373MB. There are 3.257.740 URLs that end in .pdf, if you only search articles and only inside ref tags. Polygnotus (talk) 04:27, 3 April 2025 (UTC)
- Here is the first MB: https://en.wikipedia.org/w/index.php?title=User:Polygnotus/Flyingphoenixchips&action=edit Polygnotus (talk) 04:34, 3 April 2025 (UTC)
- Note that there is also a WP:BLACKLIST which prevents future additions but does not work retroactively. Polygnotus (talk) 05:18, 3 April 2025 (UTC)
- Hm, I restricted it to only articles that contain "India" and only references that contain ".pdf" and I get 96.847 results (roughly a 10mb file) most of which are fine. Polygnotus (talk) 14:17, 3 April 2025 (UTC)
- Hmm interesting, did you happen to notice links to dubious journals? Flyingphoenixchips (talk) 02:24, 7 April 2025 (UTC)
- @Flyingphoenixchips No. You can have a look. This list excludes all articles that do not have a category whose name contains the word "India" and of those it takes the references that contain ".pdf"
- https://en.wikipedia.org/w/index.php?title=User:Polygnotus/e437895&action=edit Polygnotus (talk) 02:30, 7 April 2025 (UTC)
- I see thanks for sharing Flyingphoenixchips (talk) 02:33, 7 April 2025 (UTC)
- Hmm interesting, did you happen to notice links to dubious journals? Flyingphoenixchips (talk) 02:24, 7 April 2025 (UTC)
- Thanks will have a look :) Flyingphoenixchips (talk) 02:12, 3 April 2025 (UTC)
- WP:AWB. Polygnotus (talk) 02:11, 3 April 2025 (UTC)
- Could you share the link for it. Much appreciated. Flyingphoenixchips (talk) 02:10, 3 April 2025 (UTC)
- Flyingphoenixchips, can you elaborate on this:
I can for sure say that 99% of times, the citations that leads to pdf of a Journal, is most definitely predatory.
- That seems dubious, unless you think that, say, all of these citations from Wikipedia articles hosted by JSTOR are all from predatory journals. Citations from the top of that list include articles from: American Historical Review, American Literature, Annual Reports of the Dante Society, Proceedings of the New York State Historical Association, Urban Studies, Science & Society, PMLA, Journal of Marketing Theory and Practice, American Journal of Sociology, and Political Science Quarterly. I couldn't find any that seemed likely to be from a predatory journal before I stopped looking. Or did I miss your meaning? Mathglot (talk) 21:29, 6 April 2025 (UTC)
- @Mathglot I searched through the dump for them and my conclusion is that that is not an efficient way of finding predatory journals (even in articles related to India). So we should continue with our approach of searching for the name or domain of the journals.
- There appears to be a (somewhat outdated) list here: https://ugccare.unipune.ac.in/apps1/home/index that is comparable to Beall's List. I have mentioned the domains listed in this thread over at Wikipedia:Reliable_sources/Noticeboard#Predatory(?)_journals Polygnotus (talk) 21:38, 6 April 2025 (UTC)
- This is valid too. Honestly we can do this, but the problem is- there are so many predatory journals out there, that it will be hard keeping track of all the domains. Flyingphoenixchips (talk) 02:26, 7 April 2025 (UTC)
- @Flyingphoenixchips Problem is, there are even more valid links to .pdf files. So keeping track of the domains is the only option we have. Polygnotus (talk) 02:31, 7 April 2025 (UTC)
- This is valid too. Honestly we can do this, but the problem is- there are so many predatory journals out there, that it will be hard keeping track of all the domains. Flyingphoenixchips (talk) 02:26, 7 April 2025 (UTC)
- What I meant by this, was 100% of the times, predatory journals do not have a doi index, and thus whenever they are cited in Wikipedia, they are cited in the form of a pdf. Does it mean all pdfs are unreliable? Of course no! I was trying to find patterns in order to identify predatory journals, and this was one thing that I had noticed. This is why I brought it up, as a possible method to search for predatory journals Flyingphoenixchips (talk) 02:24, 7 April 2025 (UTC)
- Can you contact the people behind https://ugccare.unipune.ac.in/apps1/home/index and ask if we can have their list? https://web.archive.org/web/*/https://ugccare.unipune.ac.in/apps1/home/index Polygnotus (talk) 02:33, 7 April 2025 (UTC) Polygnotus (talk) 02:33, 7 April 2025 (UTC)
- https://ugccare.unipune.ac.in/Apps1/User/lr/login
- you should be able to access their list, after making an account here. Also not sure if this would help as well, since UGC has been used by predatory publishers to get legitimacy most of the times. Flyingphoenixchips (talk) 02:35, 7 April 2025 (UTC)
- @Flyingphoenixchips I cannot even open that site, it just keeps loading forever. We need an Indian equivalent of Beall's List. Polygnotus (talk) 02:36, 7 April 2025 (UTC)
- I am not sure if users outside India can access it. I am currently not in the country as well, but since I had made an account here, maybe thats why I still have he access. Well good point. Let me see if I can work on building such a site. Would you be willing to help? Lemme try posting this in Wikiproject:India Flyingphoenixchips (talk) 02:41, 7 April 2025 (UTC)
- I am willing to help, but not able, because I know nothing about predatory publishers in India. Posting in Wikiproject:India is a good idea, there may be more people who know about these things. Polygnotus (talk) 02:44, 7 April 2025 (UTC)
- Noted :) Flyingphoenixchips (talk) 02:45, 7 April 2025 (UTC)
- I am willing to help, but not able, because I know nothing about predatory publishers in India. Posting in Wikiproject:India is a good idea, there may be more people who know about these things. Polygnotus (talk) 02:44, 7 April 2025 (UTC)
- I am not sure if users outside India can access it. I am currently not in the country as well, but since I had made an account here, maybe thats why I still have he access. Well good point. Let me see if I can work on building such a site. Would you be willing to help? Lemme try posting this in Wikiproject:India Flyingphoenixchips (talk) 02:41, 7 April 2025 (UTC)
- @Flyingphoenixchips I cannot even open that site, it just keeps loading forever. We need an Indian equivalent of Beall's List. Polygnotus (talk) 02:36, 7 April 2025 (UTC)
- Can you contact the people behind https://ugccare.unipune.ac.in/apps1/home/index and ask if we can have their list? https://web.archive.org/web/*/https://ugccare.unipune.ac.in/apps1/home/index Polygnotus (talk) 02:33, 7 April 2025 (UTC) Polygnotus (talk) 02:33, 7 April 2025 (UTC)
- @Flyingphoenixchips I don't know how nerdy you are, but AutoWikiBrowser includes a database scanner and I don't think you even need AWB permission to use it. I also have a tool that can search through the dump. Polygnotus (talk) 02:09, 3 April 2025 (UTC)
It can depend on the subject area, but as someone who has been in the academic publishing business for decades as author, editor, and technical manager, I strongly disagree that the absence of a doi is an indicator of being predatory. Getting doi coverage for a journal involves no quality-related test at all. It is just for the asking plus a small fee. The total cost for a whole year of articles is about 1/10 of the typical page charge for one article. It is actually journals which have no cash flow at all which are most likely to not have dois, and they are the least likely to be predatory. Conversely, dois are one cheap way that predatory journals use to make themselves look legit. Zerotalk 10:05, 7 April 2025 (UTC)
- @Flyingphoenixchips: As another person who has been involved in academic publishing for decades (as an author and peer reviewer), I agree with Zero's statement above. There are lots of older or smaller independent journals that are completely legitimate and peer reviewed but do not have DOIs or similar registrations. This is especially true of niche zoological and botanical journals. I'm curious how you are distinguishing between those and predatory journals. Nosferattus (talk) 00:13, 11 April 2025 (UTC)
- I agree with both of you! As of now, I was evaluating predatory journals by visiting their website and seeing how they advertised themselves. A journal that promises turn around of less than a week, is definitely predatory. It can also be determined by looking at the quality of the papers published in itself. @Nosferattus Flyingphoenixchips (talk) 18:10, 13 April 2025 (UTC)
- As someone that's dealt with predatory journals, the best way to find them used on Wikipedia is probably WP:CITEWATCH (pages 2+ especially, page 1 has a lot of corner cases). I also maintain the WP:UPSD script. That said
- Lack of DOI, especially for new journals published after 2000, is a fairly strong sign that a journal might be predatory. Older journals without DOIs just might not have been online and stopped publishing. Of course plenty of exceptions exist.
- Plenty of predatory journals have DOIs. When that's the case, it's often with a DOI prefix over 10.10000+/.... Of course plenty of exceptions exist. OMICS for example, has a DOI prefix of 10.4172/...
- Having a PDF is completely irrelevant either way.
- Headbomb {t · c · p · b} 19:15, 13 April 2025 (UTC)
Dead wayback link
[edit]Hello, does anyone know how to access the article at [1]? The first snapshot, specifically June 21, 2011, is cited on an article, but if it loaded once it doesn't now. Thanks, CMD (talk) 06:48, 3 April 2025 (UTC)
- So that people don't waste their time: insource:NewsID=72917. Polygnotus (talk) 14:18, 3 April 2025 (UTC)
- That source is as good as dead, because WebArchive seems to have changed its syntax so that the source doesn't show and archive.today redirects to the main page. You can try contacting the WebArchive but I'd simply consider some other sources Szmenderowiecki (talk) 15:00, 3 April 2025 (UTC)
- Thanks, a shame but I suppose it is what it is. CMD (talk) 15:19, 3 April 2025 (UTC)
- One would think that the article in question ought to be listed in the Express archive for the date claimed in the article, but I don't see an obvious title in that list although in theory, it has to be there, so perhaps it's buried in an article about something else? Sufficient sleuthing through that list might turn it up, but that's a lot of effort for an uncertain result about one citation. Mathglot (talk) 01:04, 7 April 2025 (UTC)
- I agree with both of you! As of now, I was evaluating predatory journals by visiting their website and seeing how they advertised themselves. A journal that promises turn around of less than a week, is definitely predatory. It can also be determined by looking at the quality of the papers published in itself. Flyingphoenixchips (talk) 03:32, 11 April 2025 (UTC)
- Wrong section? jlwoodwa (talk) 15:48, 12 April 2025 (UTC)
- Sorry replied in the wrong section 😭 Flyingphoenixchips (talk) 16:52, 12 April 2025 (UTC)
- Wrong section? jlwoodwa (talk) 15:48, 12 April 2025 (UTC)
- I agree with both of you! As of now, I was evaluating predatory journals by visiting their website and seeing how they advertised themselves. A journal that promises turn around of less than a week, is definitely predatory. It can also be determined by looking at the quality of the papers published in itself. Flyingphoenixchips (talk) 03:32, 11 April 2025 (UTC)
- One would think that the article in question ought to be listed in the Express archive for the date claimed in the article, but I don't see an obvious title in that list although in theory, it has to be there, so perhaps it's buried in an article about something else? Sufficient sleuthing through that list might turn it up, but that's a lot of effort for an uncertain result about one citation. Mathglot (talk) 01:04, 7 April 2025 (UTC)
- Thanks, a shame but I suppose it is what it is. CMD (talk) 15:19, 3 April 2025 (UTC)
Onlyinclude
[edit]How to prevent empty row appearing after "onlyinclude" tag? Examples: 1 2 Lado85 (talk) 13:16, 4 April 2025 (UTC)
- Can anyone help me? Lado85 (talk) 09:56, 5 April 2025 (UTC)
- @Lado85: The thing about
<onlyinclude>...</onlyinclude>
is that everything between the tags is transcluded, including any whitespace (spaces, tabs and newlines), so if you don't want those occurring in the page that it's transcluded to, you need to ensure that they don't occur either between the opening<onlyinclude>
tag and the "real" content that you want to include, nor between the "real" content and the closing</onlyinclude>
tag. See WP:ONLYINCLUDE. --Redrose64 🌹 (talk) 12:14, 5 April 2025 (UTC)- I know this. The empty row is spontaneously added sometimes, when somebody edits article (not omly this, everywhere). I am tired to delete it every time it appears. Lado85 (talk) 12:34, 5 April 2025 (UTC)
- I did two test edits which added a space (now reverted). The first in the standard editor just added the space.1 The second in the Visual Editor added the extra line after the onlyinclude tag.2 I only added the space after the "Pool A". So it looks like a VE issue. — Jts1882 | talk 12:59, 5 April 2025 (UTC)
- VE is known to be buggy, that's why it's still in beta. I never use it because I want to know exactly what I'm altering before I go for "Publish", I don't want hidden extras. --Redrose64 🌹 (talk) 13:19, 5 April 2025 (UTC)
- I did two test edits which added a space (now reverted). The first in the standard editor just added the space.1 The second in the Visual Editor added the extra line after the onlyinclude tag.2 I only added the space after the "Pool A". So it looks like a VE issue. — Jts1882 | talk 12:59, 5 April 2025 (UTC)
- I know this. The empty row is spontaneously added sometimes, when somebody edits article (not omly this, everywhere). I am tired to delete it every time it appears. Lado85 (talk) 12:34, 5 April 2025 (UTC)
- @Lado85: The thing about
- I found a bug report for this problem in the visual editor: T283353.
- However, the first two examples are actually in edits made using AWB, which has to be a different problem. Matma Rex talk 20:22, 6 April 2025 (UTC)
Reboot
[edit]Lado85, one issue I have frequently seen, especially with folks with technical chops, is a design-based question, rather than a function-based nne. (I have been guilty of this.) This tends to hamstring the responders, who, rather than responding to your underlying issue, are trying to repair your solution. That sometimes works, sometimes not. Your question is semi-design-based, because you are asking how to make '<onlyinclude>' jump the hoops you want it to jump. But what about restating it functionally, to open up the range of possible solutions? Would it be accurate to restate your question as follows?
- How do I selectively include or exclude certain rows from a table without introducing unwanted rows or white space in the rendered page?
If so, there are solutions, but they do not necessarily involve <onlyinclude> tags. I am of course trying to mind-read your intent by reverse-engineering your design solution, and maybe I got your intent wrong. But I bet if you restate your question functionally, you will arrive at a solution more quickly, and maybe more easily. Cheers, Mathglot (talk) 00:39, 11 April 2025 (UTC)
Now need to use email code to login?
[edit]I've tried to login to both of my accounts but I am being asked to provide an email code. I have never had this requirement before and the only change I can notice is that I am logging at auth.wikimedia.org instead of en.wikipedia.org
Is this a new requirement? Why was it never advertised/mentioned? 206.83.102.24 (talk) 22:40, 4 April 2025 (UTC)
- Hi, a small percentage of logins now require that the account owner input a one time password emailed to their account. This will occur for example when the device and IP are both new. This is currently in initial testing, for security reasons related to the recent problem. Wider announcements will come soon. Quiddity (WMF) (talk) 23:06, 4 April 2025 (UTC)
- I'm regularly changing both user agent and IP, is there no option to disable this in settings (I cannot look right now for obvious reasons)? All my passwords are uniquely generated. 206.83.102.24 (talk) 23:34, 4 April 2025 (UTC)
- You can setup 2FA for your account, which will stop this. See m:Help:Two-factor authentication for details on that (and make sure to save the recovery codes it gives you, if you decide to follow the process to opt-in). Quiddity (WMF) (talk) 23:53, 4 April 2025 (UTC)
- I don't want to have to enter a code at all. The only way to avoid this it appears is to simply disable/remove an email, which would only worsen account security. 206.83.102.24 (talk) 00:38, 5 April 2025 (UTC)
- Please could you write (perhaps privately to me, contact details on my userpage) some details about why your user agent and IP are regularly changing? Then I can bring that info to the devs in case it's something they can help you workaround, or can consider for the system as a whole. Thanks. Quiddity (WMF) (talk) 16:37, 5 April 2025 (UTC)
- You can see my provider, as for the user agent, well my I update my browser regularly. 206.83.103.99 (talk) 22:01, 8 April 2025 (UTC)
- Thanks for the reply. I believe you are correct, and the three technical options for you are: (1) use 2FA which will allow you to remain logged-in for a year (assuming you allow cookies) per device, (2) encounter these EmailAuth verification code requests, but (again assuming you allow cookies for Wikimedia domains) you should only need to go through the EmailAuth workflow once per year per browser, (3) remove your email from the account (which as you note has significant drawbacks). Overall, I would encourage option 1, and if you have additional concerns about using 2FA that aren't addressed in the Help page, please let me know (or comment on the talkpage there). I hope that info helps. Quiddity (WMF) (talk) 16:35, 10 April 2025 (UTC)
- You can see my provider, as for the user agent, well my I update my browser regularly. 206.83.103.99 (talk) 22:01, 8 April 2025 (UTC)
- Please could you write (perhaps privately to me, contact details on my userpage) some details about why your user agent and IP are regularly changing? Then I can bring that info to the devs in case it's something they can help you workaround, or can consider for the system as a whole. Thanks. Quiddity (WMF) (talk) 16:37, 5 April 2025 (UTC)
- I don't want to have to enter a code at all. The only way to avoid this it appears is to simply disable/remove an email, which would only worsen account security. 206.83.102.24 (talk) 00:38, 5 April 2025 (UTC)
- You can setup 2FA for your account, which will stop this. See m:Help:Two-factor authentication for details on that (and make sure to save the recovery codes it gives you, if you decide to follow the process to opt-in). Quiddity (WMF) (talk) 23:53, 4 April 2025 (UTC)
- I'm regularly changing both user agent and IP, is there no option to disable this in settings (I cannot look right now for obvious reasons)? All my passwords are uniquely generated. 206.83.102.24 (talk) 23:34, 4 April 2025 (UTC)
- Logging in on auth.wikimedia.org is a separate change, which has been announced in #Tech News: 2025-14 and elsewhere. You can find documentation about it here: [2]. Matma Rex talk 23:35, 4 April 2025 (UTC)
add button to visual editor
[edit]i have a code in my User:Gryllida/common.js that adds a button to the wikitext2017 editor. i would like to add a button to visual editor instead though. could you please suggest an example? it needs to alert('hi') or something similar as i will add a custom function. i checked mw:VisualEditor/Gadgets and it is not particularly enlightening. Gryllida (talk, e-mail) 19:56, 8 April 2025 (UTC)
- @Gryllida You could file a ticket on Phabricator but VE doesn't appear to be under active development. The solution is probably similar to T390807. Polygnotus (talk) 20:07, 8 April 2025 (UTC)
- Hi Polygnotus, What is active developed if not VE, then? Thanks for the links, I will check them out. (see also: Live Chat Link (#wikimedia-tech connect)) Thanks -- Gryllida (talk, e-mail) 03:29, 9 April 2025 (UTC)
- Just to be clear: VE is being actively worked on. E.g. the current Edit Check project is a major new VE feature. DLynch (WMF) (talk) 14:10, 9 April 2025 (UTC)
- Hi Polygnotus, What is active developed if not VE, then? Thanks for the links, I will check them out. (see also: Live Chat Link (#wikimedia-tech connect)) Thanks -- Gryllida (talk, e-mail) 03:29, 9 April 2025 (UTC)
- @Gryllida: Here you go: User:Polygnotus/Scripts/VEbutton.js it adds a star button, if you click on it it says "hello world". Polygnotus (talk) 20:20, 8 April 2025 (UTC)
- Thank you @Polygnotus for the example, I will check it out. Gryllida (talk, e-mail) 10:24, 10 April 2025 (UTC)
- If you want to be able to define buttons in a JSON file, and use any image instead of only these, you can use User:Polygnotus/Scripts/VEbuttons.js (note: plural!) which loads its configuration from User:Polygnotus/VEbuttonsJSON.json. Please copy them to your userspace; I might mess around with those which might break things. Polygnotus (talk) 21:08, 8 April 2025 (UTC)
- See also Wikipedia:User_scripts/Requests#Adding_custom_buttons_to_VE_and_DiscussionTools. Polygnotus (talk) 21:39, 8 April 2025 (UTC)
- There's also w:de:Benutzer:Schnark/js/veCustomize, which may or may not work. — Qwerfjkltalk 11:45, 9 April 2025 (UTC)
you can activate the script in the Fliegelflagel configuration
German is such a beautiful language. Polygnotus (talk) 11:49, 9 April 2025 (UTC)
- There's also w:de:Benutzer:Schnark/js/veCustomize, which may or may not work. — Qwerfjkltalk 11:45, 9 April 2025 (UTC)
- Your common.js is adding a button to WikiEditor, not to the 2017 wikitext editor. If it was adding it to the latter, it'd also be added to VE unless you had actively avoided doing so. (E.g. this script that I wrote the other day does that.)
- This page may be more helpful since it has some direct examples about how to add a tool to the toolbar: https://www.mediawiki.org/wiki/VisualEditor/Gadgets/Add_a_tool DLynch (WMF) (talk) 13:35, 9 April 2025 (UTC)
- Thank you @Qwerfjkl and @DLynch (WMF) I will check them out. Gryllida (talk, e-mail) 10:24, 10 April 2025 (UTC)
- @Polygnotus and @Qwerfjkl and @DLynch (WMF) i see it works, how do I implement adding text at cursor position? For example, add 'hi' at cursor position when the button is clicked. Cannot use some simpler methods because the 'hi' will be determined after running a custom javascript subroutine, so it will not always be the same content to add. So it has to be a javascript function to add the text, not an 'encapsulate' type of button or the like. Thank you in advance for your help!!! Gryllida (talk, e-mail) 12:06, 10 April 2025 (UTC)
- @Gryllida See User:Polygnotus/Scripts/VEbutton2.js Polygnotus (talk) 12:09, 10 April 2025 (UTC)
- So basically:
- var surface = ve.init.target.getSurface();
- var fragment = surface.getModel().getFragment();
- fragment.insertContent('hello world', true);
- Documentation is over at https://doc.wikimedia.org/VisualEditor/master/js/
- Polygnotus (talk) 12:12, 10 April 2025 (UTC)
- Awesome, thanks! I will make use of this and then go back to the API documentation to form a more systematic understanding; appreciate your prompt assistance. :-) Gryllida (talk, e-mail) 12:40, 10 April 2025 (UTC)
- @Gryllida Kinda curious what you are building. And for the record, I am no RTFM guy, I just linked the documentation in an attempt to be helpful. Polygnotus (talk) 12:47, 10 April 2025 (UTC)
- n:User:Gryllida/js/add-source-in-visual-editor.js (background info: n:Template:Source). Has a few bugs, discussed on script's talk page. Gryllida (talk, e-mail) 13:04, 10 April 2025 (UTC)
- I'll respond on that talkpage. Polygnotus (talk) 13:24, 10 April 2025 (UTC)
- @DLynch_(WMF) @Gryllida On the English Wikipedia you can use WP:REFVISUAL, specifically this thing (I think that that is the VisualEditor citation tool). Gryllida here is trying to reinvent that wheel, but that would only fix the problem for whoever installs their script so I think the real question is: "Can you please install/enable the VisualEditor citation tool on wikinews.org?".
- Looking at User:Diegodlh/Web2Cit/script it looks like this thing uses Citoid, because that script adds web2cit to it, so there is probably a reason the WMF decided to go with Citoid over Web2cit.
- It looks like both enwiki and wikinews are using the same version of the Visual Editor enwiki wikinews.
- If installing/enabling the VisualEditor citation tool is not an option for some reason then the question is: When you have a button on the VisualEditor in Visual mode, how can you make it actually insert wikicode at the cursor position so that you get to see the parsed result? Polygnotus (talk) 19:34, 10 April 2025 (UTC)
- @User:Gryllida It seems likely that a Phabricator ticket is required. Do you want to make one or should I? This says:
It is currently deployed in all VisualEditor-enabled WMF-Wikis [1], though the extension is only configured on some of them.
Polygnotus (talk) 19:57, 10 April 2025 (UTC)- Hi @Polygnotus
- The differences are [at least] that:
- 1) My home wiki does not use inline citations. The VE utility for adding sources would need to be modified to accommodate that.
- 2) Source 'publisher' needs to be human readable name, which, when possible, should be possible to link to an English Wikipedia wiki page.
- 3) As a result, as this would be used on some other wiki, it would need to use the w: prefix for wikilinks.
- I am happy to beta test this, if available. Gryllida (talk, e-mail) 04:53, 11 April 2025 (UTC)
- n:User:Gryllida/js/add-source-in-visual-editor.js (background info: n:Template:Source). Has a few bugs, discussed on script's talk page. Gryllida (talk, e-mail) 13:04, 10 April 2025 (UTC)
- @Gryllida Kinda curious what you are building. And for the record, I am no RTFM guy, I just linked the documentation in an attempt to be helpful. Polygnotus (talk) 12:47, 10 April 2025 (UTC)
- Awesome, thanks! I will make use of this and then go back to the API documentation to form a more systematic understanding; appreciate your prompt assistance. :-) Gryllida (talk, e-mail) 12:40, 10 April 2025 (UTC)
- @Polygnotus and @Qwerfjkl and @DLynch (WMF) i see it works, how do I implement adding text at cursor position? For example, add 'hi' at cursor position when the button is clicked. Cannot use some simpler methods because the 'hi' will be determined after running a custom javascript subroutine, so it will not always be the same content to add. So it has to be a javascript function to add the text, not an 'encapsulate' type of button or the like. Thank you in advance for your help!!! Gryllida (talk, e-mail) 12:06, 10 April 2025 (UTC)
- Thank you @Qwerfjkl and @DLynch (WMF) I will check them out. Gryllida (talk, e-mail) 10:24, 10 April 2025 (UTC)
SPARQL query
[edit]Hi everyone,
I am trying to use Sparql in Wikidata to list all national parties that are members of a European party and whose country is a member of the European Union. That much I have. However, I also want to display their number of seats in the European Parliament (but it should not be a requirement to have such an entry).
So far, I have:
SELECT ?item ?itemLabel ?countryLabel ?seats WHERE { ?item wdt:P463 [wdt:P31 wd:Q24649]; #member of an instance of European party wdt:P17 [wdt:P463 wd:Q458]; #from a country that is a member of the European Union wdt:P17 ?country; OPTIONAL { ?item p:P1410 [ps:P1410 ?seats; pq:P1410 wdt:Q8889]. } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } } ORDER BY ?countryLabel ?itemLabel
The OPTIONAL
line is what doesn't work as it yields an empty column. What did I do wrong? Julius Schwarz (talk) 12:26, 9 April 2025 (UTC)
- Asking at d:WD:RAQ is likely to be more fruitful. Izno (talk) 16:16, 9 April 2025 (UTC)
- Fair point, thanks! Julius Schwarz (talk) 20:27, 9 April 2025 (UTC)
- For those interested, this was solved here. Julius Schwarz (talk) 08:36, 10 April 2025 (UTC)
- Fair point, thanks! Julius Schwarz (talk) 20:27, 9 April 2025 (UTC)
Wikipedia down?
[edit]Is it just me or did Wikipedia just go down for 30-ish seconds? I could provide screenshots if necessary. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:26, 9 April 2025 (UTC)
- It just stopped working for another ~10 seconds just now. This comment itself didn't work the first time due to "[4e2970bf-d02b-40d2-903e-74f84962d144] Caught exception of type Wikimedia\Rdbms\DBUnexpectedError" User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:29, 9 April 2025 (UTC)
- DownDetector appears to say a few others are having problems, but I can't tell if it's a site-wide problem. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:30, 9 April 2025 (UTC)
- On the main page just now: "
- MediaWiki internal error.
- Original exception: [5a674d58-d26d-438e-901b-ad12e3582647] 2025-04-09 12:28:10: Fatal exception of type "Wikimedia\Rdbms\DBUnexpectedError"
- Exception caught inside exception handler.
- Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.
- " User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:32, 9 April 2025 (UTC)
- I just briefly encountered this error when I tried to preview an edit I was making, but thankfully things have quickly gone back to normal. – MrPersonHumanGuy (talk) 15:11, 9 April 2025 (UTC)
- I'm not sure, it seems like every 15 or so Wikipedia pages I've been today on showed the error. Weird thing is, before today I'd never seen it before despite it apparently happening for a few weeks. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 17:08, 9 April 2025 (UTC)
- DownDetector appears to say a few others are having problems, but I can't tell if it's a site-wide problem. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:30, 9 April 2025 (UTC)
- See also https://www.wikimediastatus.net/, which does signal a huge wiki error spike. — Alien 3
3 3 12:34, 9 April 2025 (UTC)- That also signals that it's now going down (300/s vs 700/s at top of spike), so it should settle. — Alien 3
3 3 12:35, 9 April 2025 (UTC)- Hm, that's good, would you happen to know what caused it? User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:36, 9 April 2025 (UTC)
- Probably a database error? (DB often stands for that). Don't know more. — Alien 3
3 3 12:39, 9 April 2025 (UTC)- Alright then, well thanks anyways! User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:43, 9 April 2025 (UTC)
- This has been going on for a while. The production folks are aware of the problem and are working on it. See T389734 for more info. RoySmith (talk) 13:34, 9 April 2025 (UTC)
- I've just tried performing 12 different types of edit. 5 of them came back with the error message. I realise this has been going on for quite a while, but it is becoming increasing impossible to edit Wikipedia. It seems to be getting worse, not better.
- The edit I tried to perform include, edits to article talk page, preview edit, edits to an article and so on. Knitsey (talk) 14:25, 9 April 2025 (UTC)
- Oh, that's interesting, I just got the error when trying to read pages, I didn't realise it was editing too. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 14:26, 9 April 2025 (UTC)
- I noticed on wikipediastatus.net that there have been 2 other large error spikes since the one I originally noticed. Something interesting is that they all seem to correlate with temporary drops in successful edits. I'm not necessarily implying causation but this appears to be having at least some impact on people trying to edit. The one at 10:15 today seemingly temporarily halved the number of successful edits from around 20 to around 10. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 17:23, 9 April 2025 (UTC)
- Oh, that's interesting, I just got the error when trying to read pages, I didn't realise it was editing too. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 14:26, 9 April 2025 (UTC)
- Could someone with a bit more techinical knowledge than me interpret this? I've read through T389734 and it looks like it's something to do with Lua...? I'm a bit confused. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 14:25, 9 April 2025 (UTC)
- As I understand it, the root cause is a bug in a low-level library (glibc) which is used by pretty much everything in the universe. The particular path that most commonly tickles the bug is in some Lua code, so the workaround is to disable that bit of Lua. The real fix has to happen in the glibc code, but that will take a while because it has external dependencies (i.e. somebody else manages glibc). In a case like that, you do what you can quickly to make the immediate problem go away. It's kind of like the old joke where you tell the doctor, "It hurts when I do this" and the doctor says "So, don't do that".
- It also sounds like the Lua problem is only one of several manifestations of this bug, so the Lua workaround only reduced how often this happens but didn't eliminate it completely. I'm sure the dev folk are working hard on this so best to just give them some space to do what they need to do. RoySmith (talk) 14:45, 9 April 2025 (UTC)
- Interesting, alright then. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 14:54, 9 April 2025 (UTC)
- This has been going on for a while. The production folks are aware of the problem and are working on it. See T389734 for more info. RoySmith (talk) 13:34, 9 April 2025 (UTC)
- Alright then, well thanks anyways! User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:43, 9 April 2025 (UTC)
- Probably a database error? (DB often stands for that). Don't know more. — Alien 3
- Hm, that's good, would you happen to know what caused it? User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:36, 9 April 2025 (UTC)
- That also signals that it's now going down (300/s vs 700/s at top of spike), so it should settle. — Alien 3
Thought I was the only person having issues, that is interesting. And for the record, I did encounter internal errors of the same type, while reading articles, and whilst attempting to go to other articles. Codename AD talk 14:32, 9 April 2025 (UTC)
Pretty sure this is phab:T390510 (see #10725847 and #10726321), T389734 is for a timeout error (caused by a bug), one that was essentially 'fixed' by removing some logging that was making it likely for the bug to happen. – 2804:F1...E8:9AA2 (::/32) (talk) 19:52, 9 April 2025 (UTC)
- Oh, thank you. I've read the phabricator page, is there any other info on what's causing this? User:Chorchapu (talk|edits|commons|wiktionary|simple english) 22:58, 9 April 2025 (UTC)
- See also phab:T390510#10717702 and #10726260. It's due to an overload after an unexplained spike a) in read requests in one database (not always the same), and b) in connections in all databases. — Alien 3
3 3 06:35, 10 April 2025 (UTC)- Oh, interesting. Seems like I'm obviously a bit ignorant of all the computer talk on the phabricator page. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 12:07, 10 April 2025 (UTC)
- See also phab:T390510#10717702 and #10726260. It's due to an overload after an unexplained spike a) in read requests in one database (not always the same), and b) in connections in all databases. — Alien 3
Source of request spike has been identified: it was a Growth Experiments script aggressively scanning way too many rows of the database. See phab:T391695. It's been disabled until it gets fixed, so normally this shouldn't happen again. — Alien 3
3 3 15:49, 11 April 2025 (UTC)
- Oh, thanks. Glad to see it's been remedied now. User:Chorchapu (talk|edits|commons|wiktionary|simple english) 16:06, 11 April 2025 (UTC)
- Excellent, self-DOS. Izno (talk) 16:59, 11 April 2025 (UTC)
- I don't think that's entirely fair. These are big complicated systems. Stuff happens. Take a look at the example I gave just below. I made a trivial mistake in my query which caused a 20,000x performance hit. Fortunately, the quarry database is sufficiently isolated from production that I assume I only caused a problem to other quarry users. RoySmith (talk) 17:26, 11 April 2025 (UTC)
Why is this query so slow?
[edit][3] has been running for a long time. It's just:
select * from revision where rev_timestamp = 20250409001450
which hits an indexed column, so I would expect it would return almost immediately. What's going on here? RoySmith (talk) 13:36, 9 April 2025 (UTC)
- It did eventually finish, returning the one row I expected it to. Run time was 1205.90 seconds! RoySmith (talk) 15:18, 9 April 2025 (UTC)
- Use timestamp as string;
select * from revision where rev_timestamp = '20250409001450'
– DreamRimmer (talk) 15:16, 9 April 2025 (UTC)
- Yeah, that worked (0.06 seconds). It's weird that not quoting it allowed the query to run and return the right result, but not hit the index. RoySmith (talk) 15:22, 9 April 2025 (UTC)
- It's weird, but true… Confirmed by
EXPLAIN
query result: mysql:research@dbstore1008.eqiad.wmnet [enwiki]> explain select * from revision where rev_timestamp = 20250409001450; +------+-------------+----------+------+---------------+------+---------+------+------------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+----------+------+---------------+------+---------+------+------------+-------------+ | 1 | SIMPLE | revision | ALL | rev_timestamp | NULL | NULL | NULL | 1153964976 | Using where | +------+-------------+----------+------+---------------+------+---------+------+------------+-------------+ 1 row in set, 4 warnings (0.001 sec) mysql:research@dbstore1008.eqiad.wmnet [enwiki]> explain select * from revision where rev_timestamp = '20250409001450'; +------+-------------+----------+------+---------------+---------------+---------+-------+------+-----------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+-------------+----------+------+---------------+---------------+---------+-------+------+-----------------------+ | 1 | SIMPLE | revision | ref | rev_timestamp | rev_timestamp | 14 | const | 1 | Using index condition | +------+-------------+----------+------+---------------+---------------+---------+-------+------+-----------------------+ 1 row in set (0.001 sec)
- I didn't know about this either. I found some discussion of the problem here: https://stackoverflow.com/a/16791526, https://use-the-index-luke.com/sql/where-clause/obfuscation/numeric-strings Matma Rex talk 20:48, 9 April 2025 (UTC)
- Thanks for the pointers. I especially like where use-the-index-luke.com says "Although it is a very bad practice, it does not automatically render an index useless" :-) RoySmith (talk) 22:13, 9 April 2025 (UTC)
- It's weird, but true… Confirmed by
DiscussionTools/Reply Tool stores both keystrokes and the draft?
[edit]Why does the DiscussionTools/Reply Tool store keystrokes in localstorage? For undoing? If you look in localStorage where the key starts with mw-ext-DiscussionTools-reply you see for example:
{"start":6,"transactions":[[1,["","W"],3],"h","a","t"," "]} in ve-changes
This appears to be a security risk, especially for non-public wikis.
Polygnotus (talk) 14:56, 9 April 2025 (UTC)
- It is for edit recovery, for accidentally closed browsers. It was a very popular requested featured. Not sure why a "non-public" wiki would be a security risk, your browser can already see everything you do. Perhaps if you were using a shared computer, in which case you could use a private browser session. — xaosflux Talk 15:13, 9 April 2025 (UTC)
- @Xaosflux Yeah that is what I thought originally, but weirdly it contains both keystroke information and what I actually wrote (at the end of ve-changes). I understand that it needs to store the draft, but that does not require keystroke information. And if the information is stored as keystrokes then it doesn't need the draft message; or at least that is what I would think. See User:Polygnotus/Scripts/DTreplies.js, then scroll to the bottom of User:Polygnotus/sandbox to see it in action.
Not sure why a "non-public" wiki would be a security risk
because, if Bob logs out from his account on a non-public wiki that uses DiscussionTools, he does not expect that Alice can read his drafts without ever logging in to the non-public wiki.- It seems to also store drafts when you haven't actually typed anything which is weird. Polygnotus (talk) 15:18, 9 April 2025 (UTC)
- I don't think Bob should expect that in general when Alice uses Bob's computer, Bob's browser, and Bob's browser profile - that there would be much secrecy from things done within the browser.
- However, clearing this local storage is a feature request that is being looked in to in phab:T341845. Feel free to follow or contribute to that task. — xaosflux Talk 15:37, 9 April 2025 (UTC)
- Agreed, but you know Bob. He loves football, he can't dance, and he knows little about computers. He won't expect that the browser remembers stuff like this. Polygnotus (talk) 15:39, 9 April 2025 (UTC)
- Hm, I think it may be a performance thing, using many small transactions instead of 1 bigger one. Polygnotus (talk) 17:34, 9 April 2025 (UTC)
- Yes, this data is stored as part of the undo stack. It doesn't exactly record keystrokes, it's the same "granularity" of changes that you can see when you perform undo/redo in the tool (the text is separated into 1-character strings for technical reasons – see [4] – but this does not reflect how it was typed). This happens just incidentally in DiscussionTools, because the draft autosave mechanism is shared with VisualEditor's autosave mechanism. FYI, if you switch between Visual and Source modes, all of the details are discarded. Matma Rex talk 21:01, 9 April 2025 (UTC)
- The internet is a security risk. If you don't want Big Brother to watch you, don't connect. Get out your old Apple II and run VisiCalc. --Redrose64 🌹 (talk) 22:03, 9 April 2025 (UTC)
- @Matma Rex (or anyone): is this autosave feature documented? I asked on mediawiki.org recently and received no response. Commander Keane (talk) 02:03, 10 April 2025 (UTC)
- @Commander Keane I don't think those details were ever written down. The feature uses localStorage with all of its limitations, plus an expiry of 30 days. [5][6] Matma Rex talk 02:28, 10 April 2025 (UTC)
- @Matma Rex (or anyone): is this autosave feature documented? I asked on mediawiki.org recently and received no response. Commander Keane (talk) 02:03, 10 April 2025 (UTC)
Prosesize
[edit]Prosesize has stopped working for me, all articles reading as 0b. Have cleared cache and tried through another browser, and in incognito mood. Still all articles showing as 0b. Thanks Hildreth gazzard (talk) 19:54, 9 April 2025 (UTC)
- @Hildreth gazzard It works fine for me. I installed it with Preferences → Gadgets → Browsing → Prosesize and then I went to a random article and clicked the "Page size" option in the tools menu and it says:
HTML document size: 143 kB Prose size (including all HTML code): 5956 B References (including all HTML code): 9977 B Wiki text: 23 kB Prose size (text only): 3312 B (575 words) "readable prose size" References (text only): 912 B
- What browser and device are you using? Do you see an error in the browser console? Polygnotus (talk) 20:00, 9 April 2025 (UTC)
- Yes, I did that, installed it with Preferences → Gadgets → Browsing → Prosesize on an
- iphone and it was working fine. It just stopped the last few hours. No error message. It shows HTML document size and Wikitext size, but all other values are blank Hildreth gazzard (talk) 20:16, 9 April 2025 (UTC)
- For example: this is what it shows for the Mandarin duck
- Document statistics (more information):
- HTML document size: 212 kB
- Prose size (including all HTML code): 0 B
- References (including all HTML code):50 kB
- Wiki text: 27 kB
- Prose size (text only): 0 B (0 words) "readable prose size"
- References (text only): 5751 B Hildreth gazzard (talk) 20:18, 9 April 2025 (UTC)
- @Hildreth gazzard You could try User:Polygnotus/Scripts/ProseSize.js Polygnotus (talk) 20:19, 9 April 2025 (UTC)
- If you go to User:Hildreth gazzard/common.js and add the following text: {{subst:iusc|User:Polygnotus/Scripts/ProseSize.js}} then you should get a "Calculate prose size" option in the Tools menu. Polygnotus (talk) 20:26, 9 April 2025 (UTC)
Is there a valid use for empty section headers?
[edit]T368722 proposes to create new Linter tracking for empty section headers (e.g. === ===
). Are there valid uses for empty section headers that outweigh the negatives? Please respond at the original thread: Wikipedia talk:Linter#New lint category for empty headings. Thanks. – Jonesey95 (talk) 00:54, 10 April 2025 (UTC)
Is it possible to change my username posted in warn templates?
[edit]Typically I use Twinkle to perform warns, but it starts all of my messages with "Hello, I'm Guninvalid". I prefer my name to be written lowercase, "Hello, I'm guninvalid". How could I change this in my preferences? guninvalid (talk) 05:41, 10 April 2025 (UTC)
- Not really, that script doesn't collect a custom username - and even if it did it mostly uses templates that don't support inserting a custom username (e.g. Template:uw-vandalism1). — xaosflux Talk 13:12, 10 April 2025 (UTC)
- @Guninvalid: For manually selected messages you could make your own version in userspace, e.g. copying Template:uw-vandalism1 to User:Guninvalid/uw-vandalism1 with
{{safesub<noinclude></noinclude>st:REVISIONUSER}}
replaced byguninvalid
. See Wikipedia:Twinkle/doc#Warn (user talk warnings) for how to use it. PrimeHunter (talk) 15:32, 10 April 2025 (UTC)
- @Guninvalid: For manually selected messages you could make your own version in userspace, e.g. copying Template:uw-vandalism1 to User:Guninvalid/uw-vandalism1 with
Difficulty reading some user pages in Dark Mode
[edit]Hello, I use Dark Mode on Wikipedia, and I have noticed that when I try to read certain User Pages, the text on the User Pages does not change color, and so if I want to read the user pages, I have to highlight all of the text to be able to see it. A good example of this is User:Valjean for the majority of text on their User Page. I have experienced the problem on other user pages, but I do not remember which one. Could this please be fixed? If there is somewhere else I should bring this up, please let me know, so I can bring it up in that place. Thank you very much. Fun Chaos (talk) 15:28, 11 April 2025 (UTC)
- I have found another page where it is a problem, though less of one: User talk:Keeper76. Fun Chaos (talk) 15:42, 11 April 2025 (UTC)
- Users have a lot of flexibility in how they manage and layout their own user pages. You should be able to just toggle dark mode off on the page, that should be much easier than trying to highlight text. — xaosflux Talk 15:45, 11 April 2025 (UTC)
- How do I change that or a single page, I see how to change that for all pages, but that is process that involves me going to my preferences and changing it, and then changing it back after I have finished reading the user page. Is there a more efficient process? Fun Chaos (talk) 15:54, 11 April 2025 (UTC)
- You can't, but you can toggle it on or off whenever you want, which should be a simpler thing to do than trying to highlight text. There should be a dark mode selector on the appearance menu on the page, if you collapsed that menu look for the symbol that looks like eyeglasses at the top of the screen. — xaosflux Talk 17:50, 11 April 2025 (UTC)
- Thank you, found it. This was helpful and I will do that in the future. Fun Chaos (talk) 20:27, 11 April 2025 (UTC)
- Generally speaking, anything is permitted on user pages, unless explicitly prohibited by WP:UP#NOT. That section does not mention accessibility, colour, contrast or dark mode. --Redrose64 🌹 (talk) 19:31, 11 April 2025 (UTC)
- You can't, but you can toggle it on or off whenever you want, which should be a simpler thing to do than trying to highlight text. There should be a dark mode selector on the appearance menu on the page, if you collapsed that menu look for the symbol that looks like eyeglasses at the top of the screen. — xaosflux Talk 17:50, 11 April 2025 (UTC)
- For what it's worth, the markup on that page is flagged by Linter's night-mode-unaware-background-color option: [7]. Matma Rex talk 21:56, 11 April 2025 (UTC)
- How do I change that or a single page, I see how to change that for all pages, but that is process that involves me going to my preferences and changing it, and then changing it back after I have finished reading the user page. Is there a more efficient process? Fun Chaos (talk) 15:54, 11 April 2025 (UTC)
- Users have a lot of flexibility in how they manage and layout their own user pages. You should be able to just toggle dark mode off on the page, that should be much easier than trying to highlight text. — xaosflux Talk 15:45, 11 April 2025 (UTC)
VisualEditor is broken for me
[edit]I could barely add this topic in, since it uses VisualEditor which is broken for me. More details in this link: [8] (imgur)
Problems with Tables in the paragraph below: Blitzkriegfree (talk) 18:49, 11 April 2025 (UTC)
- Have you tried using a different web browser? Or loading in a private window? You could also try disabling any browser extensions that might be interfering. --Chris 06:57, 12 April 2025 (UTC)
- Alright, it works on Chrome. I think it's broken for FireFox. Disabling browser extensions, or editing in private mode did not help. I hope it will work again someday.
- I will now ping user:Cremastra, as they also expirenced the same issues. {{Ping|Cremastra}} Blitzkriegfree (talk) 12:32, 12 April 2025 (UTC)
- That will not have notified anybody, least of all Cremastra, who I have now notified. More at WP:MENTION. --Redrose64 🌹 (talk) 13:51, 12 April 2025 (UTC)
- Thanks. Cremastra talk 13:58, 12 April 2025 (UTC)
- That will not have notified anybody, least of all Cremastra, who I have now notified. More at WP:MENTION. --Redrose64 🌹 (talk) 13:51, 12 April 2025 (UTC)
Discussion at Wikipedia:Village pump (proposals) §a few standards
[edit] You are invited to join the discussion at Wikipedia:Village pump (proposals) §a few standards. Thryduulf (talk) 15:07, 12 April 2025 (UTC)
Template:Chem generating line breaks
[edit]Hi,
the {{chem}} template currently generates HTML that includes line breaks:
- <span class="chemf nowrap">CO<span class="nowrap"><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1em;font-size:80%;text-align:left"><sup style="font-size:inherit;line-height:inherit;vertical-align:baseline"></sup><br /><sub style="font-size:inherit;line-height:inherit;vertical-align:baseline">2</sub></span></span></span>
So when one copies and pastes from a Wikipedia article into plaintext, one gets results like this (from Naked mole-rat § Metabolism and respiration where I noticed it):
It can live in an atmosphere of 80% CO 2 and 20% oxygen.
That's a bit annoying and surely avoidable, as the {{chem2}} template does not have the same quirk. Could someone who knows what they're doing take a look? Cheers!
- 2A02:560:4D16:1800:9905:C7AA:90CA:BB25 (talk) 16:19, 12 April 2025 (UTC)
- Generated by Module:Su. Izno (talk) 17:28, 12 April 2025 (UTC)
- See Template:Su#Line breaks. — Qwerfjkltalk 17:53, 12 April 2025 (UTC)
- Thanks, both! I looked at the code for both templates, and the difference stems from these two approaches to stacking super- and subscripts, AFAI can tell:
- {{chem}}, via the invoked module
- generates (without the text formatting)
SO<span style="display:inline-block"><sup>2-</sup><br /><sub>4</sub></span>
- which displays as (with the text formatting) SO2−
4 - and plaintext-pastes as
SO2−
4
- generates (without the text formatting)
- {{chem2}}
- generates
SO<span style="display:inline-block"><span style="display:block">2−</span><span style="display:block">4</span></span>
- which displays as SO2−4
- and plaintext-pastes as
SO2−4
- generates
- {{chem}}, via the invoked module
- - 2A02:560:4D16:1800:9905:C7AA:90CA:BB25 (talk) 18:53, 12 April 2025 (UTC)
- Thanks, both! I looked at the code for both templates, and the difference stems from these two approaches to stacking super- and subscripts, AFAI can tell:
- Why is {{su}} implemented in a module? The module seems to provide functionality that could be trivially implemented in wikitext. 86.23.109.101 (talk) 21:15, 13 April 2025 (UTC)
- See Template:Su#Line breaks. — Qwerfjkltalk 17:53, 12 April 2025 (UTC)
Active users at Category:User languages
[edit]How I can see users from language category that been active in current month? For example, most users at Category:User gsw-4 was active 2-3 or 10 years ago, which is kinda useless information. Eurohunter (talk) 10:46, 13 April 2025 (UTC)
- Also the same thing but for those who are members of a wikiproject, ideally weighted to those with the most edits. Polygnotus (talk) 12:54, 13 April 2025 (UTC)
- This should probably be moved to WP:SCRIPTREQ or, preferably, WP:BOTREQ. Polygnotus (talk) 13:09, 13 April 2025 (UTC)
- True, but I have a database query for users who have done edits in the last three months here. Doesn't notice whether have performed logged actions such as issue thanks or blocking. William Avery (talk) 14:10, 13 April 2025 (UTC)
- @William Avery I think that usually people want to know "who should I contact" which means that a user with 1 edit who edited 1 second ago is a worse option than a user with 180.000 edits who edited 3 days ago. Polygnotus (talk) 15:49, 13 April 2025 (UTC)
- True, but I have a database query for users who have done edits in the last three months here. Doesn't notice whether have performed logged actions such as issue thanks or blocking. William Avery (talk) 14:10, 13 April 2025 (UTC)
- You can use this script. – DreamRimmer (talk) 17:58, 13 April 2025 (UTC)
Modern JavaScript is an error?
[edit]If you look at for example User:Andrybak/Scripts/Contribs ranger.js then Wikipedia claims that script contains 129 errors.
Is the thing that checks for errors very outdated? It may be JSHint and I don't see any releases post 2022.
If so, can we change the CodeEditor to use something more modern?
I see T250315 so I'll ping @ESanders (WMF):. Polygnotus (talk) 13:05, 13 April 2025 (UTC)
- Running ESLint is technically possible but quite complex, I'm not sure who will be able to prioritise it in the near future. ESanders (WMF) (talk) 16:27, 13 April 2025 (UTC)
- @ESanders (WMF) This is not the worst problem ever™, but it can be quite annoying when messing about with JavaScript because JSHint keeps warning you of errors that do not exist. Is there maybe an alternative to ESLint that is easier to implement? Polygnotus (talk) 18:07, 13 April 2025 (UTC)
- It may be (?) related to the fact that what's here signaled are private identifiers, which are added in ECMA2026. — Alien 3
3 3 19:46, 13 April 2025 (UTC)- The most recent version supported is ES 2016, see phab:T381537. Snævar (talk) 07:50, 14 April 2025 (UTC)
- If by errors you mean when you go to edit the page, which no one else can, that is strictly identified by the syntax highlighter, which in this case is Ace AFAIK. It simply has not been updated for newer syntaxes yet. (Such issues are relevant when editing CSS as well, e.g. phab:T263852.) The final says on whether a script is valid is the ResourceLoader checker + minifier, for when a script is loaded as a gadget, and your browser.
- My understanding, based on conversation with a relevant volunteer dev, is that phab:T250315 is particularly difficult, and that Ace does not provide the necessary APIs so it would be a lot of developer overhead to support something like that.
- Ace may be removed in favor of CodeMirror at some date, see e.g. activity with phab:T373711. Izno (talk) 22:20, 13 April 2025 (UTC)
Range block calculator?
[edit]I used to use this tool to calculate IP ranges for potential blocks, but now I'm getting a 'not found' error. Has it moved, or been replaced with something else, or just died a dignified natural death, does anybody know? Thanks, Justlettersandnumbers (talk) 19:46, 14 April 2025 (UTC)
- @Justlettersandnumbers: https://nativeforeigner.com/calc/ GMGtalk 19:49, 14 April 2025 (UTC)
- {{IP range calculator}} also exists. Izno (talk) 20:24, 14 April 2025 (UTC)
- It looks like the original moved to https://ftools.toolforge.org/general/ip-range-calc.html (and the template that Izno links to has a "See also" link to an alternative at https://galaxybots.toolforge.org/iprangecalculator, and via m:Toolhub there's yet another alternative at https://iprange.toolforge.org/) HTH. Quiddity (talk) 20:29, 14 April 2025 (UTC)