Jump to content

Wikibooks:Reading room/Technical Assistance

Add topic
This project page is move-protected.
From Wikibooks, open books for an open world
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.

Notice of change to MediaWiki:Common.js

[edit source]

I have added a snippet to MediaWiki:Common.js that allows users to load a script or stylesheet in the MediaWiki namespace by appending the withJS or withCSS parameter to a URL. See User:JJPMaster/sandbox for an example. JJPMaster (she/they) 10:33, 2 April 2025 (UTC)Reply

[edit source]

On MediaWiki:Sp-contributions-footer-anon and MediaWiki:Sp-contributions-footer, please change | type = system to | type = editnotice so that it can adapt to dark mode, thank you.

In addition to the above, we should also modify some of the message box subpages in which they should adapt to dark mode. For instance, the fmbox part when used on MediaWiki:Abusefilter-disallowed does not adapt to dark mode, and makes the currently white text hard to read in dark mode. Codename Noreste (discusscontribs) 21:50, 13 April 2025 (UTC)Reply

@Codename Noreste Just took care of the first part of the request. If you want to workshop specific changes to some of these templates, please feel free! I think an admin/IA can then implement. Cheers —Kittycataclysm (discusscontribs) 14:32, 26 April 2025 (UTC)Reply
Thank you for implementing my edit to the fmbox template! Could you also replace | type = system to | type = editnotice on MediaWiki:Noarticletext and MediaWiki:Noarticletext-nopermission to adapt to dark mode as well? Much appreciated. Codename Noreste (discusscontribs) 15:18, 1 May 2025 (UTC)Reply
Done! Cheers —Kittycataclysm (discusscontribs) 18:10, 1 May 2025 (UTC)Reply
@Codename Noreste: When should type=editnotice be used as opposed to type=system? JJPMaster (she/they) 16:17, 2 May 2025 (UTC)Reply
The thing is, | type = system uses a gray system color, which can interfere with the dark mode. Codename Noreste (discusscontribs) 17:39, 2 May 2025 (UTC)Reply
@Codename Noreste: In that case, should I just use AWB to replace all instances of type=system in system messages with type=editnotice? JJPMaster (she/they) 18:04, 2 May 2025 (UTC)Reply
Yes, but you should probably enable AWB's bot mode so that you don't flood the recent changes feed. Codename Noreste (discusscontribs) 18:08, 2 May 2025 (UTC)Reply

Background color in an unbulleted list.

[edit source]

Hi,

For the first three names in Oberon/hall#Additional_Contributors I've attempted to apply a background color. Can my Wikitext be adjusted to make the background color appear? Thanks, ... PeterEasthope (discusscontribs) 19:13, 22 April 2025 (UTC)Reply

Done using HTML and CSS rather than MediaWiki. —Justin (koavf)TCM 22:10, 22 April 2025 (UTC)Reply
Thanks, ... PeterEasthope (discusscontribs) 16:15, 25 April 2025 (UTC)Reply

You have a JavaScript error at MediaWiki:Common.js/Toolbox.js#L-183

[edit source]

Was just passing by, saw an error, wanna report.

Steps to reproduce:

  1. Go to https://en.wikibooks.org/w/index.php?title=Template:Book_title&action=edit (Vector 2022 skin)
  2. Open JS console
  3. Witness an error jQuery.Deferred exception: $.eachAsync is not a function that points to MediaWiki:Common.js/Toolbox.js#L-183.

JWBTH (discusscontribs) 08:16, 25 April 2025 (UTC)Reply

@Leaderboard @JJPMaster could you investigate? Thank you!! —Kittycataclysm (discusscontribs) 14:26, 26 April 2025 (UTC)Reply
I'm not that familiar with JavaScript, so will leave this for JJPMaster. Leaderboard (discusscontribs) 16:07, 26 April 2025 (UTC)Reply
 Working JJPMaster (she/they) 16:34, 26 April 2025 (UTC)Reply
@JWBTH, @Kittycataclysm, @Leaderboard: This should be fixed now. It looks like both this toolbox script and the special characters gadget are attempting to use a nonexistent jQuery method. After some investigation, it looks like they were trying to use a method defined in an unofficial script (this one). I have copied it over to MediaWiki:Common.js/jQueryAsync.js and imported it. JJPMaster (she/they) 17:17, 26 April 2025 (UTC)Reply
Hi @JJPMaster and thank you. Unfortunately, while this error was fixed, a new was introduced: mw.hook(...).add(...) is not a function when editing any page, e.g. [1]. You are trying to pass jQuery, mediaWiki to the return value of
mw.hook('eachAsync.ready').add(function() {
  // ...
})
which is not a function. I suggest to remove (jQuery, mediaWiki) at all since it's not used. JWBTH (discusscontribs) 05:50, 27 April 2025 (UTC)Reply
Done JJPMaster (she/they) 23:53, 27 April 2025 (UTC)Reply
[edit source]

Another bug report: I was visiting Wikibooks:Community Portal, and in dark mode I saw this:

Oh, look, @Xeverything11 already suggested an edit at MediaWiki talk:Sitenotice#Dark mode support. Their request has not been addressed in 4 months. JWBTH (discusscontribs) 08:35, 25 April 2025 (UTC)Reply

DoneKittycataclysm (discusscontribs) 14:34, 26 April 2025 (UTC)Reply

Help:Contents cut-off on Mobile view on phone

[edit source]

Just a quick note that when viewing Help:Contents on a phone with minerva (the mobile skin), the page is only partially shown; text is cut-off and pinch/zoom doesn't help. Commander Keane (discusscontribs) 11:28, 26 April 2025 (UTC)Reply

Thanks for the note! Which part is cut off? The right side? —Kittycataclysm (discusscontribs) 14:25, 26 April 2025 (UTC)Reply