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:SLT)
Latest comment: 2 days ago by Koavf in topic Duplicate identifiers?
ArchivesWikibooks Discussion Rooms
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

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

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.

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

WikiProject Little Star Newsletter: January 2025

[edit source]

The 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

[edit source]

This 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

[edit source]

Xeverything11 has spent a significant amount of time helping to ensure that templates and interface messages are accessible and dark mode-compliant.

markAdmins

[edit source]

JJPMaster (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

[edit source]

JJPMaster 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

[edit source]

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

This 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 (discusscontribs) 05:16, 2 February 2025 (UTC)Reply

Duplicate identifiers?

[edit source]

Hi, On the Oberon/Text page, lintHint reports 4 instances of duplication of identifiers. Can someone spot a duplication? Thx, ... PeterEasthope (discusscontribs) 15:39, 9 February 2025 (UTC)Reply

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)TCM 15:49, 9 February 2025 (UTC)Reply
The div is empty but provides a fragment identifier to link to; but the identifier should be in the table tag. Thanks, ... PeterEasthope (discusscontribs) 17:32, 9 February 2025 (UTC)Reply
Okay, but why not use Template:Anchor or a span? Why include a blockline element? —Justin (koavf)TCM 17:50, 9 February 2025 (UTC)Reply