Wikipedia:Village pump (technical)

(Redirected from Wikipedia:VTP)
Latest comment: 2 hours ago by TheDJ in topic Talk page editing
 Policy Technical Proposals Idea lab WMF Miscellaneous 
The technical section of the village pump is used to discuss technical issues about Wikipedia. Bug reports and feature requests should be made in Phabricator (see how to report a bug). Bugs with security implications should be reported differently (see how to report security bugs).

If you want to report a JavaScript error, please follow this guideline. Questions about MediaWiki in general should be posted at the MediaWiki support desk. Discussions are automatically archived after remaining inactive for five days.

Coming soon: A new sub-referencing feature – try it!

edit
 

Hello. For many years, community members have requested an easy way to re-use references with different details. Now, a MediaWiki solution is coming: The new sub-referencing feature will work for wikitext and Visual Editor and will enhance the existing reference system. You can continue to use different ways of referencing, but you will probably encounter sub-references in articles written by other users. More information on the project page.

We want your feedback to make sure this feature works well for you:

We are aware that enwiki and other projects already use workarounds like {{sfn}} for referencing a source multiple times with different details. The new sub-referencing feature doesn’t change anything about existing approaches to referencing, so you can still use sfn. We have created sub-referencing, because existing workarounds don’t work well with Visual Editor and ReferencePreviews. We are looking forward to your feedback on how our solution compares to your existing methods of re-using references with different details.

Wikimedia Deutschland’s Technical Wishes team is planning to bring this feature to Wikimedia wikis later this year. We will reach out to creators/maintainers of tools and templates related to references beforehand.

Please help us spread the message. --Johannes Richter (WMDE) (talk) 11:11, 19 August 2024 (UTC)Reply

This is a very important task to work on, but I am not sure how this proposal is an improvement for those of us who do not use the VisualEditor.
Compare:
<ref name="Samer M. Ali">Samer M. Ali, 'Medieval Court Poetry', in ''The Oxford Encyclopedia of Islam and Women'', ed. by Natana J. Delong-Bas, 2 vols (Oxford: Oxford University Press, 2013), I 651-54.</ref>

{{r|Samer M. Ali|p=653}}
or:
<ref name="Samer M. Ali"/>{{rp|653}}
with:
<ref name="Samer M. Ali">Samer M. Ali, 'Medieval Court Poetry', in ''The Oxford Encyclopedia of Islam and Women'', ed. by Natana J. Delong-Bas, 2 vols (Oxford: Oxford University Press, 2013), I 651-54.</ref>

<ref extends="Samer M. Ali" name="Samer M. Ali, p. 653">p. 653</ref>
existing workarounds don’t work well with Visual Editor and ReferencePreviews OK, then VE and ReferencePreviews need to be fixed so that they work well with the existing ways of referencing.
Adding another competing standard (obligatory XKCD) is not very useful unless you want to disallow the others which will probably make people very mad (see WP:CITEVAR) and is not necessarily an improvement.
There is no reason why VE or RP would require a new standard, they could just as easily support one of the existing ones (and ideally all of em).
Am I missing something?
Polygnotus (talk) 15:14, 19 August 2024 (UTC)Reply
Sfn is routinely out of sync with its parent and requires the use of third party scripts to detect that it is so. Extended references do not i.e. the Cite extension will issue a warning when you have an extension without a parent.
And Rp is objectively subjectively ugly. Presenting it as a potential option is offensive. :)
In <ref extends="Samer M. Ali" name="Samer M. Ali, p. 653">p. 653</ref>, a name for the subreference is not required (<ref extends="Samer M. Ali">p. 653</ref> will be typical I suppose), and even when it is you can abbreviate since you know what the parent is (e.g. <ref extends="Samer M. Ali" name="SMA653">p. 653</ref>).
Some other benefits:
  • Reference extensions work with reference previews to display the extension directly with the primary citation.
  • The extensions are grouped with the primary citation in the reference lists.
And the third, which you brushed aside: VE works well with reference extensions.
None of which can be said of the other two items. Izno (talk) 16:01, 19 August 2024 (UTC)Reply
And as for OK, then VE and ReferencePreviews need to be fixed so that they work well with the existing ways of referencing., MediaWiki systems try to be agnostic about the specific things that wikis do around X or Y or Z. As a general design principle this helps to avoid maintaining systems that only some wikis use, and leaves the burden of localization and each wiki's design preferences to those wikis. Rp additionally has nothing to work with in regard to VE and ref previews. Izno (talk) 16:06, 19 August 2024 (UTC)Reply
@Izno: Thank you. Gotta sell these things a bit, you know?
Is this style of referencing intended to replace all others? If its better, then lets just abandon all other variants.
The extends keyword is familiar to codemonkeys but perhaps not the most userfriendly for others. I am not sure why it would be harder to show an error when someone writes <ref name="nonexistant" />{{rp|653}} than when someone writes <ref extends="nonexistant">p. 653</ref> but in theory this new system could auto-repair references (has that been considered?) Category:Pages_with_broken_reference_names contains 1300+ pages.
Also I am curious what your opinion Wikipedia:Templates_for_discussion/Log/2024_August_15#Template:R here would be. Polygnotus (talk) 16:17, 19 August 2024 (UTC)Reply
I agree with Izno—I'd rather have a syntax that integrates with the <ref>...</ref> syntax, rather than relying on templates, which mixes in a different syntax, and are wiki-specific. isaacl (talk) 16:28, 19 August 2024 (UTC)Reply
If you control the parser you can make any string do anything you want so the currently chosen syntax is, in itself, no advantage or disadvantage. Polygnotus (talk) 16:31, 19 August 2024 (UTC)Reply
You provided the wikitext for two examples and asked if one seemed to be an improvement, so I responded that in my opinion, the syntax of the sub-referencing feature under development is conceptually more cohesive to an editor than one where wikitext surrounded in braces follows the <ref ... /> code, or uses solely wikitext surrounded by braces. Sure, any strings can be turned into any other strings, but there are still advantages of some input strings over others. I also prefer the resulting output of the reference list. isaacl (talk) 16:45, 19 August 2024 (UTC)Reply
Agreed, but I assume that things are not set in stone yet. I don't mind the difference between [1]:635 and [1.1] or what exact wikicode is used. So I am trying to think about functionality (e.g. automatically repairing broken refs/automatically merging refs instead of how things get displayed/which wikicode is used). Polygnotus (talk) 16:47, 19 August 2024 (UTC)Reply
I apologize as your first post seemed to be concerned about the wikitext markup being used by users of the wikitext editor. From a functionality perspective, I think as Izno alludes to, it will be easier to implement features such as detecting hanging references and merging them together with a syntax that is within the <ref> element, rather than relying on detecting templates and associating them with <ref> elements. That would require the MediaWiki software to treat some wikitext in double braces specially. (It would be easier if the extended information were flagged using triple braces, since it would avoid clashing with the extensible template system, but I don't see any advantages to that over extending the <ref> syntax.) isaacl (talk) 17:09, 19 August 2024 (UTC)Reply
Please don't apologize to me (even if there would be a reason to do so, which there isn't), I am a very confused and confusing person and I understand myself roughly 4% of the time (and the world around me far less often than that). Polygnotus (talk) 17:14, 19 August 2024 (UTC)Reply
Good to see this moving forward. My main interest was how it would look on the hover, rather than in the References section. I thought the ref extends might 'fill in' variable fields into the general ref, but it seems instead that it just created a new line below. How flexible is this below line, will it display any wikitext? Could we for example add chapters and quotes? (Which will need manual formatting I assume.) CMD (talk) 16:53, 19 August 2024 (UTC)Reply
URI fragment support might also be useful. One sub-reference could link to, for example, https://www.cia.gov/the-world-factbook/countries/mexico/#government and another to https://www.cia.gov/the-world-factbook/countries/mexico/#economy Polygnotus (talk) 16:56, 19 August 2024 (UTC)Reply
As noted here meta:Talk:WMDE_Technical_Wishes/Sub-referencing#Unintended_consequences .. unleashing this complexity into the mainstream without guidance is a huge mistake that is going to cause years of cleanup work, if ever. There are two main issues I can think of:
  • What parameters should be sub-referenced? It should be limited to page numbers, and quotes. Not, for example, multiple works, authors, volumes, issues, IDs, dates of publication, ISBN numbers, etc..
  • How is data in a sub-ref added? If it's free-form text, it's a step backwards from CS1|2's uniform |page=42 to a free-form text like "Page 42" or "(p) 42" or whatever free-form text people choose. Bots and tools need to be able to parse the page number(s). Free form text is not semantic. Templated text is semantic. Anything that moves from semantic to non-semnatic is bad design.
Before this is set loose, there must be consensus about how it should be used. It opens an entirely new dimension to citations that is going to impact every user, citation template, bot, bot library (PyWikiBot etc), tool, etc.. -- GreenC 17:00, 19 August 2024 (UTC)Reply
Yeah its also a bit weird to ask for feedback and then already have a proof of concept and say is planning to bring this feature to Wikimedia wikis later this year. You must ask for feedback before code is written and before any timeline exists. Polygnotus (talk) 17:05, 19 August 2024 (UTC)Reply
At a minimum, it should not be added until there are clear guidelines for usage. More specifically, it should have a feature that issues a red error message if the sub-ref does not contain a special template for displaying page numbers and/or quotes ie. anything else in the sub-ref is disallowed. Then new parameters can be added once consensus is determined. We should have the ability to opt-in parameters, instead of retroactively playing cleanup removing disallowed parameters. -- GreenC 17:18, 19 August 2024 (UTC)Reply
@GreenC: So then you would get something like this, right?
<ref extends="Samer M. Ali" page="" chapter="" quote="" anchor="">
<ref extends="Samer M. Ali">{{subref|page=""|chapter=""|quote=""|anchor=""}}</ref>
And then a form in VE where people can fill it in.
Polygnotus (talk) 17:32, 19 August 2024 (UTC)Reply
The former was deliberately not chosen during design work as being too inflexible for all the things one might want to make an extending reference. Izno (talk) 19:33, 19 August 2024 (UTC)Reply
"All the things", which below you said was only page numbers, chapters and quotes. What else do you have in mind? -- GreenC 20:04, 19 August 2024 (UTC)Reply
There have been previous requests for support in CS1 for subsections of chapters of works. But that's beside the point: we don't need to lock this down out of some misbegotten idea of chaos. YAGNI. Izno (talk) 20:45, 19 August 2024 (UTC)Reply
It will be chaos as currently proposed, though I never said "lock this down". Johannes asked for feedback. The two main issues I raised, Johannes already said, these are known issues. He said, make a guideline. So I suggested at a minimum, let's make a guideline. You and Johannes don't seem to be on the same page about that. You hinted that were part of the development team, is that correct? -- GreenC 23:09, 19 August 2024 (UTC)Reply
No, I am a volunteer interested in this work since when it was first discussed at WMDE Tech Wishes and/or the community wishlist and have been following it accordingly, working on a decade ago now.
Guidelines are descriptive also. "We usually use it for this, but there may be exceptions." is reasonable guideline text. "You are required to use it only for this." is another reason it's not going to fly. Izno (talk) 16:06, 20 August 2024 (UTC)Reply
That's a shame, the former was precisely what I imagined and was excited for when I first read about the idea. CMD (talk) 02:36, 20 August 2024 (UTC)Reply
@GreenC We don't do that with regular references. There's nothing in the software that produces a red error message if I do <ref>My cousin's roommate's friend told me</ref>, so why should subrefs be enforcing that? --Ahecht (TALK
PAGE
)
19:37, 19 August 2024 (UTC)Reply
@Polygnotus: This has been being discussed for many years now. m:WMDE Technical Wishes/Sub-referencing was created in 2018, and even then the idea had already been being discussed for a while. phab:T15127 was created in 2008. It's not odd that they're finally at the stage of having an implementation (or if it is, it's that it took so long to get here). Anomie 21:45, 19 August 2024 (UTC)Reply
@Anomie: Ah, thank you, I didn't know this was a "plant trees under whose shade you do not expect to sit"-type situation.   Polygnotus (talk) 22:19, 19 August 2024 (UTC)Reply
You should probably assume that's the situation for any MediaWiki change. A few years back, some user script authors were mad because a code change had been throwing error messages at them for "only" seven years(!), which was obviously too short a time frame for them to notice that anything needed to be adjusted. WhatamIdoing (talk) 23:06, 23 August 2024 (UTC)Reply
I actually totally disagree and think you're making a mountain out of a molehill. My anticipation is that most people will use it for the obvious (page numbers). In some cases they may use chapters (a single long text with a single author or even for anthologies). Rarely do I anticipate them using anything else, but I think they should have the luxury of putting whatever they want in the reference.
As regards mandating some use like templates, that's not how it works, though I can imagine some sort of {{Cs1 subref}}... which is probably basically {{harvnb}} and some others.
One thing however that is sure not to occur is to have subreferences of subreferences. This should prevent the vast majority of pathological cases. Izno (talk) 19:32, 19 August 2024 (UTC)Reply
You think it's a mountain to have a guideline for usage before it's turned on? -- GreenC 20:37, 19 August 2024 (UTC)Reply
Uh, yeah. People have successfully used our current mechanisms for extending a parent reference in many many ways which notably don't fit what you want. Izno (talk) 20:44, 19 August 2024 (UTC)Reply
/me looks back 20+ years… sure is a good thing we wrote all those guidelines before making a wiki that was to become the most popular encyclopedia……. —TheDJ (talkcontribs) 07:20, 20 August 2024 (UTC)Reply
No one's stopping you from writing some guidelines. There might not even be any opposition if you put sensible things in it. But as Izno says, the guidelines would be advisory rather than prescriptive. – SD0001 (talk) 14:03, 20 August 2024 (UTC)Reply
See WP:PROPOSAL if you really want to bother with this. I personally wouldn't recommend it, though. WhatamIdoing (talk) 23:07, 23 August 2024 (UTC)Reply
When a document has a nested structure, e.g., chapters within sections, it is natural for an editor to want citations that match that structure. I would expect nested citations to include arbitrary combinations of author, editor, page, quote, title and URL, depending on the type of document. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 22:15, 19 August 2024 (UTC)Reply

Does "will work for wikitext and Visual Editor" cover the list-defined references examples on the demo page? I'm testing right now and the Visual Editor still seems to have the same problems with list-defined references that have existed for some time.[1] Will this update fix any of those issues? Rjjiii (talk) 02:28, 20 August 2024 (UTC)Reply

Hi, thanks for your feedback, questions and interest in sub-referencing! Given the large number of comments, I’ll try to provide answers to all of them at once:

  1. replacing other referencing styles: We don’t intend to replace other citation styles. We are fulfilling an old community wish, creating a MediaWiki solution for citing a source multiple times with different details. Citation styles are a community matter and per WP:CITEVAR you can continue to use your preferred way of referencing. If the community wants certain referencing templates to be replaced by sub-referencing, they are of course free to do so, but that’s up to you.
  2. reference pop-up:
    • Reference Previews are going to display both main- and sub-reference in one reference pop-up, showing the sub-reference’s details below the main information (example). There are still a couple of details going to be fixed in the next couple of months.
    • ReferenceTooltips (the gadget enabled by default at enwiki) will need an update. It currently only displays the sub-reference’s information (example), similar to the behavior with sfn (example). But different to sfn (example) it currently doesn’t show a pop-up on top of the first pop-up for the main information. Given that gadgets are community-owned, we won’t interfere with that, but we’ll try to assist communities in updating the gadget.
    • Yes it will be possible to display any wikitext in sub-references, just like it is possible to do so using normal references (without any templates). We’ve intentionally allowed this, because local communities prefer different citation styles (and even within communities users have different preferences), therefore our solution shouldn’t limit any of those. Citing sources with different book pages will probably be the main reason to use sub-referencing, but it’s also possible to use it for chapters, quotes or other details.
    • You’ll need to do the formatting (e.g. writing details in italic) yourself, except if the community creates a template for sub-references
  3. URI fragments: Those can be used for sub-references as well (example)
  4. List-defined references in VE: We are aware of the issues mentioned in phab:T356471, many of those also affect sub-references. As we are still defining some VE workflows (currently we’ve mostly worked on the citation dialog) we haven’t found a solution yet, but we might be able to resolve at least some of those issues while continuing our work on sub-referencing in Visual Editor.
  5. What parameters should be sub–referenced?
    • As already mentioned on meta this should be up to local communities, given the many different referencing styles. It should also be up to them to decide if they want to use templates for sub-referencing or not. We’ve reached out to communities much in advance, so you should have enough time working out some guidelines if your community wants that.
    • But as Ahecht said: Users can already use references for all kinds of unintended stuff, sub-referencing is not different to that. It’s necessary to technically allow all kinds of details in sub-references, due to the many different citation styles within one community and across different communities.
    • From our user research we expect most people using sub-referencing for book pages. There will be a tracking category (example) which could be used to check if there is unintended usage of sub-referencing
  6. Nested citations: Should be possible with sub-referencing (example), if you’re talking about WP:NFN?. Feel free to test other referencing styles on betawiki and give feedback if anything doesn't work which should be working.
  7. VE and RefPreviews should be fixed to work with all existing referencing styles: Just like Izno said it’s unlikely to achieve that, because local communities are using many different types of referencing and could come up with new local referencing templates every day. That’s why we’ve chosen to add a new attribute to the existing and globally available MediaWiki cite extension.
  8. Adding another referencing style isn’t really useful: We are fulfilling a wish which is more than 15 years old and has been requested many times in the past years. Existing template-based solutions for citing references with different details only work on those wikis who maintain such local templates – and most of those have issues with Visual Editor. That’s why a global MediaWiki solution was necessary. You can always continue to use your preferred citation style per WP:CITEVAR.
  9. Doesn’t look like an improvement for Wikitext: If you compare it with template-based solutions like {{rp}} you are correct that those allow for simpler wikitext. But if you’re editing in multiple Wikimedia projects, your preferred template from one project might not exist on the other one. That’s why a MediaWiki solution will be beneficial to all users. And most current template-based solutions have the already mentioned disadvantages for Visual Editor users. Also readers will benefit from a more organized reference list by having all sub-references grouped below the main reference.
  10. The attribute “extends” doesn’t seem user friendly for non-technical users: We’ve done several consultations with the global community and a lot of user testing in past years where we asked for feedback and ideas on the attribute name. One takeaway is that the name is less important for many users than we initially thought, as long as they can remember it. And our user tests showed a surprisingly large number of Wikitext users switching to VE in order to use the citation dialog (for referencing in general, not just for sub-referencing) – if you do that, you don’t need to deal with the attribute name at all. We didn’t see any major issues with “extends” for people exclusively using Wikitext in our user tests. But so far there is no final decision on the attribute name, so if you have any ideas let us know (we’ll make a final decision soon).
  11. You should have asked for feedback earlier: We’ve been working on this feature (on and off) for almost 8 years and had a lot of community consultations (e.g. at Wikimania, WikiCite, discussions on metawiki where we invited communities via Mass Message) and many rounds of user testings – always with the involvement of enwiki users. And we are doing this big announcement now in order to make sure that really everyone knows in advance and can provide further feedback while we are finalizing our feature.

Thanks for all of your feedback, it's well appreciated! --Johannes Richter (WMDE) (talk) 16:20, 20 August 2024 (UTC)Reply

Perhaps it would be wise, in future, to make a list of predictable reactions/questions and incorporate the responses to those in the announcement. Highlighting the advantages of a change/addition, USPs if any, why decisions were made and perhaps even a short timeline can make the reception much warmer. Some people here (e.g. Polygnotus) don't know the 15 years worth of background information. The good news is that I think that it is an improvement (although it could be a bigger improvement). I assume others have also mentioned things like ensuring refs don't break and automatically merging refs (but I do not want to dig through 15 years of history to figure out why it wasn't implemented) and this is/was an opportunity to make something superior to the existing methods that could replace them. The OrphanReferenceFixer of AnomieBOT will need to be updated. Polygnotus (talk) 17:04, 20 August 2024 (UTC)Reply
It's always difficult to write such announcements in a way that they answer the most important questions while also being short an concise so that people actually read the them ;) Some of the questions raised in this section have already been answered in meta:WMDE Technical Wishes/Sub-referencing#FAQ and we'll continue to add more frequently asked questions there, if we notice (e.g. in this village pump discussion) that certain questions come up again and again. Johannes Richter (WMDE) (talk) 17:16, 20 August 2024 (UTC)Reply
Agreed, it is super difficult to strike the right balance. And even if you do, some will still be grumpy. But its also very important. Polygnotus (talk) 17:20, 20 August 2024 (UTC)Reply
If the announcement is too long, then nobody reads it. WhatamIdoing (talk) 23:11, 23 August 2024 (UTC)Reply
Yes, the {{collapse}} is super useful. Polygnotus (talk) 01:35, 29 August 2024 (UTC)Reply
Thanks for the detailed response and the included screenshots. I was a bit glum following my comment above but I think I have a better grasp of the underlying concept now. If we are able to use citation templates in the sub-reference field, that may provide a way to fix at least some of the potential issues raised above. Is there a place to track changes to the reference pop-up (File:Sub-referencing refpreview.png)? My first impression is that's perhaps not a necessary large white space but I'm curious to read more discussion on the matter. CMD (talk) 17:25, 20 August 2024 (UTC)Reply
@CMD depends on what you mean by "place to track changes"? There are several phabricator tags which might serve this purpose (although we've collected a lot of user feedback which is still under discussion and therefore not filed as a task yet). We want to use meta:WMDE Technical Wishes/Sub-referencing#Recent changes and next steps to document important changes on the current prototype and can certainly document further changes to Reference Previews for sub-referencing in this section as well, if that's what you imagined? Johannes Richter (WMDE) (talk) 15:43, 21 August 2024 (UTC)Reply
Yes, reference previews are one of the great benefits of the Wikipedia reference system. I'll follow on meta. CMD (talk) 16:27, 21 August 2024 (UTC)Reply

Thanks for the lengthy reply! Can a template tell if it's being used in an extended reference?

If there is any probability of this all working in the Visual Editor, we should also aim to make templates that work in the Visual Editor. That would mean a template that slots inside of an extended reference, rather than a template that invokes one (the way that {{r}} or {{sfn}} work). There is already some discussion at Help talk:Citation Style 1 about building a template for consistency between the main named reference and the extended sub-references. I considered making a proof of concept template that would only handle pages, quotations, and so on, but folks have already mentioned citing named sections in a larger work and other broader ideas.

For a template to plug into this, I've checked the parameters currently available in major templates that cite locations within a longer work. If I've missed anything feel free to update this table:

In-source location parameters in existing templates
Element {{Cite book}} {{rp}} {{Sfn}} other CS1
Page
  • page, p
  • pages, pp
  • at
  • page, p, 1
  • pages, pp
  • at
  • p, page
  • pp, pages
  • loc, at
  • minutes
  • time
  • event
  • inset
Quote
  • quote
    • trans-quote
    • script-quote
  • quote-pages
  • quote-pages
  • quote, q, quotation
    • translation, trans, t, tq, translation-quote, translation-quotation, trans-quotation, xlat
  • quote-page, qp, quotation-page
  • quote-pages, qpp, quotation-pages
  • quote-location, quote-loc, quote-at, quotation-location
(within loc)
No pp
  • no-pp
  • no-pp, nopp
(not available)
Postscript
  • postscript
  • ps

Also, regarding formatting, CS1 and sfn are based (to an extent) on APA and Harvard citation styles.

Also(B), regarding LDR, one of the issues with list-defined references in the Visual Editor is that removing all usage of a reference from an article's body text makes the reference become invisible in the VE and emits this error message on the rendered page, "Cite error: A list-defined reference named "Bloggs-1974" is not used in the content (see the help page)." To have an un-called reference isn't exactly an error, though. Editors move citations from the bibliography and standard references down to other sections (Further reading, External links, and so on); some articles still have general references at the bottom. Is there a way to push un-called references down to the bottom of the list and treat them as a maintenance issue rather than an outright error, like the below example with citations borrowed from Template:Cite book/doc(11-02-2024)

References

  1. ^ Mysterious Book. 1901.
  2. ^ Bloggs, Joe (1974). Book of Bloggs.
  3. * Bloggs, Joe; Bloggs, Fred (1974). Book of Bloggs.
* Notes with an asterisk (*) are not cited inline.

Also(C), regarding guidelines and guidance, we could create Help:Sub-referencing before the feature goes live, Rjjiii (talk) 02:53, 21 August 2024 (UTC)Reply

Can a template tell if it's being used in an extended reference? No, not currently. Lua experts feel free to correct me if I am wrong. Polygnotus (talk) 02:57, 21 August 2024 (UTC)Reply
push un-called references down to the bottom of the list and treat them as a maintenance issue it isn't even a maintenance issue; it is useful if people name refs so that those names can be used later to refer to those refs. But if no one refers to em that is fine. Polygnotus (talk) 03:01, 21 August 2024 (UTC)Reply
I have adjusted the table; |postscript= is for terminal punctuation only, not for in-text locations. As for LDRs that are named but not cited, those are most definitely errors. They are generated by the MediaWiki software, hence the name of the help page (Help:Cite errors/Cite error references missing key) and the use of the word "error" on the Category:Pages with incorrect ref formatting page, and the name of the MediaWiki page that holds the error message, MediaWiki:Cite error references missing key. – Jonesey95 (talk) 04:08, 21 August 2024 (UTC)Reply
@Jonesey95: But why would it be considered an error if a ref has a name but nothing that refers to it? Polygnotus (talk) 08:56, 21 August 2024 (UTC)Reply
Indeed to best of our knowledge templates currently cannot tell if they are being used in a sub-reference. But it should be possible to make such changes. As templates are community-owned, we cannot do that ourselves, but we'll try to assist communities (e.g. by providing documentation or some examples) with the necessary changes to citation tools and templates. Johannes Richter (WMDE) (talk) 15:47, 21 August 2024 (UTC)Reply
Yes, additional parameters might be needed on <ref>...</ref> and on citation templates to designate main and sub-references.
LDRs that are named but not cited are most definitley treated as errors; that doesn't mean that they should be treated as errors. There are other markup languages where uncited references are treated as legitimate. Admiitedly {{Refideas}} is a workaround, but it would be nice if {{Reflist}} could include incited references and if the LDRs were listed first. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 16:20, 21 August 2024 (UTC)Reply

Strange short description - how to fix it?

edit

I started typing "Space-Men" in the search bar and it suggested the Space-Men article with the strange short description of 1960 Italy?'"`UNIQ--ref-00000004-QINU`"'? film. It shows up in the page information page that way too, but not in the article's source/wikitext, so I'm not sure how to fix it. Any ideas? 28bytes (talk) 17:34, 26 August 2024 (UTC)Reply

I think I've fixed it? DonIago (talk) 17:43, 26 August 2024 (UTC)Reply
it does, but it doesn't explain how it got there. Nthep (talk) 17:47, 26 August 2024 (UTC)Reply
Looks like a bug, something to do with strip markers. Nthep (talk) 17:56, 26 August 2024 (UTC)Reply
{{Infobox_film}} builds a shortdescription from the country. The country ends with a reference. A reference gets replaced by a strip marker, for technical reasons. But a short description doesn't have wikitext support, so the stripmarker is not automatically replaced/removed. The template that adds the automatic short description should be updated to strip the strip markers. —TheDJ (talkcontribs) 18:27, 26 August 2024 (UTC)Reply
@TheDJ: is that something you could adjust? Template in question would be Template:Infobox film/short description. - Favre1fan93 (talk) 20:15, 26 August 2024 (UTC)Reply
@Doniago it's almost never a good idea to "fix" something like you as you didn't actually fix the issue and it's probably on other articles. Instead you just have posted it at Template talk:Infobox film/short description so it can be fixed at the source. Gonnym (talk) 20:00, 26 August 2024 (UTC)Reply
While my effort to fix it evidently didn't address the underlying issue, if you're going to slap my hand you could at least acknowledge that I made a good-faith effort to fix the most immediate problem that was presented in the OP, and that I made it clear in my own message that I wasn't sure that I'd really fixed it at all. I'm not sure what you're talking about with the second part of what you've said, unless you meant to say that I could have posted it there. Except that I couldn't have posted it there because I didn't know that the underlying issue was with the template, nor did the OP indicate that the issue lay with the template. DonIago (talk) 20:17, 26 August 2024 (UTC)Reply
Not sure what this was supposed to accomplish. lets be glad some people try to make things better before complaining about their work. —TheDJ (talkcontribs) 22:00, 26 August 2024 (UTC)Reply
After thinking more on it, I agree. Fixing the broken case as a temporary measure seems fine, not different from CSS fixes people make. I do think VPT should try to find the root cause of problems, but I don't think DonIago's change should have been reverted while the problem is not fixed.
Fixing it like that would be bad if it was done in mass as that would create future work, but it wasn't. – 2804:F1...00:86B7 (::/32) (talk) 00:03, 27 August 2024 (UTC)Reply
I'm unclear if the strip markers not being detected is a larger issue, or something that needs to be coded into Template:Infobox film/short description. Nthep and DJ's comments made it seem like an easy fix, so I restored Space-Men to using the auto-generated SD so it will be as it was prior to the issue and utilize that auto SD. But if it is not an easy fix, then yes, we can implement the workaround that Doniago did. - Favre1fan93 (talk) 16:10, 28 August 2024 (UTC)Reply
The problem is fairly common where the infobox generates a short description from values found in the infobox. Often a country is expected, but the country name turns out to be a list of countries. Often (like here) a field is expected to be a simple piece of text, but has a reference appended or includes an extra formatting template. In this case, the reference should be moved into the article text – the infobox should be only a summary of details that are present in full in the article. Otherwise, just add a manual SD like DonIago did. The sandbox is well out of date, so I assume that nobody has signed up to fix the template? If not, can we please just fix the Space-Men article? It hurts — GhostInTheMachine talk to me 18:16, 30 August 2024 (UTC)Reply
It seems easy enough to fix, just wrap the parameter in {{KillMarkers}}. — Qwerfjkltalk 20:28, 30 August 2024 (UTC)Reply
Ah. I would have first tried {{Strip tags}}. Is that too aggressive? However, us mortals make such changes. We need somebody with superpowers to fix the infobox template for us. So, for now, I just fix individual articles as I find them — GhostInTheMachine talk to me 21:41, 30 August 2024 (UTC)Reply
{{KillMarkers}} added. Should solve the Space-Men issue. Please note here or on the talk of the template in question if more issues arise because of this change. - Favre1fan93 (talk) 22:05, 30 August 2024 (UTC)Reply

List of contributions as plain text

edit

If I filter my recent contributions, for example to show only page creations and exclude the User: namespace, I am returned a list of edits.

If I only want the names of the pages concerned, as plain text, can I extract that, using some too or other? If so, how? Or can I get the results as, say, a CSV file? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 18:09, 27 August 2024 (UTC)Reply

Not via the WEBUI, you may get close with the API - but a quarry report is likely going to give you what you want assuming your filters are supported cheaply. — xaosflux Talk 18:26, 27 August 2024 (UTC)Reply
WP:RAQ. Izno (talk) 21:02, 27 August 2024 (UTC)Reply
Another possibility is old-school screen scraping. Just go to your contributions page in a browser and save the page as HTML (in Chrome, it's File/Save Page As..., and I'm sure similar in most other browsers). Then hack at the HTML with standard command-line tools. This did a pretty good job for me:
 % grep "mw-contributions-title" User\ contributions\ for\ RoySmith\ -\ Wikipedia.html | sed -e 's/<\/a>//' -e 's/.*>//' | sort | uniq
It's ugly and hackish, but for a one-off job where you can accept occasional errors, it's often the best way. If you're not into the command-line, google for "HTML to CSV conversion" and you'll find lots of other tools that do this. RoySmith (talk) 15:22, 29 August 2024 (UTC)Reply
I use Notepad++ + regex. I copy the list into Np++, use Alt to column-select all the text to the left of the page names & remove it, then Ctrl+H to remove diffhist [^\r\n]+, leaving only the page names.   ~ Tom.Reding (talkdgaf)  16:23, 29 August 2024 (UTC)Reply

Thank you, Tom.Reding (and all) that's an interesting approach. But the recent results for my contribution include:

    12:02, 26 August 2024 diff hist +32‎ N De Cotiis ‎ #REDIRECT Vincenzo de Cotiis current Tags: New redirect Uncategorized redirect

18 August 2024

    18:59, 18 August 2024 diff hist +32‎ N Taxa inquirenda ‎ Species inquirenda current Tags: New redirect Uncategorized redirect

7 August 2024

    22:04, 7 August 2024 diff hist +31‎ N Jablochkoff electric candle ‎ #REDIRECT Yablochkov candle current Tags: New redirect Uncategorized 

and not only does your regex not work for that (it removes the page titles as well as other stuff), but the "diff hist" columns do not align, as the dates are of differing lengths. Are we at cross purposes? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 14:14, 30 August 2024 (UTC)Reply

Replacing: (\r?\n)[^\r\n]+? diff hist [\+\-][\d\.,]+[‎ ]+(?:N[‎ ]+)?([^\r\n]+?)(?: ‎ )[^\r\n]+
with: $1$2
worked for me for the sample text.
A couple caveats:
  1. The 2 apparently empty brackets [ ] actually contain 2 whitespace characters each, present in sample text, 1 of which is 0-width, so be careful when copy-pasting, since misplacing and/or losing the 0-width character is never good.
  2. There are 3 whitespace characters in (?: ), which are also required.
  3. The position & formatting of diff hist/diffhist probably differs based on skin, but the idea is to use some string that appears at the same relative position on each line.
  4. Make sure there is a blank line before the first line, to match (\r?\n), which are the CRLF characters, or else the regex won't evaluate the first line.
~ Tom.Reding (talkdgaf)  14:57, 30 August 2024 (UTC)Reply

What Izno said. Or, to save you the trip, here's a list going back to late June 2018 (when the create log began). I've removed creations in user talk, too, since I assumed that's what you meant; there were 585 in that namespace, compared to just 21 in User:. CSV available in the cyan "Download data" box. —Cryptic 14:46, 30 August 2024 (UTC)Reply

Invisible text on pending changes page histories with green on black gadget.

edit

I use the green on black gadget available through preferences. When I go to the history of a page which has pending changes, the bytes and the user-entered edit summary for the top two entries are in black text on black. I struggle to read this. If I click-and-highlight then I can read it. I'm not sure how long ago it started. For example here. Can it be fixed? Thanks, DuncanHill (talk) 16:07, 29 August 2024 (UTC)Reply

Which skin are you using? Are you also in dark mode? (If so, which dark mode?) — xaosflux Talk 17:36, 29 August 2024 (UTC)Reply
@Xaosflux: Monobook. No, I'm not using dark mode. DuncanHill (talk) 17:45, 29 August 2024 (UTC)Reply

Old notifications reappearing

edit

The other day, I had a notification I had already seen reappear a month later. Apparently this is something which is seen on occasion, but nobody knows how to reproduce it. If this happens to you, please leave comments on T373443 with whatever details you can figure out, or just email me if you don't have phab access and I can do it for you. RoySmith (talk) 17:57, 29 August 2024 (UTC)Reply

Missing history

edit

The redirect Actinobacillus actinomycetemcomitans seems to have once been an article. Its history shows DRosenbach making an edit that converted it to a redirect and reduced the pagesize by 2037 bytes – but it doesn't show any revisions before that! What might have caused this? (I checked nost:Actinobacillus actinomycetemcomitans, but it didn't exist.) jlwoodwa (talk) 19:52, 29 August 2024 (UTC)Reply

@Jlwoodwa: It's probably something to do with the histmerge that Dreamy Jazz (talk · contribs) carried out at 21:25, 22 May 2024 - the other page involved was Aggregatibacter actinomycetemcomitans. --Redrose64 🌹 (talk) 20:48, 29 August 2024 (UTC)Reply
Special:Redirect/logid/162249345 is the log entry with slightly more details. — xaosflux Talk 21:22, 29 August 2024 (UTC)Reply
Yes this because I history merged the page. The tool doesn't update the "diff count" on the revision that is left behind. The same thing occurs on the history page for Aggregatibacter actinomycetemcomitans, but that incorrect count has a revision before it. Dreamy Jazz talk to me | my contributions 15:44, 30 August 2024 (UTC)Reply

Template code validation

edit

Hi, can someone with a good knowledge of template code have a look at my request over at Wikipedia:Village pump (miscellaneous) § Template:Permanent dead link? Thanks! — AP 499D25 (talk) 02:00, 30 August 2024 (UTC)Reply

Dark mode new talk message

edit

I have been experimenting with dark mode (&withgadget=dark-mode). While doing that, I received a "You have a new Talk page message" notification. In dark mode, I had no idea that the notification was there. The text is black on a dark brown background that visually disappears in the black window. I did not even see the light red badge on the bell. Looking at it now, the pink badge is kind of obvious but I only noticed it while looking for it after seeing the normal notification in another window with the original white background. It is essential that new editors receive an in-your-face talk notification because we block people who do not respond but continue with problematic editing. I know this should be requested elsewhere but there is not much point adding the opinion of one person so I'm looking for thoughts. Johnuniq (talk) 05:07, 30 August 2024 (UTC)Reply

Which skin ? —TheDJ (talkcontribs) 08:02, 30 August 2024 (UTC)Reply
Good point, monobook. Johnuniq (talk) 08:47, 30 August 2024 (UTC)Reply

Problem of using "|show_designation=no" and "|show_type=no" on Template:Public art row

edit

Hi

I am trying to use "|show_designation=no" and "|show_type=no" commands on Template:Public art row when I use the template on list of public art pages, but it keeps showing these colons.

What should I do to stop them being shown?

Cheers Shkuru Afshar (talk) 00:29, 31 August 2024 (UTC)Reply

Please link to an example page. – Jonesey95 (talk) 04:18, 31 August 2024 (UTC)Reply
I created an example on Template:Public art row/testcases. Shkuru Afshar (talk) 06:15, 31 August 2024 (UTC)Reply
The simple answer is that these parameters are not recognised or supported by Template:Public art header. Perhaps it was thought that every table should have these columns. Are you sure it is appropriate to omit them in the article you are working on? — Martin (MSGJ · talk) 06:36, 31 August 2024 (UTC)Reply
No. I am not.
But what if all items don't have a grade? Like List of public art in Melbourne.
And "Type" parameter could be confusing. Some items could be both a sculpture and/or a statue. (Check "Driver & Wipers Memorial" and "King George V" on List of public art in Melbourne) Shkuru Afshar (talk) 06:43, 31 August 2024 (UTC)Reply
If you like, we can take this discussion to Template talk:Public art row (which I have now watchlisted) and we can explore further options — Martin (MSGJ · talk) 06:47, 31 August 2024 (UTC)Reply
I agree.
There, I am going to submit an edit request for both Designation and Type columns. Shkuru Afshar (talk) 06:54, 31 August 2024 (UTC)Reply

Am I imagining that until today I could hide/unhide diffs in my watch list?

edit

Or is that somewhere else? Doug Weller talk 12:30, 31 August 2024 (UTC)Reply

Hm, maybe that is only for user contributions, sorry. Mind you it would be nice if it worked in watchlists. Doug Weller talk 12:33, 31 August 2024 (UTC)Reply
Preferences - Watchlist - Changes shown & Watched pages? Donald Albury 12:57, 31 August 2024 (UTC)Reply
@Donald Albury Nothing there, I think I'm just forgetting it was only contributions. Thanks. Doug Weller talk 13:00, 31 August 2024 (UTC)Reply
@Doug Weller: You load User:Writ Keeper/Scripts/commonHistory.js in meta:User:Doug Weller/global.js. That should give an option to show or hide diffs in both contributions and watchlist. Maybe something interferes with the watchlist part. It works for me. Do you know how to run mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Writ Keeper/Scripts/commonHistory.js&action=raw&ctype=text/javascript"); in your browser console? If yes, does it display the option at https://en.wikipedia.org/wiki/Special:Watchlist?safemode=1? If no, what is your browser? PrimeHunter (talk) 23:00, 31 August 2024 (UTC)Reply
@PrimeHunter Thanks. I'm afraid I am not sure how to add that to my global.js - or how to load the other one in my browser console. In fact, I'd never heard of my browser console until today. I use Chrome and have found it now, but am still pretty clueless. Sorry. Doug Weller talk 08:06, 1 September 2024 (UTC)Reply
@Doug Weller: You already load it in your global.js. That's why you have the diff option in contributions and used to have it in your watchlist. safemode=1 omits user scripts and gadgets. The browser console is a way to run specific JavaScript on a page you are currently viewing. Right-click on an empty part of https://en.wikipedia.org/wiki/Special:Watchlist?safemode=1, click "Inspect", click the "Console" tab in the lower part of the right pane, copy-paste the above command and press enter. Does that give you "Inspect diff" links at the time (it won't last when you leave the page), and do they work? What happens if you do the same at https://en.wikipedia.org/wiki/Special:Watchlist? PrimeHunter (talk) 10:08, 1 September 2024 (UTC)Reply
@PrimeHunter I copied mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Writ Keeper/Scripts/commonHistory.js&action=raw&ctype=text/javascript"); into the console and hit return but got the message "undefined". Doug Weller talk 10:27, 1 September 2024 (UTC)Reply
Not sure if it is relevant, but I've 3 watchlists, one for user and user talk pages, one for articles and their talk pages, the third for Wikipedia and Wikipedia talk, and that one has show and hide diffs. I'm not sure if that's always been the case, sorry. Doug Weller talk 10:32, 1 September 2024 (UTC)Reply
@Doug Weller: I also get "undefined" but that's normal and just means the command has no return statement. The question was whether you get "Inspect diff" links. I do. What do you mean by having three watchlists? Are you referring to pages like Special:RecentChangesLinked/User:Doug Weller/usertalkwatchlist? That's not your watchlist although it has similarities and "Inspect diff" works for me there. If that's actually the page where it's missing for you then try the console command at https://en.wikipedia.org/wiki/Special:RecentChangesLinked/User:Doug_Weller/usertalkwatchlist?safemode=1. Say whether you get the missing diff option, not whether the console says "undefined". PrimeHunter (talk) 10:58, 1 September 2024 (UTC)Reply
@PrimeHunter No, but I've taken up far too much of your time, I can live with what I have. Thanks. Doug Weller talk 11:07, 1 September 2024 (UTC)Reply
Although now my ANI list no longer has hide/show diffs. Doug Weller talk 12:07, 1 September 2024 (UTC)Reply
@PrimeHunter sorry to ping you again, but any ideas who to undo this? Thanks. Doug Weller talk 15:02, 1 September 2024 (UTC)Reply
I've had help and it's fixed. Just had to removed some entries. Doug Weller talk 16:37, 2 September 2024 (UTC)Reply

Dark mode when logged out of Wikipedia

edit

When logged out, in dark mode, at {{Soulfly}}, the actual link for Soulfly is an extremely dark grey that is difficult to see on a black background. It was not this way before. Does anyone know how to fix this? --Jax 0677 (talk) 12:41, 31 August 2024 (UTC)Reply

Xtools appears to be down

edit

Here - it says 'Error' and then "This web service cannot be reached. Please contact a maintainer of this project. Maintainers can find troubleshooting instructions from our documentation on Wikitech." Any idea what's going on? GiantSnowman 13:43, 31 August 2024 (UTC)Reply

Now appears to be back up. GiantSnowman 16:37, 31 August 2024 (UTC)Reply

Adding an EventListener to avoid unwanted submit during type of "edit summary" textboxes

edit

Hi, for example during type of "edit summary" after an edition or during writing "Other/additional reason" for moving a page, users may press enter button, but they may or may not tend to submit their form. In the case of not tending to submit their form, this behavior of Wikipedia may be considered ill-posed. For example consider this scenario:

  1. Enter my sandbox page
  2. Do all the edits you want
  3. Type some edit summary at the final text box
  4. Press Enter

During the third stage, casual pressing enter key may lead to ill-posed submit of this form. So, I propose adding this EventListener to avoid wrong submit:

var input = document.getElementById("myInput");
input.addEventListener("keypress", function(event) {
  if (event.key === "Enter") {
  }
});

Or somehow showing a confirmation message box, like this:

var input = document.getElementById("myInput");
input.addEventListener("keypress", function(event) {
  if (event.key === "Enter") {
      let text = "Are you sure?";
      if (confirm(text) == true) {
        document.getElementById("myForm").submit(); 
      }
  }
});

Thanks, Hooman Mallahzadeh (talk) 15:46, 31 August 2024 (UTC)Reply

This is the default behavior of forms on in HTML. I don't think it is wise to change that. —TheDJ (talkcontribs) 08:46, 1 September 2024 (UTC)Reply
I myself have had many problems with this «default behavior of forms on in HTML». This behavior is not the intended behavior for such important actions like "Edit" and "Move" of pages. I really think that other users of Wikipedia sometimes have had many problems with this default behavior.
  • This default behavior is good for other applications, like entering a password and then checking it on back-end code.
But for "editing" or "moving" an article, this default behavior is not appropriate. In fact, at least a confirmation is required. Hooman Mallahzadeh (talk) 08:56, 1 September 2024 (UTC)Reply
There are a few scripts like that listed in Wikipedia:User scripts/List#Edit form (SuppressEnterInForm, NoSubmitSummary, enterInSummaryPreviews). Nardog (talk) 11:28, 1 September 2024 (UTC)Reply
(edit conflict) See Wikipedia:User scripts/List#Edit summary if you want to disable save on enter. I haven't tried it and wouldn't support it as default. PrimeHunter (talk) 11:32, 1 September 2024 (UTC)Reply
I really think that showing a confirmation before publishing an edit (only showing confirmation in the case of pressing Enter key in the textbox, otherwise not showing) would be helpful. Hooman Mallahzadeh (talk) 12:14, 1 September 2024 (UTC)Reply
To be really blunt: No, it would be absolutely terrible. Izno (talk) 19:24, 1 September 2024 (UTC)Reply
This should not be the default, and I agree with Izno. Dreamy Jazz talk to me | my contributions 21:19, 1 September 2024 (UTC)Reply
As you can see Hooman, many experienced editors are very used to being able to press Tab and then Enter to quickly save their edits ;) even though it causes mistakes sometimes (I've seen many edit summaries cut off because someone pressed Enter instead of an apostrophe).
For what it's worth, other editing interfaces actually show a confirmation message when pressing Enter, and require Ctrl+Enter to actually submit the edit. This was implemented in the visual editor (where the edit summary field appears multi-line, so trying to press Enter to input a line break would be a common mistake) and in the reply tool (the edit summary is hidden under "Advanced" – there was some discussion about that behavior at the time at T326500). Matma Rex talk 21:43, 1 September 2024 (UTC)Reply
And in the CAPTCHA confirmation menu for the reply tool, which might be a side-effect? Thankfully it doesn't happen often, I'm not a fan of needing to press Ctrl+Enter there.
Also, in the 2 years I've edited as IPs I never learned you could edit the summary - only now learning it from you. – 2804:F1...4C:A92D (talk) 23:00, 2 September 2024 (UTC)Reply

How does one go about initiating a request for batch deletion of text?

edit

Over a year ago, User:Mliu92 expressly conceded an error at Talk:California superior courts but never attempted to fix it.

I just tried to fix a few examples and it's taking way too long. As a busy practicing attorney, I don't have two hours to spare to clean up someone else's mistakes. I have better things to do with the Labor Day holiday weekend, like going through more of my photography library to identify more photos for upload to Commons.

One of the longest running debates among lawyers for many centuries is whether a trial court should be organized as a nationwide or statewide entity that merely happens to sit in multiple counties, districts, or circuits—or whether each county, district or circuit should be regarded as having an entirely separate trial court. There are strong public policy arguments for and against each position, resulting in worldwide gridlock on this issue.

California is among the majority of American jurisdictions that adhere to the latter position. In other words, it has 58 superior courts, not one superior court that happens to sit in 58 counties. Section 1 of Article 6 of the California Constitution refers to "superior courts" (notice the plural) and Section 4 starts with the following words: "In each county there is a superior court of one or more judges."

Unfortunately, User:Mliu92 created many articles for superior courts that imply that California adheres to the former position. For example, the article for Santa Cruz County Superior Court incorrectly states that the "Superior Court of California, County of Santa Cruz, is the branch of the California superior court with jurisdiction over Santa Cruz County."

We need a bot to go through the English Wikipedia and replace every instance of the phrase "is the branch of the California superior court" with the phrase "is the California superior court". How do I go about initiating that request? Coolcaesar (talk) 19:11, 31 August 2024 (UTC)Reply

You can request bot work at WP:BOTREQ. — xaosflux Talk 21:32, 31 August 2024 (UTC)Reply
I will take a look at that page. Thank you! --Coolcaesar (talk) 17:06, 2 September 2024 (UTC)Reply

How are references rendered?

edit

A while ago, I asked about references. I put that aside for a while and now I'm picking it up again. It's obvious that my original strategy was not going to work, so I'm starting again. Before I dive into this too deeply, is there any actual documentation on how references are rendered in HTML? Some of it I can suss out. For example, the first citation in Special:Permalink/1233803324 gives:

<sup id="cite_ref-:2_1-0" class="reference"><a href="#cite_note-:2-1">[1]</a></sup>

for the in-line citation and links to:

<ol class="references"> ... <li id="cite_note-:2-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-:2_1-0"><sup><i><b>a</b></i></sup></a> ... </ol>

in the reflist, with the backlink for citation 1a, and I should treat the "cite_ref..." and "cite_note" ids as opaque strings (as opposed to trying to parse them, as I was originally doing). Is that it, or are the more bits of magic that will only become apparent when this iteration of my code breaks on something I haven't seen yet? RoySmith (talk) 19:26, 31 August 2024 (UTC)Reply

There is no documentation on the current parser's format, but there is documentation for the new parser: https://www.mediawiki.org/wiki/Specs/HTML/Extensions/Cite. You will probably have a much more enjoyable time working with the new parser's output anyway, since it includes lots of extra output to make it more machine-readable (e.g. the values for ref name in the data-mw attribute – no need to try to parse them out of the href/id).
You can access the new parser's HTML like this in your browser: [2] or like this from the tool you're working on: [3]. Matma Rex talk 00:20, 1 September 2024 (UTC)Reply
OK, that looks like it might work, thanks. RoySmith (talk) 01:04, 1 September 2024 (UTC)Reply
@Matma Rex what does the about attribute on the <sup> tag mean? RoySmith (talk) 18:53, 1 September 2024 (UTC)Reply
It's somewhat vestigial. For other wikitext XML-style tags, and for template transclusions, it's used to mark all of the HTML tags that were generated by that wikitext tag or template. But since every wikitext <ref> corresponds to exactly one HTML <sup>, the attributes don't provide any extra information. This is mentioned at https://www.mediawiki.org/wiki/Specs/HTML#DOM_Ranges, but it could be documented better… Matma Rex talk 21:32, 1 September 2024 (UTC)Reply
it's used to mark all of the HTML tags that were generated by that wikitext tag or template Wow, that's (in the general case) really useful. I've often looked at the pile of HTML in my browser and tried to figure out what generated it. Now I know! RoySmith (talk) 22:48, 1 September 2024 (UTC)Reply

Disappearing edit

edit
  Resolved
 – There was a subsequent edit. — xaosflux Talk 21:31, 31 August 2024 (UTC)Reply

I'm not familiar with Phabricator and I'm not sure it's the best place to point this out. I made this edit. It appeared on the page after I clicked on the button to publish. As I clicked back to where I was before, the edit disappeared. It was gone from the live page and also gone when I clicked the edit button to browse the page's text, this without any intervention via succeeding edits. This continued to be the case after I cleared the cache for the page. However, the edit was still there when I checked the page's edit history and my own contribution history. I thought this to be bizarre, as I don't recall anything like this ever happening before. RadioKAOS / Talk to me, Billy / Transmissions 20:14, 31 August 2024 (UTC)Reply

Your edit was undone by Sunshineisles2 in Special:Diff/1243313302 about 40 seconds after yours. I'm assuming this was an inadvertent reversion due to an edit conflict. RoySmith (talk) 20:23, 31 August 2024 (UTC)Reply
Thanks. I saw that edit but I guess I neglected to scroll all the way down. RadioKAOS / Talk to me, Billy / Transmissions 20:30, 31 August 2024 (UTC)Reply
Yes, I was unaware this happened and it was completely unintentional. Apologies for any confusion. Sunshineisles2 (talk) 21:24, 31 August 2024 (UTC)Reply

Tool request: What changed recently?

edit

  Courtesy link: User talk:Mathglot § Ships of ancient Rome‎‎
  History link: these 6 edits at Ships of ancient Rome

(Note: not sure this is the right venue for a tool request; I searched around and the hatnote at Wikipedia:Bug reports and feature requests pointed me here.)

I would like to request a tool that, given a revision number (or title) of a page and timestamps T1 and T2, would run down all the transcluded templates, {{excerpt}}s, and modules in that rev, and return a most-recent-first sorted list of transcluded/invoked items which have changes recorded in their history between T1 and T2, or since T1 (if T2 is empty). The tool should recursively expand templates (maybe only if |recurse=y?). Possible format: four columns, with 1) Item name, 2) last change timestamp, 3) rev. number, 4) userid; where item name could be template, module, or excerpted source pagename. Bonus: column five, containing the template traceback sequence, if the row item was not found at top level, i.e., the item was not directly transcluded by the given page rev., but further down.)

Here is my use case: I recently panicked when I noticed that Ships of ancient Rome, which has over one hundred {{sfn}} short citations and makes liberal use of {{excerpt}} had fifty harv errors of the type 'Harv error: link from CITEREFLastname-YYYY doesn't point to any citation'. (I am very familiar with sfn/Harv errors of this sort and how to fix them, and wrote part of the doc for it; ditto {{excerpt}} doc.) The offending edit was a very minor change to add a {{convert}} template to the body (diff) which resulted, very oddly, in the 50 errors. No one had changed {{convert}} or Module:Convert, so I first suspected PEIS issues or nonprinting characters, but that proved wrong, and the problem went away during the time I worked on it (see these 6 edits), so I presume an upstream problem had been fixed in the interim. It could have been an entirely different template, but my investigation was hampered, and then I abandoned it, because of the impracticality of tracking down every transclusion made by the article, possibly recursively if nothing changed in directly transcluded items.

Having a tool that would return a sorted list of most recently changed transcluded items would be a powerful aid in this situation. (O/T: we need a word that encompasses the meanings of transcluded, invoked, or excerpted; I vote for eval'ed unless somebody has a better idea.)

The way things turned out, the problem I observed (whatever the cause) was fixed while I looked into it, and that's great, but what if it hadn't been? Such a tool would be very useful to help someone track down a real problem and make it possible to find and advise the author of a recent change that broke something, whereas now, it is so impractical as to be near hopeless. Can anyone build this? (edit conflict) Mathglot (talk) 21:04, 31 August 2024 (UTC)Reply

Sounds a lot like Special:RecentChangesLinked, except substituting the templatelinks table for pagelinks, only going in one direction, and without the unfeasible complication of looking at old revisions instead of the current one. I'm surprised it's not in MediaWiki already (and wouldn't be surprised if it was and I just didn't know where to find it). Twenty years ago I'd have suggested making a feature request. For now, something like quarry:query/85974 is probably the best you can hope for. —Cryptic 21:43, 31 August 2024 (UTC)Reply

Parser function for checking if a user is blocked

edit

If possible, could someone assist me with a template which checks if a user is blocked?

The syntax would ideally go something like this:

  • {{ifblocked|Blocked User|foo|bar}} would return foo because Blocked User is blocked.
  • {{ifblocked|Magog the Ogre|foo|bar}} would return bar because Magog the Ogre is unblocked.

I'm happy to use Lua if necessary (I have never learned to use Lua, unfortunately).

If possible, I would prefer to also check global locks. Magog the Ogre (tc) 13:25, 1 September 2024 (UTC)Reply

This is currently not possible. See phab:T27380 and phab:T325146. * Pppery * it has begun... 13:44, 1 September 2024 (UTC)Reply
Do you have a certain use-case in mind? And especially, is this something for mainly personal convenience or a tool you might share, or instead is it for something you are developing for wider adoption/generally used template-tags? DMacks (talk) 21:48, 1 September 2024 (UTC)Reply
@DMacks: yes it would come in useful on c:User:SteinsplitterBot/Previously deleted files. I have written an API script which could be installed globally on a project (if we still support that?) and could be used for any use case. But it's an onerous workaround. Magog the Ogre (tc) 00:11, 3 September 2024 (UTC)Reply
My thought was basing something on MediaWiki:Gadget-markblocked.js. But I'm not a JS whiz, and it's JS/API so it's maybe not lightweight or easily deployable. DMacks (talk) 04:08, 3 September 2024 (UTC)Reply

template/technique request : insert wikitext between each character of string

edit
  resolved

i am looking for something that works like the following two examples
; between abca;b;c
{{key| followed by }}{{key| between abc followed by }}abc
thanks in advance akizet talk 20:34, 1 September 2024 (UTC)Reply

{{#invoke:String|replace|source=abc |pattern=(%a) |replace={{key|%1}} |plain=false}}
abc
Trappist the monk (talk) 20:49, 1 September 2024 (UTC)Reply
thank you :)akizet talk 21:05, 1 September 2024 (UTC)Reply

Talk page editing

edit

I'm a long time editor. Throughout my career, I have used Safari. I am not updated to the most recent OS because my computer cannot handle it. I have no problem editing in mainspace. However when I make an edit to a talk page (even this page), if I move my cursor, the next capital letter will jump the cursor to the first character of the edit box, meaning I have to go back to move all sentences through cut and paste. It's obnoxious. It makes it hard to concentrate when so many sentences now constructed in reverse order need to be moved.Trackinfo (talk) 19:40, 2 September 2024 (UTC)Reply

@Trackinfo: A Firefox user reported the same at Wikipedia:Help desk#Glitches when typing on talk pages. They used the same "Enable quick topic adding" at Special:Preferences#mw-prefsection-editing as you so it may not be the browser but a conflicting preference, script or something else. The tool works for me in the same Firefox version 129.0.2 (64-bit) as the help desk report. If you keep the tool enabled for testing then does it work or fail at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)?safemode=1? PrimeHunter (talk) 20:11, 2 September 2024 (UTC)Reply
It's been reported here several times over the last few years, they'll be in the archives. --Redrose64 🌹 (talk) 21:51, 2 September 2024 (UTC)Reply
If i remember correctly, it was the fault of the Google Translate gadget. —TheDJ (talkcontribs) 20:50, 3 September 2024 (UTC)Reply

COI edit request category not updating

edit

Usually when I mark a COI edit request as answered or declined Category:Wikipedia conflict of interest edit requests updates almost immediately, but I've answered several today since the morning and they're still in the unanswered requests category. Any idea why this might be? I've purged the cache of the page and I don't believe I'm doing anything differently than usual. Example of an answered request still showing up in the category at Talk:Pershing Square Capital Management. Rusalkii (talk) 23:00, 2 September 2024 (UTC)Reply

@Rusalkii: Do you mean the box with the rows having differently-coloured backgrounds, or the list below the heading 'Pages in category "Wikipedia conflict of interest edit requests"'? They have different origins.
The second one is the primary list, it is driven directly by the use of the {{edit COI}} tag (with no parameters, or with certain param values) on a talk page, and it should update at the exact moment that you save an edit that adds e.g. |D or |answered=yes to the tag.
If you mean the box, it's transcluded from User:AnomieBOT/COIREQTable which is built periodically by AnomieBOT (talk · contribs). I would not expect this to update instantaneously, a delay of minutes or hours is not uncommon. If AnomieBOT is not updating the page, that's a matter for the bot operator, i.e. Anomie (talk · contribs), but please read the bot's User: and User talk: pages before raising what might be a duplicate complaint. --Redrose64 🌹 (talk) 07:26, 3 September 2024 (UTC)Reply
Something on Toolforge had taken out several of the bot's processes. The bot has been restarted now. Anomie 11:31, 3 September 2024 (UTC)Reply
Got it, thanks! Rusalkii (talk) 17:09, 3 September 2024 (UTC)Reply

Tech News: 2024-36

edit

MediaWiki message delivery 01:03, 3 September 2024 (UTC)Reply

Does anyone know how we can get the new keyword into the automatic "This is the template sandbox page for..." note that appears on template sandbox pages? – Jonesey95 (talk) 04:15, 3 September 2024 (UTC)Reply
@Jonesey95: It's been done by WOSlinker (talk · contribs) with this edit. --Redrose64 🌹 (talk) 07:35, 3 September 2024 (UTC)Reply

Incategory searches missing redirects?

edit

Wanted to ask about a recurring problem I run into occasionally when working with Wikipedia:Database reports/Polluted categories to clean up userspace content in articlespace categories. When I use each category's "search user namespace" link in that report, I will either get a list of one or more userspace pages, or the text "There were no results matching the query" — the majority of the time, the latter means that the category has already been cleaned up, either by me via another query earlier in the batch (since pages are often in more than one category at the same time) or by somebody else before I even got to it. However, on occasion there are categories on a redirect in userspace, which the search link seems to fail to detect because it's a redirect instead of a straight sandbox "article", and thus tells me that the category is already clean when it actually isn't.

So because the link failed to detect the redirect and told me that the category was clean, I just move on, but because the category isn't actually clean, that redirect just stays in the category until I notice, on a future run of that report, that the search link was purple (meaning I've visited that exact search link before) and the category is still empty — meaning that I have to take the extra step of manually eyeballing the category to see if there's a userspace redirect in it. Examples: User:Upgov.in/sandbox, which had been in categories since August 19, and User:Luis Santos24/sandbox2, in categories since August 11, meaning they both survived multiple regenerations of the report before I finally caught them today.

TLDR, the polluted categories report does catch userspace redirects, but the search link fails to find them when I use it.

However, since the majority of "there were no results matching the query" categories are actually genuinely clean, it wouldn't be a productive use of my time to consistently double-check every category whose search link produces that result across the board — so my question is whether somebody can look into ensuring that the incategory search stops failing to detect redirects so they can be caught the first time instead of loitering around for multiple regenerations of the report. Bearcat (talk) 17:51, 3 September 2024 (UTC)Reply

No search actually returns redirects. Izno (talk) 18:00, 3 September 2024 (UTC)Reply
Well, then, is there any other way to solve the problem besides the total non-starter "just let userspace redirects survive multiple regenerations of the report before getting caught" or the total non-starter "manually double-check every single category that came up as already empty"? Bearcat (talk) 18:07, 3 September 2024 (UTC)Reply