Jump to content

Wikibooks:Reading room/Technical Assistance

Add topic
This project page is move-protected.
From Wikibooks, open books for an open world
(Redirected from Wikibooks:TECH)
Latest comment: 5 days ago by Leaderboard in topic MediaWiki:Histlegend
ArchivesWikibooks Discussion Rooms
Discussions Assistance Requests Announcements
General | Proposals | Projects | Featured books General | Technical | Administrative Deletion | Undeletion | Import | Permissions Bulletin Board

Welcome to the Technical Assistance reading room. Get assistance on questions related to MediaWiki markup, CSS, JavaScript, and such as they relate to Wikibooks. This is not a general-purpose technical support room.

To submit a bug notice or feature request for the MediaWiki software, visit Phabricator.

To get more information about the MediaWiki software, or to download your own copy, visit MediaWiki

There are also two IRC channels for technical help: #mediawikiconnect for issues about the software, and #mediawiki-coreconnect for WMF server or configuration issues.

move request

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Trouble with printable book

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

CollectionParser gadget doesn't work

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Proposal: Adopt OneClickWelcomer as a gadget

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Title blacklist request

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Low contrast with Template:hidden begin in dark mode

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Some changes to MediaWiki:Gadget-markAdmins

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Interface page edit request

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Reclassifying markblocked

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Recent changes improvements

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

OneClickWelcomer edit requests

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Archiver bot and Wikibooks:Reading room/Assistance

[edit source]

Do we know why User:ArchiverBot has stopped archiving threads at Wikibooks:Reading room/Assistance? The last archive on that page was in 2022. —Kittycataclysm (discusscontribs) 15:59, 21 December 2024 (UTC)Reply

Pinging @Whym as the bot's creator. —Kittycataclysm (discusscontribs) 13:18, 27 December 2024 (UTC)Reply
There was a vandalism. I think this was the cause. Whym (discusscontribs) 06:14, 28 December 2024 (UTC)Reply

Template:Script doc auto

[edit source]
The following discussion has concluded. Please open a new discussion for any further comments.

Interface page edit request 2

[edit source]

Please remove the last sentence ("Also, selecting 'all'...") from MediaWiki:Import-interwiki-text, as it appears to refer to a part of the Special:Import interface that no longer exists. JJPMaster (she/they) 00:38, 22 December 2024 (UTC)Reply

Courtesy ping: Leaderboard JJPMaster (she/they) 00:38, 22 December 2024 (UTC)Reply
Done Leaderboard (discusscontribs) 12:12, 22 December 2024 (UTC)Reply

markAdmins bug fix

[edit source]

The original markAdmins script on enwiki had a bug involving improper Vector 2022 support, and I have just applied the patch on the unstable branch. Please apply the patch to production. Courtesy ping: Leaderboard. JJPMaster (she/they) 03:03, 22 December 2024 (UTC)Reply

Done Leaderboard (discusscontribs) 12:14, 22 December 2024 (UTC)Reply

MediaWiki:Gadget-sidebartranslate.js

[edit source]

This gadget appears to use an unusual and out-of-date importation of MediaWiki:Gadget-langcode2name.js to get the names of the languages, when a more simple means, used by Wiktionary (after they stopped using the old method), just gets the "title" property from the interwiki link itself, requiring no updating. Either import the Wiktionary gadget directly in MediaWiki:Gadget-sidebartranslate.js, or replace its content with the following:

// Copied from Wiktionary, see [[wikt:MediaWiki:Gadget-WiktSidebarTranslation.js]]
$(function() {
	$("#p-lang .interlanguage-link a").each(function(){
		var langnameMatch = $(this).attr("title").match(/(.*) – (.*)/);
		var langname = $(this).attr("title"); // Some Wikibooks have '' as their main page
		if (langnameMatch && langnameMatch.length >= 3) langname = langnameMatch[2];

		$(this).text(langname)
			.attr("lang", "en"); // This line breaks compact languages
	});
	
	$("#p-lang .interlanguage-link").sort(function(lia, lib){
		return $(lia).children().first().text() < $(lib).children().first().text() ? -1 : 1;
	}).appendTo("#p-lang>div>ul");
});

Courtesy ping: Leaderboard. JJPMaster (she/they) 06:22, 22 December 2024 (UTC)Reply

Done Leaderboard (discusscontribs) 12:15, 22 December 2024 (UTC)Reply

Announcement: Luna

[edit source]

(Note: This is not a request for assistance (although there is a related request on WB:RR/AA), it is simply something that people who are interested in the technical side of Wikibooks should be aware of)

WikiProject Little Star has begun a new project called Luna. The aim of this project is to develop alternatives to the new page reviewing modules that Twinkle provides on Wikipedia. So far, three modules have been re-implemented: Tag, CSD (both of those are part of User:JJPMaster/CurateThisPage.js), and XfD (as User:JJPMaster/rfd.js). As new modules are implemented, they will be added to User:JJPMaster/luna.js, which is the "one-stop shop" for every script that will be a part of Luna. If you want, you can test it out by adding it to your common.js file (importScript("User:JJPMaster/luna.js");), and let me know if there are any problems. Thank you! JJPMaster (she/they) 05:14, 23 December 2024 (UTC)Reply

Interface page edit request 3

[edit source]

I would like to ask that MediaWiki:Sp-contributions-footer to be replaced with User:JJPMaster/MediaWiki:Sp-contributions-footer. This updates several dead links to use XTools instead of older, deprecated Toolforge tools, switches the list format from using dot Unicode characters to the {{hlist}} template, and adds an edit summary usage tab. However, it does also remove the "Files uploaded" tab, which used to link to an external tool (before it was deleted) showing one's uploads to Commons, not Wikibooks. If you think this tab is still needed for some reason, I could add an updated version before re-requesting. JJPMaster (she/they) 05:23, 23 December 2024 (UTC)Reply

Done - we can always re-add the "Files uploaded" tab if needed. Leaderboard (discusscontribs) 05:31, 23 December 2024 (UTC)Reply
@Leaderboard: This appears to display a bit oddly on some devices, which is strange because it looks completely normal on User:JJPMaster/MediaWiki:Sp-contributions-footer. Please try replacing the MediaWiki page with that user page content again, which has since reimplemented the list using a wrapper template. JJPMaster (she/they) 05:56, 23 December 2024 (UTC)Reply
Done - try purging the cache if the issue still occurs. Leaderboard (discusscontribs) 16:24, 23 December 2024 (UTC)Reply
@Leaderboard: It works now. Thank you! JJPMaster (she/they) 17:37, 23 December 2024 (UTC)Reply

Luna beta testers requested

[edit source]

My Christmas gift to the English Wikibooks is Luna, which I explained here. I am pleased to say that the tool has officially reached beta, and I would like to ask for anyone who is able and willing to test it out, following the instructions here. Feel free to post any bug reports and/or feature requests either on the talk page of WB:LUNA, or my user talk page (User talk:JJPMaster). Thank you! JJPMaster (she/they) 04:33, 26 December 2024 (UTC)Reply

BookCat edit request

[edit source]

Please change bookCatAJAX === undefined on line 44 to typeof bookCatAJAX == "undefined", since it currently throws a ReferenceError. Additionally, please remove the "(does not work as a gadget" from BookCat, since it appears that it does work now. Courtesy ping: Leaderboard. JJPMaster (she/they) 20:33, 27 December 2024 (UTC)Reply

Done Leaderboard (discusscontribs) 03:11, 28 December 2024 (UTC)Reply

markblocked request

[edit source]

The current markblocked gadget's code is not great, so I gave it the TNT treatment. This test found that partial blocks display exactly the same as regular blocks, and when I decided to go into the source code to attempt a fix, I noticed that nearly every line has a warning. The gadget was originally imported from Meta before partial blocks were a thing, so I took the code from a more updated Meta version and modified the style a bit. Thus, please replace MediaWiki:Gadget-markblocked.js with User:JJPMaster/markblocked.js. Courtesy ping: Leaderboard. JJPMaster (she/they) 04:21, 28 December 2024 (UTC)Reply

@JJPMaster Your version has a couple of warnings, and an error on line 276. Leaderboard (discusscontribs) 04:32, 28 December 2024 (UTC)Reply
@Leaderboard: These were all present in the Meta version. I tried to resolve the warnings here, but that seemed to break the entire script, so I undid that correction. I found a workaround for the error. JJPMaster (she/they) 04:42, 28 December 2024 (UTC)Reply
@JJPMaster Done - in general errors tend to be blockers. Leaderboard (discusscontribs) 05:09, 28 December 2024 (UTC)Reply
@Leaderboard: Also, the partial block is preventing me from importing pages. Could you remove it? JJPMaster (she/they) 05:21, 28 December 2024 (UTC)Reply
@JJPMaster Done. In general, such type of experiments (such as self-partial-blocking) should be done on test.wikipedia or on the Beta Cluster, not here. Leaderboard (discusscontribs) 06:37, 28 December 2024 (UTC)Reply

CollectionParser edit request

[edit source]

Please replace lines 62-70 of MediaWiki:Gadget-collectionparser.js with this:

const showLink = mw.config.get("wgArticleId") > 0 && !mw.config.get("wgIsMainPage") && (mw.config.get('wgNamespaceNumber') == 0 || mw.config.get('wgNamespaceNumber') == 102 || mw.config.get('wgNamespaceNumber') == 110);

var collectionParserPortletLink = showLink ? mw.util.addPortletLink('p-personal', '#', 'Get collection', 'pediapress') : null;
// add a link at the right upper corner
function addPediapressLinks($content) {
	if (showLink) {
		$(collectionParserPortletLink).click(function() {
			getCollection($content);
		});
	}
}

This will ensure that the links are only added to existing pages that are not the Main Page and in the correct namespace. JJPMaster (she/they) 23:53, 29 December 2024 (UTC)Reply

Done Leaderboard (discusscontribs) 02:59, 30 December 2024 (UTC)Reply

Flagged Revisions comment box

[edit source]

The box that allows you to leave a comment while accepting or rejecting a revision with FlaggedRevs is hidden using a "hack" at MediaWiki:Common.css#L-78. Either there should be a good reason for this, in which case the "Comment:" label (label[for="mw-fr-commentbox"]) should also be removed (with display: none; if we don't want screen readers to recognize its existence, or visibility: hidden; otherwise), or it should be unhidden again. JJPMaster (she/they) 23:21, 30 December 2024 (UTC)Reply

The purpose of FlaggedRevs here is as an anti-vandalism tool; I don't think we need a comments box as a result. Leaderboard (discusscontribs) 02:30, 31 December 2024 (UTC)Reply
@Leaderboard: If that's the case, then please make the suggested CSS change. JJPMaster (she/they) 02:35, 31 December 2024 (UTC)Reply
What's the problem with the current hack? Leaderboard (discusscontribs) 02:43, 31 December 2024 (UTC)Reply
@Leaderboard: Currently, the label for the "Comment:" box appears, but the box doesn't (See right). This is not ideal, since the label doesn't actually have a corresponding element in the DOM.
JJPMaster (she/they) 03:01, 31 December 2024 (UTC)Reply
Done, @JJPMaster please check whether I've done it properly. Leaderboard (discusscontribs) 04:15, 31 December 2024 (UTC)Reply
@Leaderboard: No concerns regarding what I can see. JJPMaster (she/they) 04:20, 31 December 2024 (UTC)Reply

Infobox styling

[edit source]

I can technically make this change, but am first asking if it would be acceptable for me to do so, since {{Infobox}} has over 5,000 transclusions. What I'm asking about pushing the changes to {{Infobox/sandbox}} to the main template, which uses TemplateStyles to add word-wrap to the text of infoboxes. Compare without TemplateStyles and with TemplateStyles. JJPMaster (she/they) 20:50, 4 January 2025 (UTC)Reply

This seems quite helpful—I've had trouble in the past with the lack of wrapping. —Kittycataclysm (discusscontribs) 21:26, 4 January 2025 (UTC)Reply
I'd say go for it. Leaderboard (discusscontribs) 03:36, 5 January 2025 (UTC)Reply

WhatLinksHere interface page edit request

[edit source]

While trying to determine the number of transclusions for {{Infobox}} in the above § Infobox styling thread, I noticed that the "transclusion counter" tool on Special:WhatLinksHere doesn't work, so I made my own. It's here, and its code is based on a similar tool for Wikipedia (toolforge:templatecount). Accordingly, please replace the content of MediaWiki:Linkshere with User:JJPMaster/MediaWiki:Linkshere, which switches the link to my tool. JJPMaster (she/they) 21:59, 4 January 2025 (UTC)Reply

There wasn't one on WhatLinksHere, or am I missing something? Leaderboard (discusscontribs) 02:37, 5 January 2025 (UTC)Reply
@Leaderboard: It's only visible on templates. JJPMaster (she/they) 02:41, 5 January 2025 (UTC)Reply
Done Leaderboard (discusscontribs) 04:15, 5 January 2025 (UTC)Reply
@Leaderboard: The fact that WhatLinksHere is technically a special page means that the namespace check doesn't work. Please replace {{#ifeq:{{NAMESPACE}}|Template| with {{#ifeq:{{padleft:|9|$1}}|Template:| accordingly. JJPMaster (she/they) 04:17, 5 January 2025 (UTC)Reply
Done Leaderboard (discusscontribs) 05:31, 5 January 2025 (UTC)Reply
@Leaderboard: It's good now, thanks! JJPMaster (she/they) 05:34, 5 January 2025 (UTC)Reply
What links here is one of my wikimedia interests recently, so this thread got my attention. However, as happens to me quite frequently I bumped into something new when I checked template: Infobox.
On the fourth line of the page on the right hand side I see this:
  • Read Latest draft Edit source View history
instead of the usual
  • Read Edit Edit source View history
I was under the impression that the second line is the standard for content pages on wikimedia . I was obviously wrong, but as a periodic member of this community, I am curious who at wikibooks can implement such changes, and where can the community see announcement of these types of changes Ottawahitech (discusscontribs) 16:48, 6 January 2025 (UTC)Reply
{{infobox}} has flagged revisions. See Help:Tracking changes. —Justin (koavf)TCM 17:03, 6 January 2025 (UTC)Reply

discussion as opposed to talk

[edit source]

I am an experienced Wikimedian but I do not visit wikibooks very often, so I hope I have chosen the right reading room for my question?

Anyway what I wanted to find out is why talk-pages here are called "discussion" and not "talk"? Ottawahitech (discusscontribs) 16:36, 8 January 2025 (UTC)Reply

MediaWiki:Histlegend

[edit source]

Currently, the "Statistics" link in page histories links to the stats of the interface page itself, rather than of the page whose history you are viewing. Thus, in MediaWiki:Histlegend, please change index.php?article=MediaWiki:Histlegend with index.php?article={{FULLPAGENAME}}. JJPMaster (she/they) 16:18, 11 January 2025 (UTC)Reply

Done Leaderboard (discusscontribs) 15:27, 16 January 2025 (UTC)Reply
@Leaderboard: Actually, {{FULLPAGENAMEE}} (with the second E) is needed to support page titles with multiple spaces. JJPMaster (she/they) 16:15, 16 January 2025 (UTC)Reply
That template doesn't exist? Leaderboard (discusscontribs) 16:24, 16 January 2025 (UTC)Reply
@Leaderboard: It’s not a template, it’s a magic word. JJPMaster (she/they) 16:33, 16 January 2025 (UTC)Reply
Did not realise that, Done Leaderboard (discusscontribs) 02:10, 17 January 2025 (UTC)Reply

Interface page edit request

[edit source]

Please replace the link to the range calculator on MediaWiki:Blockiptext with a locally hosted alternative (toolforge:ftools/general/ip-range-calc.html). I am technically able to perform this task, but doing so would violate the terms of my request for adminship. JJPMaster (she/they) 14:27, 16 January 2025 (UTC)Reply

@JJPMaster Isn't the third-party tool more feature rich? Leaderboard (discusscontribs) 15:26, 16 January 2025 (UTC)Reply
@Leaderboard: Sorry, I asked you to change the wrong thing. I was referring to the "Rangeblock helper" link. JJPMaster (she/they) 16:10, 16 January 2025 (UTC)Reply
Done Leaderboard (discusscontribs) 16:25, 16 January 2025 (UTC)Reply