Jump to content

Wikipedia:Village pump (technical)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 2001:b07:6442:8903:8d3c:c5da:57a1:9f2f (talk) at 14:56, 18 December 2018 (template fix request: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

 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).

Newcomers to the technical village pump are encouraged to read these guidelines prior to posting here. 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.


I am an active anti-vandalism editor using the old school method. When I rollback and go to warn the User, the User TalkPage automatically launches in edit source mode and not the static (read) mode I am used to. This also happens when I click on non-existent pages/redlinks. Any ideas as to what is going on? Do I have something accidentally selected in my preferences or is this a bug? I am primarily an English language Wikipedia user, it is hard to tell but it appears that this does not happen when I am on the German Wikipedia or Wikimedia Commons. I have posted this issue here, the Help Desk, and Phabricator before but never received help/a solution. This might seem like a minor inconvenience, but adds major time in fighting vandalism for me. Thanks in advance for the assistance. Please ping me, as I do not watch posts. Classicwiki (talk) If you reply here, please ping me. 21:44, 16 November 2018 (UTC)[reply]

@Classicwiki: You could add the following to your common.js to disable the auto-edit on redlink annoyance:
(function() {
    var len = document.links.length;
    for (var i = 0; i < len; ++i) {
        var l = document.links[i];
        if (l.href.indexOf('&redlink=1') > -1) {
            l.href = l.href.replace('&action=edit', '');
        }
    }
})();
Or as a one-liner, for those who like a more compact version:
(function(){var len=document.links.length;for(var i=0;i<len;++i){var l=document.links[i];if(l.href.indexOf('&redlink=1')>-1){l.href=l.href.replace('&action=edit','');}}})();
I had to dig through several VP archives when I wanted to find this a month ago. Now I get to pass it on. — AfroThundr (u · t · c) 05:10, 19 November 2018 (UTC)[reply]
AfroThundr3007730, thank you so much for replying and trying to find a solution. Unfortunately, it did not work. I inserted the code into my [[1]]. It still launches into auto edit mode for rollbacks and redlinks. Classicwiki (talk) If you reply here, please ping me. 17:23, 19 November 2018 (UTC)[reply]
@Classicwiki: That's odd, assuming you've bypassed your browser cache, it should've worked. Are you getting any errors in the browser console? — AfroThundr (u · t · c) 20:40, 19 November 2018 (UTC)[reply]
@AfroThundr3007730: that javascript might be executing too early, before the page contents are loaded (thus no redlinks to find yet). It might be better to wrap it in a mw.hook that'll force it to wait until the page is ready. @Classicwiki: if the above code isn't working for you, try replacing it with this (reformatted to be a bit more concise/efficient):
mw.hook("wikipage.content").add(function() {
  $("a.new").each(function() 
  {
    this.href = this.href.replace("&action=edit","");
  });
});
HTH, Writ Keeper  21:26, 19 November 2018 (UTC)[reply]
Oh duh, I hadn't even though about that. In my common.js that line comes after another function waiting on mediawiki.util, which is probably why I haven't seen this race condition. This is why we pay you the big bucks. Also I was avoiding using the a.new selector, which only seems to occur in the article body, because I also wanted to target the namespace tabs and any other interface element that could result in the editor spawning (with the sole exception of the edit tab). Your version is a lot more compact though. One of these days I need to learn jQuery and the MediaWiki JS properly. — AfroThundr (u · t · c) 00:06, 20 November 2018 (UTC)[reply]


Writ Keeper, that works for the redlinks, unfortunately it does not work for the rollbacks. Still launches to edit mode of User:Talk page during rollbacks. Any idea about that? Classicwiki (talk) If you reply here, please ping me. 01:05, 20 November 2018 (UTC)[reply]
Classicwiki, that's because the above JS is only modifying links with the new CSS class, which only occurs in the article or page body (see my comment above). The redlinks that may appear elsewhere in the interface are not affected by that snippet. My version modifies all redlinks, regardless of class, but as Writ Keeper mentioned, it needs to wait until the page loads first, which is why you were seeing no effect. Combining both of the above snippets should look something like this:
mw.hook('wikipage.content').add(function() {
    $('a').each(function() {
        if (this.href.indexOf('&redlink=1') > -1) {
            this.href = this.href.replace('&action=edit', '');
        };
    });
});
The if condition is necessary to only target the redlinks and nothing else (e.g. the Edit button). Note: I'm not a JavaScript guru. WritKeeper, feel free to jump in if I'm off. — AfroThundr (u · t · c) 20:32, 20 November 2018 (UTC)[reply]
I don't think that's what Classicwiki is talking about...I think I need more information about what you mean. Can you describe exactly what steps you're talking about when rollback sends you to edit mode? Like, what page do you click on rollback from, which rollback link you click on, any pages or clicks in between there and the edit screen. Writ Keeper  20:52, 20 November 2018 (UTC)[reply]
Example diff showing both Twinkle (top line) and rollback (third line)
WritKeeper & AfroThundr3007730 Thanks again for taking the time to troubleshoot with me. Sorry if I wasn't being clear. When I hit the Twinkle rollback(AGF)/rollback/rollback(vandal) button (shown in the image above), two things happen. First, the page reverts the edit back and reloads; second, the offending user's talk page opens in a new tab. The user's talk page now automatically opens in edit mode, instead of read mode. This didn't use to be the case for me. It adds time in issuing warning for the edits because it slows my computer down to open in straight edit mode. Looking for a way to prevent that. I scanned my Twinkle settings, can't seem to find the offending code. Hope that clarifies things? Thanks again for helping! Classicwiki (talk) If you reply here, please ping me. 05:13, 21 November 2018 (UTC)[reply]
@Classicwiki: Ok, I see what you're talking about now. Those links are controlled by Twinkle, and don't have an edit parameter in them, they just control the rollback part of the workflow. After that, Twinkle pops a new tab so you can leave the user a message. Here is the link generated after I reverted some edits in the sandbox:
https://en.wikipedia.org/w/index.php?title=User_talk:174.63.196.239&action=edit&preview=yes&vanarticle=Wikipedia%3ASandbox&vanarticlerevid=870048912&vanarticlegoodrevid=870048366&type=norm&count=3.
If you were to use the "warn" button to leave a template, they would auto-populate all the relevant info (such as target article) in the template from those URL parameters. You could stop the user talk page from opening completely by unchecking those options in your Twinkle rollback preferences, but I'm not sure how to only stop Twinkle from opening the user's talk page in edit mode (short of forking the tool). This doesn't behave the same as originally intended with the new Wikitext editor now being the default. — AfroThundr (u · t · c) 03:58, 22 November 2018 (UTC)[reply]
AfroThundr3007730, yep closer to what I was talking about. Looking for a way to remove &action=edit&preview=yes section of the link you posted above so that it doesn't launch automatically load in edit mode. 05:40, 22 November 2018 (UTC)
Writ Keeper, any ideas? Best, Classicwiki (talk) If you reply here, please ping me. 15:29, 25 November 2018 (UTC)[reply]
Classicwiki, would you mind trying something? Go to Special:Preferences#mw-prefsection-betafeatures and turn off the "New wikitext mode" (which hasn't been "new" for more than a year now; someday, we've got to get that moved over to the regular prefs). Try that out for a while, and see if turning that off solves your problem. Whatamidoing (WMF) (talk) 00:01, 28 November 2018 (UTC)[reply]
Whatamidoing (WMF), thank you! I had done this before and hit save, which showed displayed a pop-up acknowledging my change in preferences. However, it would actually still have it on and I had not noticed. I had to uncheck "Automatically enable all new beta features" as well. This is saving me so much time in fighting vandalism. Thanks so much! Classicwiki (talk) If you reply here, please ping me. 04:56, 28 November 2018 (UTC)[reply]
Although, I wish I could use the wikitext editor simultaneously. Any suggestions, Whatamidoing (WMF)? Classicwiki (talk) If you reply here, please ping me. 18:38, 28 November 2018 (UTC)[reply]
I think the answer is "wait until the bug is fixed". I couldn't find the original Phabricator ticket, so I've filed another: phab:T211379. It'll probably get merged into the original, but in the meantime, the devs should see it and be reminded that this needs to get fixed. Whatamidoing (WMF) (talk) 21:04, 6 December 2018 (UTC)[reply]
Whatamidoing (WMF), Original Phabricator ticket was this: phab:T195914. I just made the original a subtask of yours. To explain a little further, having to switch between turning VE source editing and an older editor is burdensome for me, I don't know if others feel the same way. Often in anti-vandalism patrolling you stumble upon new users who do not cite their sources or make a simple mistake in a positive contribution to the project. I could revert that user for lacking citations or any other guideline they did not adhere to, but I fear that it will scare away a clearly good faith editor. VE's automatic citation tool is vastly superior. I am less inclined to assist problematic edits or I can not attend to as many as I would like, if I have to switch back and forth. Auto-opening in source mode not only slows down the computer because of VE, but it can make it more difficult to see what level of warning a vandal has received on their talk page, which ultimately slows down anti-vandalism patrolling. I will bring the same issue up over on phabricator. Thanks for bringing it up there! Best, Classicwiki (talk) If you reply here, please ping me. 16:12, 10 December 2018 (UTC)[reply]

Visible ndash

How come that 839&ndash, 841 is visible in Lajos Winkler#Further reading, even though the source text looks okay to me? --Leyo 22:33, 1 December 2018 (UTC)[reply]

WT:CS1#ndash entity in pages parameter. --Izno (talk) 22:46, 1 December 2018 (UTC)[reply]
I don't know what to take from that, but Template:Cite journal#COinS says not to use &ndash; there, so I wouldn't use it there. ―Mandruss  22:50, 1 December 2018 (UTC)[reply]
Well, what about fixing all such uses by a bot? --Leyo 23:31, 2 December 2018 (UTC)[reply]
The fix is known and working in the sandbox version, we just need an admin to deploy it. After 2+ months. Headbomb {t · c · p · b} 21:11, 6 December 2018 (UTC)[reply]
What exactly needs to be done? --Leyo 08:56, 7 December 2018 (UTC)[reply]
Headbomb, links please ? Then people can maybe help in achieving that. ;) —TheDJ (talkcontribs) —TheDJ (talkcontribs) 14:51, 7 December 2018 (UTC)[reply]
Ask Trappist the monk (talk · contribs), he's the one that fixed things in the sandboxes. He could deploy the fix, it's tested, and knows what needs to be done. Although don't get your hopes up, he's typically not very responsive about such requests. Headbomb {t · c · p · b} 14:57, 7 December 2018 (UTC)[reply]
I think that it's this edit. The thing about Module:Citation/CS1 is that Trappist the monk doesn't put updates live straight away (except fixes for breaking changes), they go through in bundles; and two months delay is nothing unusual. --Redrose64 🌹 (talk) 20:15, 7 December 2018 (UTC)[reply]
"except fixes for breaking changes" evidently not. Headbomb {t · c · p · b} 12:51, 10 December 2018 (UTC)[reply]
@Headbomb: You are more than capable of starting a discussion to deploy that exact fix. --Izno (talk) 00:08, 11 December 2018 (UTC)[reply]
@Izno: I did that... 2 months ago. Headbomb {t · c · p · b} 00:37, 11 December 2018 (UTC)[reply]

Sometimes WYSIWYG editor doesn't open

Trying to edit article's section sometimes gives progress bar that stucks at some point. At the moment I cannot edit page ru/Си_(язык_программирования). It always stucks editing ″Динамически выделяемая память″ subsection. I tried to refresh page but it doesn't help. I assume it caused by huge page size. Editing subsection in code mode works fine. D6194c-1cc (talk) 06:18, 9 December 2018 (UTC)[reply]

What progress bar? I never get one when editing. I don't see the point either - how would it know how much I had edited? --Redrose64 🌹 (talk) 08:46, 9 December 2018 (UTC)[reply]
I assume the editor is talking about the progress bar as a large page is processed for visual edit mode when one clicks the "edit" link. Galobtter (pingó mió) 08:50, 9 December 2018 (UTC)[reply]
It appears to be working for me. Are there any errors in your javascript console? --AntiCompositeNumber (talk) 15:52, 10 December 2018 (UTC)[reply]

More populated category redirects

The following category redirects are proving awkward to fix:

Is anyone able to fix the problems or at least identify what needs adjusting? Timrollpickering 13:31, 9 December 2018 (UTC)[reply]

The user page in the final category assigns its category within User:Sceptre/modules/boxes.css. It's full-protected. I fixed the other pages in that category. – Jonesey95 (talk) 14:26, 9 December 2018 (UTC)[reply]
Category:WikiProject Articles for creation participants is now empty. — xaosflux Talk 14:41, 9 December 2018 (UTC)[reply]
Not sure what was wrong with the first one but deletion and recreation solved it. I'll try the others. Timrollpickering 16:31, 9 December 2018 (UTC)[reply]
Hmm - adding and removing my sandbox ultimately did the trick. Odd. Timrollpickering 16:36, 9 December 2018 (UTC)[reply]
Yes, sometimes it seems you need to make such "WP:Null edits" to clear a category, if somehow the "job queue" missed them. wbm1058 (talk) 16:42, 9 December 2018 (UTC)[reply]

Two other redirects that have piled up. These language categories are a pain because of the convoluted generation when the language is a redirect to an alternate name.

Timrollpickering 15:01, 10 December 2018 (UTC)[reply]

Fixed the first one. – Jonesey95 (talk) 15:43, 10 December 2018 (UTC)[reply]
For the second one, I don't understand why the category redirect goes in the direction it does. The en.WP name of the language appears to be "Mandarin Chinese", per the article header and this naming convention page. – Jonesey95 (talk) 15:46, 10 December 2018 (UTC)[reply]
Your edit on the first one was reverted. On the second, it got turned into a redirect back in July 2017 - it's probably best to undo this for now. Timrollpickering 11:59, 11 December 2018 (UTC)[reply]
My first edit was technically reverted, but the editor who did so actually turned my deletion into a commented section of text, achieving the same effect that I achieved. I agree with your fix for the Mandarin Chinese category. – Jonesey95 (talk) 13:47, 11 December 2018 (UTC)[reply]

Further cases:

Timrollpickering (Talk) 14:41, 12 December 2018 (UTC)[reply]

It's not Template:Babel but the babel extension which needs these last three categories. They are part of a scheme that is intended to be the same across all Wikimedia wikis, as I have explained (several times) before, sometimes on this page (or another pump), sometimes at a CFD, but more often at Template talk:Babel. --Redrose64 🌹 (talk) 16:47, 12 December 2018 (UTC)[reply]
Pinging Trappist the monk for Category:Articles containing Baruya-language text. This appears to be caused by Module:Language/data/ISO 639-3, but I don't know if reversing the order of the byr language names is the right fix. – Jonesey95 (talk) 02:42, 13 December 2018 (UTC)[reply]
The correct place to override ISO/IANA names and codes is Module:Lang/data because the ISO/IANA modules are periodically updated by script from data retrieved from the ISO custodians and from IANA; reapplying all of the necessary fixes to those data would be a monstrous pain. I have pointed byr so that {{lang|byr|...}} categorizes to Category:Articles containing Yipma-language text. Karuka may now require editing but I am unqualified to do that. Similarly, Yipma language could use a brush-up.
Trappist the monk (talk) 11:35, 13 December 2018 (UTC)[reply]

I've listed the User cats at Wikipedia:Deletion review/Log/2018 December 13#Category:User simple-N to try to sort out the problem. Timrollpickering (Talk) 14:36, 13 December 2018 (UTC)[reply]

Time-sensititive templates

How to make a template sensitive to the time since it was added to a page? I mean: the template should show some content when originally added to the page, but the contents should change after n days. SD0001 (talk) 18:26, 9 December 2018 (UTC)[reply]

A template has no way of telling how long it has been on a page. It would need a parameter telling when it was added, or when it should display differently like {{Show by date}}. Editors could add the date, or the template documentation could say to use substitution with the template using code for the current day to save the time it was substituted in a parameter for another template. See Category:Date mathematics templates, mw:Help:Magic words#Date and time, mw:Help:Extension:ParserFunctions##time for some available features. PrimeHunter (talk) 19:34, 9 December 2018 (UTC)[reply]
@SD0001: Check also subcategories (Category:Date-computing_templates_based_on_current_time - Show by (date), Category:Date-computing templates‎ - After templates might be what you're looking for, H:SUBST might be needed for passing dates). --MarMi wiki (talk) 19:37, 9 December 2018 (UTC)[reply]
You might also check out the work done in Template:Db-g13. I have an inkling what this may be for... ~ Amory (utc) 01:52, 10 December 2018 (UTC)[reply]
This was for {{Old prod full}}, yeah ... but not on the top of my to-do list though ... SD0001 (talk) 21:28, 11 December 2018 (UTC)[reply]

Dark theme and math readability

Hello. I would like to make a suggestion for readability.

As Windows 10 has just implemented a dark mode. the formulas and scientific equations for anything related to maths or science come out in black. this is very hard to read, since it is a black text on a dark grey back ground. Can you please help.

Thanks — Preceding unsigned comment added by 2A02:C7F:2C68:2100:F903:6BE4:4DEB:AA6 (talk) 18:40, 9 December 2018 (UTC)[reply]

Registered users have the option "Use a black background with green text" at Special:Preferences#mw-prefsection-gadgets. Maybe this gadget works better with the dark mode. The gadget uses MediaWiki:Gadget-Blackskin.css which includes this code:
/* Fix background of Tex images, which are black on transparent. */
.mw-body img.mwe-math-fallback-image-inline {
    background-color: #fff;
    filter:invert(100%) hue-rotate(180deg);
    border:none;
}
You can test the gadget without an account by adding ?withCSS=MediaWiki:Gadget-Blackskin.css to a url, e.g. https://en.wikipedia.org/wiki/Help:Displaying_a_formula?withCSS=MediaWiki:Gadget-Blackskin.css. If you create an account but don't want the gadget then you can also try to just save the above code in your CSS. PrimeHunter (talk) 19:15, 9 December 2018 (UTC)[reply]


ADDITIONAL: Does not work entirely with the Dark Mode Chrome extension. Graphics appear green on white. — Preceding unsigned comment added by 2A02:C7F:2C68:2100:F903:6BE4:4DEB:AA6 (talk) 21:09, 9 December 2018 (UTC)[reply]

This is a known issue, cf. T111222. This snippet might be useful. Pkra (talk) 20:51, 10 December 2018 (UTC)[reply]

Is there a reason why, if you go to User:Headbomb, you don't get interwiki links to my other wikipedia accounts (e.g. fr:Utilisateur:Headbomb?) in the sidebar? (Same for say User talk:Headbomb having interwikilinks to fr:Discussion utilisateur:Headbomb)? That seems like it would be a useful feature. Headbomb {t · c · p · b} 12:50, 10 December 2018 (UTC)[reply]

Because you did not add the links. Add [[fr:Utilisateur:Headbomb]] (or even [[fr:User:Headbomb]]) on your userpage, the sidebar link will appear. Do the same on the talkpage. –Ammarpad (talk) 14:56, 10 December 2018 (UTC)[reply]
Yeah, but the question is "why should I be doing this in the first place?". We have global accounts now. This should be handled by the system automatically, either via wikidata, or via some other thing. Headbomb {t · c · p · b} 15:18, 10 December 2018 (UTC)[reply]
And "why do I need these links" - is because there are no automated integrations (e.g. on wikidata) between accounts (WMF users are currently out of scope of wikidata). — xaosflux Talk 15:19, 10 December 2018 (UTC)[reply]
Also, @Headbomb: would you want 116 links on your page? I wouldn't want 736 on mine! — xaosflux Talk 15:22, 10 December 2018 (UTC)[reply]
More response to your second question: even in mainspace (the main reason for interwiki link), articles are not linked automatically. All interwikis on wikidata are either added by human or bot configured by human to do so. The software has no such configuration to automatically link pages across wikis. But you can request so on phabricator and likely consensus first. –Ammarpad (talk) 15:40, 10 December 2018 (UTC)[reply]
See wikidata:Wikidata:Requests for comment/Inclusion of non-article pages#User pages and wikidata:Wikidata:Project chat/Archive/2013/03#Why an Exception on User pages? for old discussions about allowing Wikidata items for user pages. PrimeHunter (talk) 20:04, 10 December 2018 (UTC)[reply]

17:33, 10 December 2018 (UTC)

has this been discussed somewhere? in particular, it has been brought to my attention that [[A|<templatestyles src="smallcaps/styles.css"/><span class="smallcaps">a</span>]] doesn't work, while <templatestyles src="smallcaps/styles.css"/>[[A|<span class="smallcaps">a</span>]] does work, which means that {{smallcaps}} won't work for link text. thank you. Frietjes (talk) 18:08, 10 December 2018 (UTC)[reply]

@TheDJ and Izno: Frietjes (talk) 21:14, 10 December 2018 (UTC)[reply]
okay, found phab:T200704. is this going to be fixed, or do we need to stop using templatestyles for inline text styling? Frietjes (talk) 21:19, 10 December 2018 (UTC)[reply]
@Frietjes: Whether it's changed or not, this can be worked around (as you identified--move the template outside the link). I don't know if it will be fixed. --Izno (talk) 00:13, 11 December 2018 (UTC)[reply]
Frietjes I'd consider small caps the template version of an HTML element. It has no meaning, no context etc. As such they are basically inline styles yes. I'd vote to not use template styles for now, for such templates... —TheDJ (talkcontribs) 08:59, 11 December 2018 (UTC)[reply]
Izno, what is the fix for 6th Armoured Division (South Africa) which uses [[Ultra|{{smallcaps|Ultra}} intercepts]]? Frietjes (talk) 13:44, 11 December 2018 (UTC)[reply]
@Frietjes: Not to style something with small caps text per MOS:SMALLCAPS (see the article in question, Ultra, which has no such curious styling). --Izno (talk) 17:34, 11 December 2018 (UTC)[reply]
Izno, that was just one of 40 or so examples that I found that cannot be fixed by moving the {{smallcaps}} outside of the link. others include Pseudoephedrine, Monosaccharide, Hexose, Esperanto orthography, S-type star, ... TheDJ's suggestion to go back to the non-templatestyles version seems to be the best idea for the near future. Frietjes (talk) 17:47, 11 December 2018 (UTC)[reply]
Of those, I see one article with a good use of the template (that's the article on orthography), but even there the specific link to the person or thing in question could be removed without loss given the context. I disagree entirely with the suggestion as a result. --Izno (talk) 17:59, 11 December 2018 (UTC)[reply]

Categorization that will not update

Template:Taxon italics has been put into two categories. If you go look at them (e.g. Category:Scientific name templates), the template doesn't appear in the category listings, but the categories do appear on the template page. These problems usually seem to go away after a few hours, but in this case it's been days. Is there a) a way to force it to update, and b) a way to prevent this from happening? Logging in and logging out have no effect on it, nor does removing and re-adding the categories, making tiny edits to the template and category pages then re-saving, nor purging the category and the template (and its documentation). It's just stuck.  — SMcCandlish ¢ 😼  09:28, 12 December 2018 (UTC)[reply]

SMcCandlish, a null edit of Template:Taxon italics fixed it. Galobtter (pingó mió) 09:38, 12 December 2018 (UTC)[reply]
Yes, you have to edit the page itself to force an immediate update of link tables for the page. A null edit works but not a purge. SMcCandlish only edited Template:Taxon italics/doc where the category is transcluded from. PrimeHunter (talk) 09:43, 12 December 2018 (UTC)[reply]
Fargh. It figures that of every step I would think to try I somehow forgot one and it was the one that would actually have worked. Thanks for the info.  :-)  — SMcCandlish ¢ 😼  19:15, 12 December 2018 (UTC)[reply]

Llanelli - inconsistency between watchlist and page history

Further to Wikipedia:Village pump (technical)/Archive 170#SECR N class - inconsistency between watchlist and page history, this edit is not showing in my watchlist, but its revert two minutes later is shown. At Preferences → Watchlist, "Expand watchlist to show all changes, not just the most recent" is enabled, so both should be listed. Unlike the previous issue, the page has not been deleted and undeleted in between. --Redrose64 🌹 (talk) 18:25, 12 December 2018 (UTC)[reply]

I am able to reproduce it and also found the same thing on mobile device where option to show only the most recent changes doesn't even exist. Opened bug report. –Ammarpad (talk) 06:03, 13 December 2018 (UTC)[reply]

Currently disabled: two issues

About 4:25 pm EST, which is 21:25 UTC, today (December 12), I opened Wikipedia:Reference desk/Humanities, and saw at the top the box that begins:

Editing of this page by new or unregistered users is currently disabled until December 12, 2018 at 8:09 pm UTC

First issue: I believe it is not considered correct practice to write UTC times using the 12-hour clock. WP:MOSNUM#Times of day is silent as to this detail, but whoever wrote the the first example under the subheading Time zones seems to believe it. Could the template that generates this message be changed to display the time, in this case, as 20:09, the same that Wikipedia would use in most other places?

Second issue: I had something to add to an existing thread, and since I knew the semi-protection was due to come off this afternoon, I was just waiting until then. I knew that if I clicked "View source" it would open the page for writing, but I wanted to edit the individual section, rather than the whole page. So I first loaded https://en.wikipedia.org/w/index.php?title=Wikipedia:Reference_desk/Humanities&action=purge in order to purge the cache.

But when I clicked on Yes and the page reloaded, it still said

Editing of this page by new or unregistered users is currently disabled until December 12, 2018 at 8:09 pm UTC

So I purged a second time, and this time the notice went away and I could start a section edit. (And then, on rereading what other contributors had posted, I realized I had nothing to add to what they'd said after all. Oh well, never mind.)

So why didn't the first purge do the job? --76.69.46.228 (talk) 21:48, 12 December 2018 (UTC)[reply]

My guess would be that you did the first purge after 2018-12-12T20:09:00Z but before the protection actually expired at 2018-12-12T20:09:27Z (see the log data from the API, which includes the expiry time to the second). Anomie 03:03, 13 December 2018 (UTC)[reply]
Good guess, but no; I did say it was about 21:25 that day. --76.69.46.228 (talk) 08:11, 14 December 2018 (UTC)[reply]

And why a CAPTCHA?

When posting the above item, I had to answer a CAPTCHA. I wouldn't be surprised by that if the URL I cited had been to an outside site, but this one was to Wikipedia itself, and I thought those were exempted. What happened? --76.69.46.228 (talk) 21:48, 12 December 2018 (UTC)[reply]

That link should be exempt per MediaWiki:Captcha-addurl-whitelist - can you try this in a sandbox and let us know if it is still an issue? — xaosflux Talk 21:59, 12 December 2018 (UTC)[reply]
Looks like gerrit:333365 introduced a bug in SimpleCaptcha::loadText() where passing false for $section (as the calling code does) would start loading section 0 instead of using the whole page. That means the $wgCaptchaRegex check where it tries to count only added instances of the regex will not work right because the $oldtext contains only the lead section while $newtext contains the whole page content. Anomie 03:03, 13 December 2018 (UTC)[reply]
Thanks for identifying the problem. Say, I needed a CAPTCHA to post this followup too. --76.69.46.228 (talk) 08:12, 14 December 2018 (UTC)[reply]

Taxonbar throwing Lua error

I am seeing a red error message: "Lua error in Module:Taxonbar at line 549: attempt to call field 'italicizeTaxonName' (a nil value)." on pages such as Manoba greenwoodi. William Avery (talk) 13:31, 13 December 2018 (UTC)[reply]

A null edit fixed it. Looks like an error that got fixed but still present on some pages due to cacheing. Galobtter (pingó mió) 13:39, 13 December 2018 (UTC)[reply]
Odd. Thanks. William Avery (talk) 14:16, 13 December 2018 (UTC)[reply]

How do I add an option for a second image in an infobox template?

Hi all

I'm starting to learn more about infobox templates and I'd like to know how I can modify an infobox template to allow a second image, I've read the instructions and looked at examples but I'm not sure and don't want to break anything. Do I simply rename the fields or is there more to it? As an example if I wanted to add an option to add a second image to Template:Infobox dog breed to allow the article to show things like sexual dimorphism, what would I change?

Thanks

John Cummings (talk) 14:51, 13 December 2018 (UTC)[reply]

The meta template Template:Infobox allows one to add more than one image. Instructions are in Template:Infobox#Illustration_images. Ruslik_Zero 20:21, 13 December 2018 (UTC)[reply]
For an example of how it works in practice, see Template:Infobox school. – Jonesey95 (talk) 02:01, 14 December 2018 (UTC)[reply]
Thanks @Ruslik0: and @Jonesey95:, I've read this several times and still don't understand, could one of you add a second image option to Template:Infobox dog breed for me please? Its a widely used template. I can ask one of my more technical friends to show me in person some time. Thanks, John Cummings (talk) 09:35, 14 December 2018 (UTC)[reply]
I am just passing by and saw your request. There are two sides to template editing- the first is working with some lovely markup code, but the second and the more difficult is to get agreement for the need to change. That is really tough. Start here Template talk:Infobox dog breed and you will see comments going back to 2005- there are folk who believe that even stable Infoboxes should be simplified, and years later you need to fight your corner. So the simple workaround if you really need multiple images is to take your two pictures and combine them on you laptop (Gimp/Inkscape/apple photo editor/ microsoft/adobe whatever). You now have just one image- and the issue has gone away. Good luck.ClemRutter (talk) 11:31, 14 December 2018 (UTC)[reply]
One can use {{Photomontage}} to display multiple images in an infobox. Galobtter (pingó mió) 11:38, 14 December 2018 (UTC)[reply]
John Cummings,  Done See [5]; Copying over and renaming the fields is indeed how you do it. Galobtter (pingó mió) 11:49, 14 December 2018 (UTC)[reply]
(edit conflict) I added the option for image2/alt2/caption2/etc. in the template's sandbox and added a second image in the testcases page, which is a good way to have something to talk about when you start a discussion on the talk page. – Jonesey95 (talk) 11:59, 14 December 2018 (UTC)[reply]
Well, I did it BOLDly since the template isn't template-protected. Galobtter (pingó mió) 12:09, 14 December 2018 (UTC)[reply]

Thanks very much @Galobtter: and @Jonesey95:, it looks like its all done and works. Thanks again, John Cummings (talk) 13:57, 14 December 2018 (UTC)[reply]

Template in a mess

Template:Category U.S. State elections by year underpins the US state election category tree which is currently being renamed from e.g. Category:Wyoming elections, 2018 to Category:2018 Wyoming elections. However changes to the template are producing very odd categories - e.g. Category:Wyom elections in the United States by state, Category:Ing electi elections by year and Category:Wyom in ing electi.

Does anyone know how to untangle all this to generate the new category form? Timrollpickering (Talk) 16:46, 13 December 2018 (UTC)[reply]

The template has already been updated but it is still used on category pages with old names. So, the result is strange, of course. Ruslik_Zero 20:18, 13 December 2018 (UTC)[reply]
The template has been updated to use new naming scheme while the category is still using the old naming scheme resulting in conflicting arrangement. That's what generates the weird name. It will be okay when Category:Wyoming elections, 2018 is actually moved to Category:2018 Wyoming elections. –Ammarpad (talk) 21:13, 13 December 2018 (UTC)[reply]

"New contribution"

When I select "Contributions" from the menu bar, suddenly I'm getting the title "New contribution" [sic] coming up at the top of the page instead of the usual "User contributions". Is this intentional? Deb (talk) 18:44, 13 December 2018 (UTC)[reply]

@Deb: That is in reference to the "New page" / "Upload media" / "Translation" buttons. That and the "New contribution" heading have apparently been there since 2015, going by phab:T96170. Personally I don't find these buttons to be that helpful, especially since "New page" goes to Special:WantedPages (which as currently implemented isn't very useful on this wiki). Furthermore, there's no CSS class or ID applied to the element that contain both the "New contribution" heading and the buttons, so we can't easily hide it, if we wanted to. MusikAnimal talk 18:54, 13 December 2018 (UTC)[reply]
@MusikAnimal: what page are these on? I don't see them at this link and Special:Contributions looks normal to me? — xaosflux Talk 18:58, 13 December 2018 (UTC)[reply]
That's what puzzling me. I've never seen this before today. When I try to look at my contributions, the normal heading, "User contributions", flashes up for a split second, then changes to "New contribution" [sic]. The buttons you mention are called "Contributions" / "Translations" / "Uploaded media". How can I get rid of this misleading heading? Deb (talk) 19:04, 13 December 2018 (UTC)[reply]
To see this you need to enable Content Translation in the Beta Features of your preferences, and vice versa to hide it. It's just possible that this title is determined by what's written at MediaWiki:Cx-contributions-new-contributions. -- zzuuzz (talk) 19:13, 13 December 2018 (UTC)[reply]
@Deb: try turning off CXT at Special:Preferences#mw-prefsection-betafeatures. — xaosflux Talk 19:16, 13 December 2018 (UTC)[reply]
Thanks so much. That worked. I won't attempt to understand why. Deb (talk) 19:19, 13 December 2018 (UTC)[reply]
Great, I didn't even realize this was a beta feature (and hence can be disabled)! If it is not already clear, xaosflux, the "New contribution" thingy is only shown when viewing your own contributions. MusikAnimal talk 19:31, 13 December 2018 (UTC)[reply]

Seeing wrong image

If I look at The Plague I see a book cover, if I click it to go to the image page at File:La Peste.jpg, I get a commons image! and the non-free stuff for the book cover. The commons image is at c:File:La scene de la peste Grevin.jpg - jumps them from a redirect at c:File:La Peste.jpg. I tried a second browser (in case Firefox was playing up, but got the same). Anyone else see this issue? Ronhjones  (Talk) 17:23, 14 December 2018 (UTC)[reply]

Yes. Purging locally didn't fix it. Maybe try deleting and restoring? —Cryptic 17:42, 14 December 2018 (UTC)[reply]
It is possible that this page move and redirect creation on 2 December 2018 by Jo-Jo Eumerus has something to do with it, but the ways of files on Commons are a bit of a mystery to me. – Jonesey95 (talk) 17:49, 14 December 2018 (UTC)[reply]
When a local file exists under the same name as a redirect on Commons, the Commons redirect overrides the local file. The normal solution is to move the local file to another name, typically un such situations the file name is not really a good one. Jo-Jo Eumerus (talk, contributions) 17:51, 14 December 2018 (UTC)[reply]
I moved the file. Galobtter (pingó mió) 18:10, 14 December 2018 (UTC)[reply]
@Jo-Jo Eumerus: Is that not a bug? I don't pop over here every time I move a commons image to see if the created re-direct clashes.— Preceding unsigned comment added by Ronhjones (talkcontribs) 18:44, 14 December 2018 (UTC)[reply]
Yes, phab:T30299. I don't think it's a common occurrence and when it happens there is often a case to be made for renaming the local file, that might be why it has not been fixed. Jo-Jo Eumerus (talk, contributions) 19:40, 14 December 2018 (UTC)[reply]

Issue with RevDel request feature

Greetings and salutations. I use the User:Primefac/revdel tool (although not that frequently). I was just getting used to the ins and outs of it, and all of a sudden it stopped asking for the start and end edits for input. I reached out to Justlettersandnumbers, and they gave me a script to use, which I will so that the admin doesn't have to search for the issue, but it was easier using that tool. Don't know if it was done on purpose, or if it's simply a glitch. Regards.Onel5969 TT me 14:00, 15 December 2018 (UTC)[reply]

@Onel5969: that script was taken over by another user, please check at User_talk:Enterprisey for current usage. — xaosflux Talk 15:28, 15 December 2018 (UTC)[reply]

Any use for a "rare character" index?

Hello! There was recently a discussion at Extension:CirrusSearch about creating a new search index for "rare" characters that are currently not indexed by the on-wiki search engine. The three examples of difficult-to-find characters given were (Ankh), (ditto mark), and (ideographic closing mark). (Note that you can currently do an insource regex search like insource:/☥/, but on large wikis this is guaranteed to time out and not give complete results, and it is extremely inefficient on the search cluster.)

We can't index everything—indexing all every instance of e or . would be very expensive and less useful than , for example. So, in English, we would ignore A-Z, a-z, 0-9, space, and most regular punctuation (exact list TBD) and index pretty much everything else.

The most plausibly efficient way to implement such an index would only track individual characters at the document level, so you could search for documents containing both and , but you could not specify a phrase like "☥ 〆" or "〆 ☥", or a single "word" like ☥☥ or 〆☥.

I've opened a Phabricator ticket T211824 to more carefully investigate such a rare character index, to get a sense of how big it would be and what resources it would take to support it. If you have any ideas about specific use cases and how this would or would not help with them, or any other thoughts, please reply here or on the Phab ticket. (Increased interest increases the likelihood of this moving forward, albeit slowly, over the next year.)

Thank you! TJones (WMF) (talk) 16:26, 14 December 2018 (UTC)[reply]

It would be useful to be able to search for strings that include the newline (\n) character. My specific use case is that I was searching for "insource:/\<small\>\n\*/" in order to find and fix misnested <small>...</small> tags (a Linter error). I was unable to do it. It's possible that there is some way to do it, but I found MW documentation saying that it was not supported (yet?). – Jonesey95 (talk) 19:54, 15 December 2018 (UTC)[reply]
The unicode tables aim to index every character known, together with their usage and the alphabet which includes that character. For example 𓉑 is Egyptian Hieroglyph O001a, unicode U+13251 . The last I checked, there were 110,000 codes. --Ancheta Wis   (talk | contribs) 20:21, 15 December 2018 (UTC)[reply]
Ancheta Wis, that's not the type of index that is meant here ;) This is a search index, which would be the mapping between such symbols and lists of pages that contain them. —TheDJ (talkcontribs) 10:54, 17 December 2018 (UTC)[reply]
@TJones (WMF), @User:TheDJ, what about a tiered-search index. The Unicode tables user interface illustrates such an approach: the broadest scope is a block, or alphabet, which restricts the search to alphabets. In addition, in the search field, there can be a search for the graphical symbol of the unicode in a specific alphabet, a search for the spelled-out name of the unicode, and finally the numeric unicode by little-end or big-end. One deficiency that I can see is the current searches in this interface is that the CJK characters don't have the nuances in the description that I am used to in wikipedia.
One of the disadvantages to a 'rare event'-type of search is that such searches can be over such a broad field; the analogy would be zooming in on a specific point in the Pacific Ocean on Google Maps — it only makes sense to zoom out to a projection that shows the curvature of Earth, and that the user can rotate Earth's image to the specific region of interest, before zooming in. --Ancheta Wis   (talk | contribs) 15:03, 17 December 2018 (UTC)[reply]
@Ancheta Wis, what you are describing with the tiered search, if I understand it correctly, is interesting, but seems to be more about getting to a page about a specific characters; the goal that I'm describing is more about being able to find instances of a character that you already have in hand, as it were. In another discussion, the idea of indexing Unicode character blocks came up, and it's a good idea, but not necessarily the first thing I'd look at implementing (if this ever gets that far), though I plan to document what it does to the size of a theoretical index. I think it would be inexpensive to index at the block level, though it would be complex to refer to them. (Some existing ways to refer to them in some languages' regexes are here.)
I'm not sure I follow the map analogy, but I agree that different use cases have different scope, and this might not work for everything. However, I realized in another discussion that something like a complex regex with all the nuance and context you need, but which would normally time out because it has to scan every character of every document in the entire wiki, could be made much more efficient by adding a clause to the search that requires a specific character (or character block) to be present in the document, thus limiting the expensive scan to tens of thousands or fewer docs, rather than millions. TJones (WMF) (talk) 23:11, 17 December 2018 (UTC)[reply]
There is another complication, which is that WMF might want to build in a protective interface to manage the misuse of an esoteric symbol by communities which might seek to co-opt such a symbol for their own purposes in dog-whistle politics. I refer of course to the swastika, which had a completely different connotation in the culture that originated it. Right now, most of these symbols enjoy security by obscurity. --Ancheta Wis   (talk | contribs) 23:41, 17 December 2018 (UTC)[reply]
@Jonesey95, this index wouldn't help with your use case, since it would be document-level, and not part of regex searches. Also, "regular" whitespace characters, like spaces, tabs, and newlines, would be too common to index—almost every document would contain a newline! I did try to find a hack to get a newline character into the insource regex, but I couldn't do it. The browser UI won't let you paste it in. Hacking it into the URL doesn't work. I tried to define a character range that covered it (on the assumption that 99% of matches would be newlines and not, say, the BELL character), but that didn't work either. Sorry not the have better advice. TJones (WMF) (talk) 22:59, 17 December 2018 (UTC)[reply]

Categorization on watchlist

I watchlist several category pages, and my watchlist settings include not hiding categorization. Thus, when someone moves a page into or out of a category that I watch, it shows up on my watchlist. However, over the last several days (not sure quite how long), I've noticed that sometimes this shows up on my watchlist and sometimes it doesn't, with no obvious pattern as to why. Any insights? --Tryptofish (talk) 20:36, 15 December 2018 (UTC)[reply]

The phab: ticket linked from this thread above indicates that a few days ago there was a problem saving to the recent changes data table (which is the main one used to generate the watchlist). Maybe it's happened again. --Redrose64 🌹 (talk) 21:24, 15 December 2018 (UTC)[reply]
That seems possible, thanks. For me, this appears to be exclusively related to categorization. --Tryptofish (talk) 21:31, 15 December 2018 (UTC)[reply]
@Tryptofish: probably the problem is larger, though definitely related with that bug. Someone (from dewiki) reported all categorization don't show on Watchlist. But it seems you're seeing some? but not all. Can you confirm here or on the phab ticket, whether it's for all categorization or just some pages you noticed this?. –Ammarpad (talk) 17:18, 16 December 2018 (UTC)[reply]
As far as I can tell, I have not had any problems that were unrelated to categories. Specifically, I have some category pages on my watchlist. A few days ago, someone added some additional pages to one of these categories. One of those additions appeared on my watchlist (as "editor name" added "pagename" to "category name"), but two others did not. Then, a few days later, those two suddenly did appear on my watchlist, as of the date when they happened. I double-checked, and it cannot be accounted for by other edits to those pages after the edits for categorization: the categorization edits were each the most recent edits to those pages. I then changed those category assignments by removing the category, and in some cases replacing it with a second category that is also on my watchlist, and none of those category changes appeared on my watchlist, although they showed correctly on my contributions. On my watchlist, where it has various kinds of edits to hide, I do not have categorization checked, so it should not be hidden. I tried checking it, refreshing the watchlist, then unchecking it and refreshing again, and none of that made any difference. In my user preferences under the Watchlist tab, the only things I have checked are "Use non-JavaScript interface" and "Add new files I upload to my watchlist", and nothing else is checked. --Tryptofish (talk) 18:11, 16 December 2018 (UTC)[reply]

Cosmetic change problem

For some reason, occasionally when I make an edit, a &nbsp; or two gets inserted into the page. Here's an example that popped up while I was closing a discussion that didn't have any activity for a while, brought to my attention by Isaacl: [6].

I'm using the source editor with wikiED, and the problem seems to not care about browser. As such, I'm not sure what the issue is, since I'm not deliberately putting in the &nbsp;s. Is there a solution?

Thanks, Kirbanzo (talk) 14:44, 17 December 2018 (UTC)[reply]

@Kirbanzo: WP:WIKEDNBSP. --Izno (talk) 14:54, 17 December 2018 (UTC)[reply]

20:34, 17 December 2018 (UTC)

CAT:CSD admin backlog

What's wrong with {{admin backlog}} at CAT:CSD? It won't disappear, even though the category's empty and I've purged the category using the link in the template. The settings are the same as normal: the template's supposed to disappear whenever there are fewer than 50 items in the category. Nyttend (talk) 22:46, 17 December 2018 (UTC)[reply]

Nyttend, for what it's worth, the page counter is also off at Category:Administrative backlog. It shows 198 pages, when there's (currently) only two. I purged it also, and it didn't help. Home Lander (talk) 23:17, 17 December 2018 (UTC)[reply]
This has been an ongoing issue for about half the year (see phab:T195397 and phab:T200402 as well) and has been reported here and elsewhere more than once. ~ Amory (utc) 01:55, 18 December 2018 (UTC)[reply]
Hm, I'm sorry; I don't have any memory of reporting this situation a couple of months ago. Nyttend (talk) 03:07, 18 December 2018 (UTC)[reply]

Thanks doesn't work on rev-delled revisions

Is this intentional? There is no thanks button next to any page revisions that have been hidden, such as those currently near the top of [12]. Home Lander (talk) 23:11, 17 December 2018 (UTC)[reply]

Yes, that's on purpose (source code). Legoktm (talk) 00:07, 18 December 2018 (UTC)[reply]

Easier way to add missing ")"

On List of people who disappeared mysteriously: post-1970, all of the entries are missing the second ")" in the age column after "2018". Is there an easier way to fix this instead of going through and adding it to every single one manually? Home Lander (talk) 02:26, 18 December 2018 (UTC)[reply]

In the wikitext editor choose the advanced menu. At the far right click the spyglass for search and replace.
Trappist the monk (talk) 02:28, 18 December 2018 (UTC)[reply]
Trappist the monk, brilliant. Thanks! Home Lander (talk) 02:33, 18 December 2018 (UTC)[reply]

I don't remember if it was on Wikipedia or another wiki, but I recall there being a setting or gadget in Preferences that made it so [edit] links only show when moving the mouse cursor over the section. Does this still exist? Erik Humphrey (talk) 09:56, 18 December 2018 (UTC)[reply]

"Submit an edit request" button failing

In the "View source" mode of a cascade-protected module, clicking on the "Submit an edit request" button leads to Wp:Main Page/Errors. SD0001 (talk) 11:31, 18 December 2018 (UTC)[reply]

@SD0001: Not every module; compare Module:String and Module:Lockbox. It's a little convoluted, but in the end the button is delivered by Module:Submit an edit request. It seems the doc for Template:Protected page text is a little misleading, but the button will link to mainpage errors for any module that is transcluded on the Main Page, which is intentional. ~ Amory (utc) 12:21, 18 December 2018 (UTC)[reply]

template fix request

please fix {{iso2language|lij}} with link to Ligurian (Romance language). thanks!!! --2001:B07:6442:8903:8D3C:C5DA:57A1:9F2F (talk) 14:56, 18 December 2018 (UTC)[reply]