Wikibooks:Reading room/Technical Assistance
Discussions | Assistance | Requests | Announcements |
---|---|---|---|
General | Proposals | Projects | Featured books | General | Technical | Administrative | Deletion | Undeletion | Import | Upload | 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.
CollectionParser gadget doesn't work
editLow contrast with Template:hidden begin in dark mode
editSome changes to MediaWiki:Gadget-markAdmins
editRecent changes improvements
editOneClickWelcomer edit requests
editArchiver bot and Wikibooks:Reading room/Assistance
editDo we know why User:ArchiverBot has stopped archiving threads at Wikibooks:Reading room/Assistance? The last archive on that page was in 2022. —Kittycataclysm (discuss • contribs) 15:59, 21 December 2024 (UTC)
- Pinging @Whym as the bot's creator. —Kittycataclysm (discuss • contribs) 13:18, 27 December 2024 (UTC)
- There was a vandalism. I think this was the cause. Whym (discuss • contribs) 06:14, 28 December 2024 (UTC)
Interface page edit request 2
editPlease 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)
- Courtesy ping: Leaderboard JJPMaster (she/they) 00:38, 22 December 2024 (UTC)
markAdmins bug fix
editThe 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)
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)
(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)
Interface page edit request 3
editI 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)
- Done - we can always re-add the "Files uploaded" tab if needed. Leaderboard (discuss • contribs) 05:31, 23 December 2024 (UTC)
- @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)
- Done - try purging the cache if the issue still occurs. Leaderboard (discuss • contribs) 16:24, 23 December 2024 (UTC)
- @Leaderboard: It works now. Thank you! JJPMaster (she/they) 17:37, 23 December 2024 (UTC)
- Done - try purging the cache if the issue still occurs. Leaderboard (discuss • contribs) 16:24, 23 December 2024 (UTC)
- @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)
Luna beta testers requested
editMy 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)
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)
markblocked
request
edit
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)
- @JJPMaster Your version has a couple of warnings, and an error on line 276. Leaderboard (discuss • contribs) 04:32, 28 December 2024 (UTC)
- @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)
- @JJPMaster Done - in general errors tend to be blockers. Leaderboard (discuss • contribs) 05:09, 28 December 2024 (UTC)
- @Leaderboard: Also, the partial block is preventing me from importing pages. Could you remove it? JJPMaster (she/they) 05:21, 28 December 2024 (UTC)
- @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 (discuss • contribs) 06:37, 28 December 2024 (UTC)
- @Leaderboard: Also, the partial block is preventing me from importing pages. Could you remove it? JJPMaster (she/they) 05:21, 28 December 2024 (UTC)
- @JJPMaster Done - in general errors tend to be blockers. Leaderboard (discuss • contribs) 05:09, 28 December 2024 (UTC)
- @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)
CollectionParser edit request
editPlease 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)
Flagged Revisions comment box
editThe 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)
- The purpose of FlaggedRevs here is as an anti-vandalism tool; I don't think we need a comments box as a result. Leaderboard (discuss • contribs) 02:30, 31 December 2024 (UTC)
- @Leaderboard: If that's the case, then please make the suggested CSS change. JJPMaster (she/they) 02:35, 31 December 2024 (UTC)
- What's the problem with the current hack? Leaderboard (discuss • contribs) 02:43, 31 December 2024 (UTC)
- @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.
- Done, @JJPMaster please check whether I've done it properly. Leaderboard (discuss • contribs) 04:15, 31 December 2024 (UTC)
- @Leaderboard: No concerns regarding what I can see. JJPMaster (she/they) 04:20, 31 December 2024 (UTC)
- Done, @JJPMaster please check whether I've done it properly. Leaderboard (discuss • contribs) 04:15, 31 December 2024 (UTC)
- @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.
- What's the problem with the current hack? Leaderboard (discuss • contribs) 02:43, 31 December 2024 (UTC)
- @Leaderboard: If that's the case, then please make the suggested CSS change. JJPMaster (she/they) 02:35, 31 December 2024 (UTC)
Infobox styling
editI 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)
- This seems quite helpful—I've had trouble in the past with the lack of wrapping. —Kittycataclysm (discuss • contribs) 21:26, 4 January 2025 (UTC)
- I'd say go for it. Leaderboard (discuss • contribs) 03:36, 5 January 2025 (UTC)
WhatLinksHere interface page edit request
editWhile 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)
- There wasn't one on WhatLinksHere, or am I missing something? Leaderboard (discuss • contribs) 02:37, 5 January 2025 (UTC)
- @Leaderboard: It's only visible on templates. JJPMaster (she/they) 02:41, 5 January 2025 (UTC)
- Done Leaderboard (discuss • contribs) 04:15, 5 January 2025 (UTC)
- @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)- Done Leaderboard (discuss • contribs) 05:31, 5 January 2025 (UTC)
- @Leaderboard: It's good now, thanks! JJPMaster (she/they) 05:34, 5 January 2025 (UTC)
- Done Leaderboard (discuss • contribs) 05:31, 5 January 2025 (UTC)
- @Leaderboard: The fact that WhatLinksHere is technically a special page means that the namespace check doesn't work. Please replace
- Done Leaderboard (discuss • contribs) 04:15, 5 January 2025 (UTC)
- @Leaderboard: It's only visible on templates. JJPMaster (she/they) 02:41, 5 January 2025 (UTC)
- 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 (discuss • contribs) 16:48, 6 January 2025 (UTC)
- {{infobox}} has flagged revisions. See Help:Tracking changes. —Justin (koavf)❤T☮C☺M☯ 17:03, 6 January 2025 (UTC)
discussion as opposed to talk
editI 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 (discuss • contribs) 16:36, 8 January 2025 (UTC)
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)
- Done Leaderboard (discuss • contribs) 15:27, 16 January 2025 (UTC)
- @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)- That template doesn't exist? Leaderboard (discuss • contribs) 16:24, 16 January 2025 (UTC)
- @Leaderboard: It’s not a template, it’s a magic word. JJPMaster (she/they) 16:33, 16 January 2025 (UTC)
- Did not realise that, Done Leaderboard (discuss • contribs) 02:10, 17 January 2025 (UTC)
- @Leaderboard: It’s not a template, it’s a magic word. JJPMaster (she/they) 16:33, 16 January 2025 (UTC)
- That template doesn't exist? Leaderboard (discuss • contribs) 16:24, 16 January 2025 (UTC)
- @Leaderboard: Actually,
Interface page edit request
editPlease 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)
- @JJPMaster Isn't the third-party tool more feature rich? Leaderboard (discuss • contribs) 15:26, 16 January 2025 (UTC)
- @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)
WikiProject Little Star Newsletter: January 2025
editThe first full month of WikiProject Little Star has come to a close, and we have got a lot of work done! Here's all of the main projects we've worked so far:
OneClickWelcomer
editThis is a gadget that was designed to supersede MediaWiki:Gadget-Welcome.js, which has not worked for several years. This adds the ability to welcome users with a single click from Special:RecentChanges, Special:Contributions, or a user's talk page. It also allows for quickly warning users with {{Test1}}, {{Test2}}, or {{Blatantvandal}}.
Dark mode optimizations
editXeverything11 has spent a significant amount of time helping to ensure that templates and interface messages are accessible and dark mode-compliant.
markAdmins
editJJPMaster (bot) has been summoned to keep a list of everyone's user rights across the English Wikibooks, which allows the markAdmins gadget to run with up-to-date data for the first time in about two years.
Miscellaneous gadgets
editJJPMaster helped update the codebases of other outdated gadgets, including GetCollection, SidebarTranslate, BookCat, and markblocked, the last of which is the reason for the only time her account has ever been blocked on any Wikimedia wiki.
Unmerged transwikis
editWith the help of Graham87, Pppery, UtherSRG, and the Wikibooks community, JJPMaster led an initiative to complete the histories of old articles that were imported from the English Wikipedia. This investigation is responsible for the majority of history merges in Wikibooks history.
Luna
editThis is perhaps the biggest project that WikiProject Little Star has developed. Luna is a collection of user scripts that attempt to help users review new pages and patrol recent changes, similarly to what Twinkle used to do. It includes functionalities such as nominating pages for speedy deletion, making requests at RfD, tagging files for copyright problems, adding maintenance templates to books, removing all links to a particular page, and, most recently, a rollback-like feature. It can be used by all autoconfirmed users, but some features are limited to reviewers or administrators.
That's it for WikiProject Little Star's first newsletter! You can subscribe here if you haven't already. Thank you!
Delivered on behalf of JJPMaster (she/they) by MediaWiki message delivery (discuss • contribs) 05:16, 2 February 2025 (UTC)
Duplicate identifiers?
editHi, On the Oberon/Text page, lintHint reports 4 instances of duplication of identifiers. Can someone spot a duplication? Thx, ... PeterEasthope (discuss • contribs) 15:39, 9 February 2025 (UTC)
- The problem comes from transcluding other pages. E.g. on Oberon/ETH Oberon/TextType, you can find
<div id="Piece"></div>
. If you changed that name to something else, it could fix the problem. I'm not sure why there is an empty div in the first place. —Justin (koavf)❤T☮C☺M☯ 15:49, 9 February 2025 (UTC)- The div is empty but provides a fragment identifier to link to; but the identifier should be in the table tag. Thanks, ... PeterEasthope (discuss • contribs) 17:32, 9 February 2025 (UTC)
- Okay, but why not use Template:Anchor or a span? Why include a blockline element? —Justin (koavf)❤T☮C☺M☯ 17:50, 9 February 2025 (UTC)
- The div is empty but provides a fragment identifier to link to; but the identifier should be in the table tag. Thanks, ... PeterEasthope (discuss • contribs) 17:32, 9 February 2025 (UTC)