Wikipedia talk:Shortdesc helper

Latest comment: 15 days ago by Jlwoodwa in topic Jump after page load

WikiProject iconShort descriptions
WikiProject iconThis page is within the scope of WikiProject Short descriptions, a collaborative effort to improve the coverage of short descriptions in articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.

Gadget is breaking message box display on deleted pages edit

I filed a ticket. Please review at your convenience. Thank you. –Novem Linguae (talk) 03:00, 14 July 2023 (UTC)Reply

Bump. This bug is still happening for me. –Novem Linguae (talk) 23:31, 11 April 2024 (UTC)Reply

Should throw error if page is draftified/deleted during editing edit

Steps to reproduce: 1) log in to an account with page mover right, 2) install shortdesc helper gadget, 3) install User:MPGuy2824/MoveToDraft.js, 4) open a tab with an article, 5) open another tab with same article, 6) in tab 2, draftify the article (will not leave redirect since you are a page mover), 7) in first tab, click edit and add a shortdesc.

What happens? A blank page is created and a short description is added.

What should happen instead? Error is thrown, nothing is written to the now non-existent page –Novem Linguae (talk) 09:43, 27 October 2023 (UTC)Reply

This can be fixed by passing starttimestamp parameter in the API request. Currently looks like shortdesc-helper doesn't pass baserevid as well, which means intervening edits between load and save would be overwritten. – SD0001 (talk) 09:09, 28 October 2023 (UTC)Reply

Regarding abbreviation edit

Noticed that someone used this tool to abbreviate United States. With the encyclopedia being international, that does not seem to be helpful. Ensuring that country names are spelled out, which is also good description, would be important to reconsider. 143.59.142.64 (talk) 20:17, 10 December 2023 (UTC)Reply

Shortdesc helper allowing insertion of invalid invisible space characters edit

In this 2020 edit, the Shortdesc helper allowed the insertion of an invalid invisible non-breaking space character. I fixed it with this edit, replacing the character with a normal space.

If this bug is still present, it would be helpful for the gadget to replace invalid white-space characters with spaces when a short description is saved. Wikipedia:Database reports/Short descriptions containing invalid space characters is tracking these invalid characters in short descriptions. The report's population does not appear to be increasing, so maybe this problem has been fixed already. I'll look for a recent instance. – Jonesey95 (talk) 18:54, 13 January 2024 (UTC)Reply

Here's an edit from 6 January 2024 showing that this problem is still present. A couple of thinsp characters were apparently copy/pasted from the article into the SD helper text field. Let's scrub those and replace them with spaces. – Jonesey95 (talk) 19:01, 13 January 2024 (UTC)Reply
I submitted this to github as an issue, along with a suggested fix. I am not a programmer, so submitting a pull request with modified code is probably beyond my skills. Maybe Novem Linguae would be able to make this addition? – Jonesey95 (talk) 20:22, 28 February 2024 (UTC)Reply
should be easy to fix i'll try to do this soon Galobtter (talk) 07:10, 2 March 2024 (UTC)Reply
Thanks. The report was completely cleared out a few days ago, and the problem appears to still be present. No rush, since it is pretty rare and easy to fix, but a code fix would be great. – Jonesey95 (talk) 16:43, 11 April 2024 (UTC)Reply
According to this diff, the problematic characters are ascii 160 (non-breaking space). These should be converted to ascii 32 (normal space). –Novem Linguae (talk) 23:04, 11 April 2024 (UTC)Reply
Patch submitted for approval.Novem Linguae (talk) 23:25, 11 April 2024 (UTC)Reply

snd template changed to hyphen and garbage created edit

The Grey Owl article was changed by Shortdesc helper today, whereby an occurrence of the snd template delimiting the year range was changed to hyphen (diff). This change left the end year stranded, which I had to fix by hand (diff). I had just gone to the trouble of changing all hyphens in ranges to snds after having been lectured that the MOS requires this.

  • Why was this change made?
  • Who authorized this change?

Dsiedler (talk) 20:37, 13 January 2024 (UTC)Reply

That was a copy/paste error by me, I believe, not a problem with the SD helper. It should not happen again. I am 98% certain that it was not the gadget's fault. Please see WP:SDFORMAT, however: wikimarkup is not valid in short descriptions. The regular en dash character should be used in this case, as you have done. – Jonesey95 (talk) 20:40, 13 January 2024 (UTC)Reply
Thanks for the explanation! Can you then confirm that the Short Description information page takes precedence over the MOS? Dsiedler (talk) 21:36, 13 January 2024 (UTC)Reply
WP:SDFORMAT is clear: Each short description should: be written in plain text – without HTML tags, wiki markup, .... The {{snd}} tag is wiki markup; the – character is not. --Redrose64 🌹 (talk) 22:03, 13 January 2024 (UTC)Reply
I don't see a conflict with the MOS. Normal year ranges are written with unspaced en dashes, per MOS:YEARRANGE. – Jonesey95 (talk) 02:27, 14 January 2024 (UTC)Reply
Go it! I was confusing an en dash with a hyphen. You changed the year range separator to a character that looks to me, as it is displayed in the source, just like a hyphen, but is evidently an en dash. I can't figure out how to type this on a Mac, so I will use the ndash template in the rest of the article. Rereading the MOS, I see that the snd template is intended for a different use case. Dsiedler (talk) 09:38, 14 January 2024 (UTC)Reply
@Dsiedler: See Wikipedia:How to make dashes, but please note that inside a shortdesc, the methods shown in the "Templates or HTML codes" section must not be used. Personally I use the methods under "The CharInsert toolbar". --Redrose64 🌹 (talk) 11:19, 14 January 2024 (UTC)Reply
Understood, thanks! I think I'll stick with the ndash template, since I have trouble visually distinguishing between a hyphen and an en dash on my monitor.
I know this is not the right place for a rant, but <rant>I think that the MOS has made a mistake in bothering with these typographic nuances. Their purpose is to make printed books look nice and keep typesetters in a job. For a wikipedia contributor, they just create an obstacle.</rant> Dsiedler (talk) 12:29, 14 January 2024 (UTC)Reply
@Dsiedler: If you are talking about short descriptions, then please do not stick with the ndash template, or indeed use templates of any kind. They are not permitted in short descriptions, as has been pointed out above. --Redrose64 🌹 (talk) 23:43, 14 January 2024 (UTC)Reply
It seems like templates are in fact valid to use in short descriptions (though obviously links and stuff don't work). They seem to display fine as short descriptions for me. So we might to need to adjust the guidance to allow Unicode character templates. Galobtter (talk) 01:15, 15 January 2024 (UTC)Reply

Mystery short description not originally in article edit

In 2020 Singaporean general election, I added in my own short description (YY) through Shortdesc helper, but my edit summary says I changed the short description from XX to YY, even though XX was never present in the article in the first place (originally it was set to "none"). Where does the XX short description come from? Wikidata? JaventheAldericky (talk) 19:31, 21 January 2024 (UTC)Reply

Yes. If we don't have a shortdesc but there is one at Wikidata, the Wikidata short desc is used, so if you set up a local one that overrides the Wikidata one. --Redrose64 🌹 (talk) 21:33, 21 January 2024 (UTC)Reply

Jump after page load edit

With this gadget enabled, whenever I load a page, its content jumps downward a few seconds later. This is because the shortdesc is inserted into the page when the shortdesc itself has loaded, which requires making space for it. This is extremely annoying. Is anyone else having this issue? Does it seem like it would be easy to fix? jlwoodwa (talk) 02:31, 21 March 2024 (UTC)Reply

This happens with all javascript elements, in my experience. I have a bunch of gadgets and scripts installed, and page elements jump around like baby kangaroos while the page is loading. – Jonesey95 (talk) 03:47, 21 March 2024 (UTC)Reply
This is fixable with thr "hidden css peer gadget" technique if someone wants to code it up. See MediaWiki:Gadget-Twinkle-pagestyles.css for an example. –Novem Linguae (talk) 08:43, 21 March 2024 (UTC)Reply
Hmm, this gadget already uses the "hidden css peer gadget" technique mentioned above. It's possible the hidden css peer gadget is broken and needs fixing, or that you just have other gadgets and user scripts pushing things around in the same area. Is anyone else (who has very little installed except Shortdesc-helper) having this issue? –Novem Linguae (talk) 23:29, 11 April 2024 (UTC)Reply
That doesn't seem to be available on Monobook. jlwoodwa (talk) 03:08, 12 April 2024 (UTC)Reply

Comma in comment edit

I couldn't find anything on the topic, so I figured I'd ask: Is there a reason for the comma in the comment? Currently shortdesc helper creates a comment like this (sorry for the german language example, but you should get the idea):

‎Beschreibung für [de] hinzugefügt: Gebäude in St. Gallen, (Shortdesc helper)

With a comma right after the new description. Which to me seems more confusing (Did I accidently place a comma?) then helpfull. And - at least in German, I assume English is the same - in front of brackets it's even wrong. Is there a case I miss when they are needed? Windharp (talk) 08:45, 26 March 2024 (UTC)Reply

A diff would be helpful for debugging. –Novem Linguae (talk) 14:39, 26 March 2024 (UTC)Reply
Sorry, here you are. Windharp (talk) 15:23, 26 March 2024 (UTC)Reply
Good info there. So this is just the edit summary, not the wikicode. And it is probably Wikidata only. –Novem Linguae (talk) 16:51, 26 March 2024 (UTC)Reply

Extremely specific issue on auto-generated "none"s edit

I opened an issue on github, but I am assuming that the github is not very active since there haven't been any new changes in six months, so here's a very minor technical issue that stumped me for a while. In policy w/ WP:SDNONE, many articles do not qualify to have proper short descriptions. However, adding { {short description|none} } to a template does not register on the editor, making it seem as if it has no short description instead of a "none" short description. Article that looks like it has no short description, [1] except it has an infobox that does, [2] and search results show it has a short description. [3] -1ctinus📝🗨 00:41, 8 April 2024 (UTC)Reply

To be clear, it appears that everything is working properly from a Wikipedia standpoint, but the SD gadget is showing the Wikidata description instead of showing the correct "This page intentionally has no description." Is that the bug? – Jonesey95 (talk) 15:58, 8 April 2024 (UTC)Reply
exactly. -1ctinus📝🗨 16:46, 8 April 2024 (UTC)Reply
this was discussed before at Wikipedia_talk:Shortdesc_helper/Archive_1#Auto_short_descriptions_with_a_value_of_"none". Changing what the short description template outputs might be needed. Galobtter (talk) 16:55, 8 April 2024 (UTC)Reply
Thanks. I'll keep the GitHub issue open, though.
However, it appears that the gadget has also changed since 2022. From the talk page giving a reason why it doesn't do that,

It would help if the SD helper could detect that the page would have the SD set (to none or otherwise) by a template, but that would involve an additional API call to check the evaluated output of the page as well as a check of the page source

...doesn't the gadget already do that already? -1ctinus📝🗨 17:16, 8 April 2024 (UTC)Reply