Wikipedia:Village pump (technical)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
 Policy Technical Proposals Idea lab 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.

Frequently asked questions (FAQ) (see also: Wikipedia:FAQ/Technical)
Click "[show]" next to each point to see more details.
If something looks wrong, purge the server's cache, then bypass your browser's cache.
This tends to solve most issues, including improper display of images, user-preferences not loading, and old versions of pages being shown.
Font size changed unexpectedly?
You may have accidentally changed the font size on your browser for a particular website by pressing a shortcut key or scrollwheel without realising it. Try resetting the zoom with Ctrl+0 (typing the digit zero while holding down the control key) or adjusting the zoom with Ctrl++ or Ctrl+-. Alternatively, look for the View option on your browser's menu and reset it to 100%.
No, we will not use JavaScript to set focus on the search box.
This would interfere with usability, accessibility, keyboard navigation and standard forms. See bug 1864. There is an accesskey property on it (default to accesskey="f" in English), and for logged in users there is a gadget available in your preferences.
No, we will not add a spell-checker, or spell-checking bot.
You can use a web browser such as Firefox, which has a spell checker.
If you have problems making your fancy signature work, check Wikipedia:How to fix your signature.
If you changed to another skin and cannot change back, use this link.
Alternatively, you can press Tab until the "Save" button is highlighted, and press Enter. Using Mozilla Firefox also seems to solve the problem.
If an image thumbnail is not showing, try purging its image description page.
If the image is from Wikimedia Commons, you might have to purge there too. If it doesn't work, try again before doing anything else. Some ad blockers, proxies, or firewalls block URLs containing /ad/ or ending in common executable suffixes. This can cause some images or articles to not appear.
Numbers listed in parentheses in the "Recent changes" section, on history pages and in your watchlist are the number of added or removed bytes.
For server or network status, please see Wikimedia Foundation Grafana.
« Older discussions, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171


Preventing redlinks auto launch into edit source mode[edit]

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)

@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. Face-smile.svg — AfroThundr (u · t · c) 05:10, 19 November 2018 (UTC)
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)
@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)
@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)
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. Face-smile.svg 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)


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

Visible ndash[edit]

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)

WT:CS1#ndash entity in pages parameter. --Izno (talk) 22:46, 1 December 2018 (UTC)
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)
Well, what about fixing all such uses by a bot? --Leyo 23:31, 2 December 2018 (UTC)
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)
What exactly needs to be done? --Leyo 08:56, 7 December 2018 (UTC)
Headbomb, links please ? Then people can maybe help in achieving that. ;) —TheDJ (talkcontribs) —TheDJ (talkcontribs) 14:51, 7 December 2018 (UTC)
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)
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)
"except fixes for breaking changes" evidently not. Headbomb {t · c · p · b} 12:51, 10 December 2018 (UTC)
@Headbomb: You are more than capable of starting a discussion to deploy that exact fix. --Izno (talk) 00:08, 11 December 2018 (UTC)
@Izno: I did that... 2 months ago. Headbomb {t · c · p · b} 00:37, 11 December 2018 (UTC)

Swiss flag too big[edit]

Hey, does anyone have any suggestions how to get each year in this table parallel? It seems that the flag of Switzerland is just slightly too big for a cell. Pelmeen10 (talk) 13:31, 8 December 2018 (UTC)

Template:Country data Switzerland specifies the height of the Swiss flag as 16px (16 pixels), even though Template:Flagicon states that flags should be no taller than 15px. This one-pixel difference is causing the problem that you see. You could maybe set the row-heights manually, but you still have the double-height rows from ties to deal with, and long names like "Alexandre Bilodeau" causing cells to be double-height, at least in my browser. – Jonesey95 (talk) 13:55, 8 December 2018 (UTC)
I made some edits for you to align the rows; they should be aligned on most screens now. Feel free to revert if they are not to your liking. – Jonesey95 (talk) 14:26, 8 December 2018 (UTC)

Special:Badtitle/NS447:Stanford University/Technology entrepreneurship (2014 Spring)/Course description[edit]

Initial page reported[edit]

Resolved: This specific page has been deleted. — xaosflux Talk 18:32, 8 December 2018 (UTC)

I came across Special:Contributions/YOUNG_DIAMOND and noticed the creation of the following page: Special:Badtitle/NS447:Stanford University/Technology entrepreneurship (2014 Spring)/Course description. It appears as a redlink here, but the creation of this page is listed on this account's contributions page and the following diff: Special:Diff/619755755. Does anyone know what's going on here, and if I can't edit this page, how was it created? Thanks, 72 (talk) 15:37, 8 December 2018 (UTC)

@72: I think this will have to be deleted on the back end, I've opened phab:T211478 to address, thank you for reporting. — xaosflux Talk 16:13, 8 December 2018 (UTC)

It seems like Badtitle is the new name for the Education Program namespace. See #Special pages for the Education Program – what happened to them?wbm1058 (talk) 16:44, 8 December 2018 (UTC)

That page only had one revision, with one word. I think I got it deleted via the API (see log). — xaosflux Talk 16:51, 8 December 2018 (UTC)

Additional examples[edit]

Sometimes WYSIWYG editor doesn't open[edit]

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)

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)
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)
It appears to be working for me. Are there any errors in your javascript console? --AntiCompositeNumber (talk) 15:52, 10 December 2018 (UTC)

More populated category redirects[edit]

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)

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)
Category:WikiProject Articles for creation participants is now empty. — xaosflux Talk 14:41, 9 December 2018 (UTC)
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)
Hmm - adding and removing my sandbox ultimately did the trick. Odd. Timrollpickering 16:36, 9 December 2018 (UTC)
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)

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)

Fixed the first one. – Jonesey95 (talk) 15:43, 10 December 2018 (UTC)
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)
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)
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)

Further cases:

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

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

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)

Time-sensititive templates[edit]

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)

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

Dark theme and math readability[edit]

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)

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)


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)

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

problem with dates[edit]

I've had this problem in the past and though I tried to search the archives cannot find the thread or the fix. Not sure why this happens only with Arabic (recently did a Hebrew translation, another right-to-left-reading language, without the problem), but when I use the language template on this article Ashraf os-Saltaneh, it is as if the ending }} of the template doesn't stop the foreign text insertion, because the dates 1863-1914, always flip to 1914-1863. Probably not explaining this well, but she couldn't possibly have been born in 1914 and died in 1863. Can someone please tell me how to stop the dates from flipping? Thanks!! SusunW (talk) 22:33, 9 December 2018 (UTC)

I've fixed it for you. The trouble is that numerals can be regarded as part of left-to-right or right-to-left text, although the numbers display the same order in both, so the text processor has to rely on context to determine which applies. I also took the liberty of changing the language to Persian, as the subject is clearly Iranian. --NSH001 (talk) 23:28, 9 December 2018 (UTC)
Thank you! Totally appreciate the help. SusunW (talk) 23:30, 9 December 2018 (UTC)
"Persian: اشرف السلطنه‎‎, 1863–1914" is working correctly, or you would like it to work without the {{lrm}} as well? Gryllida (talk) 23:58, 9 December 2018 (UTC)
Sorry, was replying before seeing the discussion above. Please disregard. Gryllida (talk) 23:59, 9 December 2018 (UTC)

Interwikilink for users?[edit]

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)

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

Tech News: 2018-50[edit]

17:33, 10 December 2018 (UTC)

Using templatestyles inside of wikilink text[edit]

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)

@TheDJ and Izno: Frietjes (talk) 21:14, 10 December 2018 (UTC)
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)
@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)
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)
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)
@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)
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)
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)

Categorization that will not update[edit]

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)

SMcCandlish, a null edit of Template:Taxon italics fixed it. Galobtter (pingó mió) 09:38, 12 December 2018 (UTC)
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)
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)

Llanelli - inconsistency between watchlist and page history[edit]

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)

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)

Currently disabled: two issues[edit]

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)

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

  • For issue 1, please follow up at Module_talk:Protection_banner#Time_format. This isn't a "bug" in the software, but was placed by template editors - it could need updating. — xaosflux Talk 03:41, 13 December 2018 (UTC)
    • Done. ~ Amory (utc) 12:02, 13 December 2018 (UTC)
      • Thanks. --76.69.46.228 (talk) 08:11, 14 December 2018 (UTC)
        • Ah, still wrong, I'm afraid. It is usual to use leading zeroes, so 09:10, not 9:10 as the current format produces. --76.69.46.228 (talk) 11:24, 14 December 2018 (UTC)
          Fixed Galobtter (pingó mió) 11:29, 14 December 2018 (UTC)

And why a CAPTCHA?[edit]

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)

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

Taxonbar throwing Lua error[edit]

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)

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)
Odd. Thanks. William Avery (talk) 14:16, 13 December 2018 (UTC)

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

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)

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)
For an example of how it works in practice, see Template:Infobox school. – Jonesey95 (talk) 02:01, 14 December 2018 (UTC)
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)
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)
One can use {{Photomontage}} to display multiple images in an infobox. Galobtter (pingó mió) 11:38, 14 December 2018 (UTC)
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)
(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)
Well, I did it BOLDly since the template isn't template-protected. Galobtter (pingó mió) 12:09, 14 December 2018 (UTC)

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)

Template in a mess[edit]

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)

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

"New contribution"[edit]

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)

@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)
@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)
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)
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)
@Deb: try turning off CXT at Special:Preferences#mw-prefsection-betafeatures. — xaosflux Talk 19:16, 13 December 2018 (UTC)
Thanks so much. That worked. I won't attempt to understand why. Deb (talk) 19:19, 13 December 2018 (UTC)
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)

Seeing wrong image[edit]

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)

Yes. Purging locally didn't fix it. Maybe try deleting and restoring? —Cryptic 17:42, 14 December 2018 (UTC)
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)
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)
I moved the file. Galobtter (pingó mió) 18:10, 14 December 2018 (UTC)
@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)
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)

Issue with RevDel request feature[edit]

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)

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

Any use for a "rare character" index?[edit]

Moved from Wp:Village pump (proposals): SD0001 (talk) 18:57, 15 December 2018 (UTC)

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)

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

Categorization on watchlist[edit]

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)

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)
That seems possible, thanks. For me, this appears to be exclusively related to categorization. --Tryptofish (talk) 21:31, 15 December 2018 (UTC)