Jump to content

Template talk:Unsigned

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Edit request: trim

[edit]

Please change all occurences of

{{{1<noinclude>|Example</noinclude>}}}

to

{{{{{|safesubst:}}}trim|{{{1<noinclude>|Example</noinclude>}}}}}

This will trim the leading and trailing whitespaces/newline, from the input. I learned in my most recent usage of this template that these whitespaces aren't being trimmed by default. CX Zoom[he/him] (let's talk • {CX}) 21:30, 4 May 2023 (UTC)[reply]

This looks like a reasonable request. Can you please give an example, maybe via a diff or sample code, showing why this is needed? – Jonesey95 (talk) 21:57, 4 May 2023 (UTC)[reply]
@CX Zoom: * Pppery * it has begun... 18:41, 9 May 2023 (UTC)[reply]
Thanks for the ping, I wasn't subscribed. Here is an example: Special:Diff/1153209143. Notice how it is [[User:CapnJackSp |CapnJackSp ]] ([[User talk:CapnJackSp #top|talk]], with spaces because I had left a space beyond the username; the diff preceding it shows no space, because in that case I did not leave a space beyond the name. CX Zoom[he/him] (let's talk • {CX}) 19:28, 9 May 2023 (UTC)[reply]
I'm inclined to decline this - the Wikilink syntax already appears to ignore the extra space, so I see no reason we shouldn't let it. * Pppery * it has begun... 19:32, 9 May 2023 (UTC)[reply]
Not when you use multi-line formatting, might be very rare to use it in this manner but plausible. See Special:Diff/1154024441. trim fixes all cases. CX Zoom[he/him] (let's talk • {CX}) 19:39, 9 May 2023 (UTC)[reply]
This hypothetical multi-line usage causes a Linter error. I've been fixing Linter errors for five years now – I've fixed hundreds of thousands of them – and I don't recall seeing a single instance of this problem in this template or any of its siblings. My memory is not perfect, but this seems like a solution in search of a problem. – Jonesey95 (talk) 23:46, 9 May 2023 (UTC)[reply]
This doesn't apply to IP users' [[Special:Contributions/<IP user>]] pages. Duplicated this request (with reasoning+examples) over at unsigned IP. Tule-hog (talk) 20:22, 25 October 2024 (UTC)[reply]
 Not done: See Jonesey comment. Izno (talk) 22:18, 12 May 2023 (UTC)[reply]

Revert of Gonnym's change

[edit]

User:Gonnym made a breaking change to this template this morning, swapping parameters due to an unspecified TFD that was not advertised on this page. I have reverted pending discussion.

IMO, if people want to be able to specify the date first and username second for some reason, despite signatures having the username first and date second, and don't want to use {{subst:unsigned2}} to do that, someone should write a module that will determine which parameter is the username and which the date and DWIM it instead of surprise-breaking User:SineBot, User:Anomie/unsignedhelper.js, and whatever else is out there. Anomie 13:16, 5 May 2025 (UTC)[reply]

You do know that instead of calling it a unspecified TFD, you could have taken a second to check the TfD and find it, right?. For anyone else intrested, the TfD was at Wikipedia:Templates_for_discussion/Log/2025_April_21#Template:Unsigned2. If you want to challenge it, that is either at User:Explicit, or WP:Deletion review. This talk page isn't the place. Gonnym (talk) 13:21, 5 May 2025 (UTC)[reply]
And I was supposed to find that how, exactly? Digging through all recent TFDs hoping to find the right one?
This is an appropriate place to discuss breaking changes to this template. A TFD that was never advertised here is not. Anomie 18:15, 5 May 2025 (UTC)[reply]
It should be obvious that breaking a substituted template that has been widely used for many years is a big step that would require discussion here and notification at noticeboards where people who use the template in some tool (such as me) would have a chance of seeing it. Johnuniq (talk) 01:45, 6 May 2025 (UTC)[reply]

Removal of UTC from module

[edit]

@HouseBlaster: I noticed that you removed code that appended "(UTC)" to the unsigned signature (Special:Permalink/877272498 #L13-19 prior to your edits). This is causing the corresponding reply to not be recognised by the Talk Page parser, which has resulted in the removal of [reply] links, miscounting the number of comments in a discussion and failure to use Special:GoToComment and misleading notifications. With no recognisable signature, the parser assumes that the reply is part of the next signed reply. Please fix the code to append (UTC) as it used to do before. Thanks! CX Zoom[he/him] (let's talk • {CX}) 00:50, 13 June 2025 (UTC)[reply]

Is that actually happening? It should be re-added by Module:Unsigned#L-22. It seems to be working at the latest SineBot edit I checked (Special:Diff/1295299829). And this is intentionally signed using {{subst:unsigned}}, code being {{subst:unsigned|HouseBlaster|01:02, 13 June 2025}}: — Preceding unsigned comment added by HouseBlaster (talkcontribs) 01:02, 13 June 2025 (UTC)[reply]
@HouseBlaster: Apparently, this doesn't work with {{unsigned2}}:
{{subst:unsigned2|01:10, 13 June 2025|CX Zoom}} gives — Preceding unsigned comment added by CX Zoom (talkcontribs) 01:10, 13 June 2025
. CX Zoom[he/him] (let's talk • {CX}) 01:09, 13 June 2025 (UTC)[reply]
Ah.  Fixed. As a note, you can now use {{unsigned}} in place of {{unsigned2}}, which is a redirect :) HouseBlaster (talk • he/they) 01:20, 13 June 2025 (UTC)[reply]
Thank you very much! CX Zoom[he/him] (let's talk • {CX}) 01:23, 13 June 2025 (UTC)[reply]

Template broken

[edit]

Just noticed this template has been broken for about a month on several pages. The date is being placed in the user portion and the user name seems to disappear. It seems to work when the parameter order is reversed, but the the template's page still shows that either order can be used. This is rather confusing. Is this a bug or has the parameter system been change (in which case I'm going to have to modify a bunch of tools)? — al-Shimoni (talk) 10:02, 25 June 2025 (UTC)[reply]

@Imeriki al-Shimoni: Please post a link to where the problem can be seen and quote a small amount of text so we can easily search for the issue. Two links would be better. I see that HouseBlaster recently made some changes to Module:Unsigned and they might be able to explain the issue. Johnuniq (talk) 10:21, 25 June 2025 (UTC)[reply]
Here are a couple examples 2025-06-25 and 2025-05-28. The one from May 28 was the earliest of my edits where Unsigned didn't get replaced as expected (the last time I used Unsigned before May 28th was on May 20th). I just finished going back and corrected these and others manually. — al-Shimoni (talk) 10:54, 25 June 2025 (UTC)[reply]
Regarding the first link, previewing {{subst:unsigned|Clive sweeting|14:05, 13 May 2008}} in a sandbox shows the user name and date correctly. Is that what you would have done? The module was edited around the time you added the template. Maybe there was a period when it was not behaving normally? Johnuniq (talk) 11:47, 25 June 2025 (UTC)[reply]
I can look into this when I get home. What is the exact wikitext you are entering which gets the funky result? I.e. the stuff with {{subst:unsigned}}. HouseBlaster (talk • he/they) 11:47, 25 June 2025 (UTC)[reply]
The exact text I used was {{subst:Unsigned|Clive sweeting|14:05, 2008 May 13 (UTC)}} which is also what Anomie suggested below (the date format is different from your version). Anomie suggests that "The module doesn't recognize that as a date, treating it like a username instead," which is interesting. When I use it in a sandbox preview with both date formats, the rearranged date ("13 May 2008" instead of "2008 May 13") does indeed work as Anomie suggests while the original format breaks. I'm guessing this means the module changed how it detects what is an acceptable date recently? The date format I have been using for years ("2008 May 13") is also the format that appears in "Revision history"s for pages. Guessing the format is probably set in my WP Preferences??? (Yep, just checked; it is the fourth option of five [Preferences→Appearance→Date format].) — al-Shimoni (talk) 00:59, 26 June 2025 (UTC)[reply]
Until recently, |1= was always the username and |2= was always the date. Then someone decided they wanted to merge {{Unsigned2}} (which took the two parameters in the opposite order) and various other unsigned templates with this one, necessitating detection of which is the date and which the username instead. Anomie 03:11, 26 June 2025 (UTC)[reply]
Looks like in both cases they were using a date like "14:05, 2008 May 13 (UTC)" rather than "14:05, 13 May 2008 (UTC)". The module doesn't recognize that as a date, treating it as a username instead. Anomie 12:06, 25 June 2025 (UTC)[reply]
@Imeriki al-Shimoni, per Wikipedia:Signatures § Purpose of signatures, It's because of this that it's also important to not change the timestamp of any signatures. Signatures use the DMY format, which is what most tools recognize as a signature. It was invalid all along; the template just started caring that the timestamp was formatted incorrectly. I've deployed a change which restores the status quo ante, and this weekend I'll try to expand the functionality to make it automatically convert to the format used by signatures. Best, HouseBlaster (talk • he/they) 01:28, 26 June 2025 (UTC)[reply]
Sanitizing to a standard format sounds very good. I'll be rewriting my tools to conform as well. — al-Shimoni (talk) 02:07, 26 June 2025 (UTC)[reply]
I am one of those who have gone off the idea of being liberal in what you accept. I would prefer that a style guide specified whether or not "2008 May 13" is a valid date. To my mind, the answer is no, although I can see that it is a nod to yyyy-mm-dd. The problem with accepting weird formats is that they proliferate and lead to complex code that tries to do what was intended rather than what was specified. I would prefer the template to display a mild error if no valid date is provided. Johnuniq (talk) 05:21, 26 June 2025 (UTC)[reply]
OTOH, recognizing the limited set of formats selectable in Special:Preferences may be a good place to draw a line. Anomie 11:19, 26 June 2025 (UTC)[reply]
I was under the impression that, even before the recent conversion to Lua, the only valid form of date for use in {{unsigned}} (and all variants) was the exact form that is produced by using four or five tildes. This method of generating a timestamp always uses the {{#time: H:i, j F Y (e)|...}} format, regardless of the setting at Preferences → Appearance → Date format. --Redrose64 🌹 (talk) 15:24, 26 June 2025 (UTC)[reply]
The old version of {{unsigned}} just passed through whatever you gave it for |2=, adding "(UTC)" to the end if it wasn't already present. See Special:Diff/1287432109 for example. The new version needs to actually recognize dates in order to do the right thing. Anomie 15:51, 26 June 2025 (UTC)[reply]
This is  Completed; the module now recognizes anything from Special:Preferences and automatically converts them to the signature format. HouseBlaster (talk • he/they) 20:02, 28 June 2025 (UTC)[reply]
@HouseBlaster, @Anomie, @Redrose64, @Johnuniq This is still broken. Please fix it. See Talk:2025 Coeur d'Alene shooting where I've left a non-subst'd invocation... —Locke Coletc 19:50, 30 June 2025 (UTC)[reply]
2025-06-30T18:17:37 is not a valid timestamp. Please stick to the format that would have been produced by using four or five tildes, i.e. 18:17, 30 June 2025 (UTC). --Redrose64 🌹 (talk) 20:34, 30 June 2025 (UTC)[reply]
It is a valid timestamp as taken from the page history. Please unbreak the template. —Locke Coletc 20:38, 30 June 2025 (UTC)[reply]
You know what, forget it. I'll make my own unsigned template and use it instead of this broken thing. —Locke Coletc 20:39, 30 June 2025 (UTC)[reply]
@Locke Cole: I see you created Template:Unsi. Do you want to redirect that here, now that the bug is fixed? HouseBlaster (talk • he/they) 22:21, 30 June 2025 (UTC)[reply]
It still omits the seconds when provided a more precise timestamp. {{unsi}} does not suffer from this limitation. —Locke Coletc 22:48, 30 June 2025 (UTC)[reply]
Which violates WP:SIGPROB: The timestamp must adhere to the system-generated format (HH:MM, D MM YYYY (UTC)) and must not be customized. This is necessary for clear communications and for archiving bots to function correctly. Timestamps that are customized may be considered disruptive and editors using them may be blocked accordingly. HouseBlaster (talk • he/they) 22:51, 30 June 2025 (UTC)[reply]
I mean, prior to this change I was using this exact date format and nobody ever came to my talk page citing WP:SIGPROB. Probably because it is a system generated format that is produced by MediaWiki itself in the page history. —Locke Coletc 22:54, 30 June 2025 (UTC)[reply]
Including the seconds would also defeat the Reply tool. --Redrose64 🌹 (talk) 22:56, 30 June 2025 (UTC)[reply]
No, it does not. See User talk:Locke Cole/ReplyToolTest. —Locke Coletc 23:08, 30 June 2025 (UTC)[reply]
Though I suppose it depends on what you mean by "defeat". I agree, my current template doesn't get a fancy [ reply ] button, however, the customized output of this template (one of the bottom examples at the linked page) does get the button still, it just seems to mess with the age calculation when you hover over the date/time. —Locke Coletc 23:12, 30 June 2025 (UTC)[reply]
The "Preceding unsigned comment added by Example on 2025-06-27T18:43:28 (UTC)" doesn't have a Reply button. And "User:Example (talk • contribs) 17:58:03, 27 June 2025 (UTC)" gets a misleading timestamp of 58hrs03min, the system calculates it to be a time on 29th June according to the Special:GoToComment link. CX Zoom[he/him] (let's talk • {CX}) 08:07, 1 July 2025 (UTC)[reply]
Since the seconds are not expected, the timestamp is having the hours cropped off in order to make it fit the format 99:99 directly followed by a comma and then the date. --Redrose64 🌹 (talk) 08:23, 1 July 2025 (UTC)[reply]
Which is a minor issue, and one that could be corrected in ReplyTo without significant effort. —Locke Coletc 02:42, 2 July 2025 (UTC)[reply]
That, if only someone is willing to raise an issue, fix the code and merge the issue to production. But, fixing it on our end requires minimal effort. Also, contribs pages lists timestamp in a different format. I do not know why you have a different format, it seems that you have some setting, gadget or user script interfering with it. CX Zoom[he/him] (let's talk • {CX}) 06:29, 2 July 2025 (UTC)[reply]
All "normal" sigs - that is, those produced by the use of four or five tildes - have exactly the same format: "hh:mm, dd Month ccyy (UTC)", with the date in that order and no seconds. Gadgets do exist to reformat these when reading the page, but they do not affect what is in the edit window. --Redrose64 🌹 (talk) 17:41, 2 July 2025 (UTC)[reply]
The output under discussion is not produced by a gadget, it is produced by MediaWiki itself. —Locke Coletc 14:02, 3 July 2025 (UTC)[reply]
No, the timestamp produced by MW is "hh:mm dd month yyyy". See File:Editwar.png as example. CX Zoom[he/him] (let's talk • {CX}) 17:52, 3 July 2025 (UTC)[reply]
@Locke Cole: If you're talking about "2025-07-04T00:08:26" style as is produced in history and contributions pages, support for that in this template has been fixed since shortly after this discussion began (and two minutes after you created Template:Unsi). If you're talking about "17:58:03, 27 June 2025 (UTC)" mentioned above, where is that produced? If you're talking about some other format, please clarify what it is and where it's produced.
@Redrose64: While four or five tildes does produce only "00:08, 4 July 2025 (UTC)" style, much of the discussion here is about dates being copy-pasted out of history or contribution pages which can be in different formats depending on preferences.[reply]
@CX Zoom: While that screenshot shows the default format, the display in history pages and contributions lists can be changed in Special:Preferences#mw-prefsection-rendering. Anomie 00:17, 4 July 2025 (UTC)[reply]
Probably because most people aren't looking for SIGPROB violations. It breaks the reply link; I don't see such a link on your test page by the comment with the non-standard signature. Regards, HouseBlaster (talk • he/they) 23:28, 30 June 2025 (UTC)[reply]
A modified version of yours is at the bottom. It has a reply-link even with the seconds added to the timestamp. You are correct that mine does not, but that was more or less just a test for my own sake. The owners of this template engaging in ongoing hostility (see the TFD @HouseBlaster initiated while this discussion was still active) has left me with little choice than to swear off this template and simply commit to manually signing unsigned comments in the future.
Side note: We (the community) deliberately did not use software that was designed ages ago to handle threaded conversations in an automated fashion, but it seems that over time with feature-creep we've finally gotten to the point that even using standard timestamps supported by the MediaWiki software is somehow a problem... —Locke Coletc 00:19, 1 July 2025 (UTC)[reply]
The THH:MM:SS is now fixed a template level, and is automatically converted to the WP:SIGPROB-compliant version. If you mean that MediaWiki should recognize and apply the reply link to fancy timestamps, I agree that would be great, but we have to make due with what we have. HouseBlaster (talk • he/they) 00:33, 1 July 2025 (UTC)[reply]
The text at WP:SIGPROB was added, seemingly without discussion, with this edit. It is part of a behavioral guideline, and the specific passage has, at best, a WP:SILENTCONSENSUS (absent any indication of a discussion prompting the change). As I already explained, your template with the seconds added works with reply-to. I've just double checked that the reply-to link is actually functioning by replying twice using the inline reply-tools and can vouch that it functions as expected. Is there any other reason (that has consensus) not to include the seconds if it's provided that I'm missing? —Locke Coletc 01:01, 1 July 2025 (UTC)[reply]
But before that edit, it already said Signatures should not include customization to the format of timestamps. All timestamps should adhere to the normally system generated format, which was added per community consensus (see the end of the closing summary; before arguments about venue occur, there was a neutral notification at WT:SIG). I wouldn't currently oppose allowing seconds in WP:SIGPROB (someone might find a common tool breaks with seconds included), but we should change the guideline before we modify the template. HouseBlaster (talk • he/they) 01:17, 1 July 2025 (UTC)[reply]
Should is suggestive, where Must is prescriptive. If your position is that adding seconds is my attempting to be disruptive, I'll again point out that I've seemingly been disruptive for literally years with no ill effect. Probably more importantly, I actually wonder whether this page (WP:SIGPROB) even applies to what we're discussing, as this is not a signature, this is a notification that a comment was made by an editor that it was left unsigned (with an optional date/time). The text as it stands is prescriptive in so far as user signatures are concerned, but this is not that. —Locke Coletc 02:44, 1 July 2025 (UTC)[reply]
The text at WP:SIGPROB was added, seemingly without discussion - it was discussed, the thread is Wikipedia talk:Signatures/Archive 12#timestamps and this was also discussed at Wikipedia:Administrators' noticeboard/IncidentArchive1027#InedibleHulk's signature. --Redrose64 🌹 (talk) 07:18, 1 July 2025 (UTC)[reply]
it was discussed Not the iteration that appears at WP:SIGPROB. It's also not clear to me that SIGPROB is relevant, as it deals with signatures, and this is just a template with a notification that a signature is missing. —Locke Coletc 02:40, 2 July 2025 (UTC)[reply]
Should work now; see Template:Unsigned/testcases#YYYY-MM-DDTHH:MM:SS. HouseBlaster (talk • he/they) 22:15, 30 June 2025 (UTC)[reply]