User talk:Virenerus

From PathfinderWiki
Latest comment: 26 March by Oznogon in topic Invalid template parameter checks

Please note the /Archive for issues and suggestions that have been resolved or are otherwise no longer active.

Issues

Form edits on book Facts pages can remove all authors

I moved the blurb from Treasure Vault to the fields on Facts:Treasure Vault using Form:Book and the resulting edit silently removed the Primary Authors and Authors fields. (diff)

I restored them from the diff using the source editor. To confirm this was reproducible, I moved the quote blurb header from the article to the Facts page using the form editor and clicked "Show changes" to confirm that the authors would not be removed. The diff view confirmed that the authors would not be removed. Upon saving the Facts page from the form editor, the authors were again silently removed despite the change preview indicating otherwise. (diff) -Oznogon (talk) 22:36, 14 January 2025 (UTC)Reply[reply]

That is really scary. I am not sure what is happening here. I can not imagine how this could be a fault on our end. Must be a bug in the form extension. After the next update I will check again if this still happens and create a bug report there. Virenerus (talk) 21:20, 19 January 2025 (UTC)Reply[reply]

Suggestions

Technological improvements

I have three suggestions regarding potential technological improvements of the PathfinderWiki.

  • Create a special parameter or keyword that editors can assign to an image file to select it as a representation of the best available illustration of an image category. This parameter would alter the file's appearance in all image categories it's part of with a different frame, background color, highlight, or similar indicator. For example, given the special parameter, the Abadar.jpg file in Category:Images of Abadar could be surrounded by a red box instead of the white one it currently has. This would help to detect erroneous image categorization at a glance and is further discussed on my talk page.
  • Set all characters except spaces, or at least apostrophes specifically, to function the same way letters do in link highlighting. Both dogs and dog's should highlight the entire word instead of stopping at the first non-alphabetical character found and requiring a pipe to achieve the same effect—dog's.
  • Consolidate and automate the creation process of redirects with the creation of the pages they target. This would likely involve manually listing all desired redirects within the target page, similarly to listing the categories of an article. Except the redirect list would automatically generate every redirect page listed upon the article's creation, and renaming the target page would automatically retarget all of its redirect pages in bulk. Meanwhile, changes to the redirect list within the target page should automatically move, rename or delete the appropriate redirect pages. This is discussed in further detail on Help talk:Redirect.

The automation of redirects is a particularly challenging endeavor, but hopefully the other two suggestions are more feasible. Thanks. --Rexert (talk) 00:06, 20 March 2025 (UTC)Reply[reply]

For context as a previous tech admin, I'm not aware of core MediaWiki options to facilitate these. If no extension provides a solution out of the box, each would likely require a bespoke solution that Virenerus or a future tech admin would have to create and maintain indefinitely.
  • Highlighting specific images within a category page would likely require some form of extension since adding conditional CSS classes to category lists would require attaching to MediaWiki hooks (probably in CategoryViewer). A combination of installing and configuring Extension:Highlight Links in Category, categorizing each image to be highlighted, and narrowly scoping CSS limited to the category namespace/NS 6 in a Gadget might be able to accomplish it, but only if the extension also adds CSS classes to links in category pages. The extension has also not been maintained for four years, and its last supported version of MediaWiki is one that's out of upstream support.
Either way, I'm not sure this improves the more fundamental editor-side labor issue of manually categorizing images to highlight them. (An alternative to categorization might be implementing semantic data in File namespace content and adding an attribute, but the category listings would still require an extension to hook into the list rendering to highlight them.)
  • Linktrail rules (word-ending links/[[word]]s) are defined in MediaWiki and controlled by localization. I don't know what specifically would be required, but linktrail rules might be modifiable by manually editing the $linkTrail rules directly in the translation. However, customizing linktrails in this manner would make updating MediaWiki more difficult, since the bespoke modifications would have to be tested against and patched into every MediaWiki update's updated translations.
An alternative might be to create and maintain an external text replacement bot that attempts to replace wikitext links, such as replacing [[(.*?)]]'([a-z]*) with [[$1|$1'$2]], potentially with additional lookarounds to avoid breaking surrounding punctuation or markup (for instance, to avoid false-positive matching a link in ''[[italics]]'' versus ''[[plural possessive links]]''' in italics.)
  • Automating the work around renaming an article might be the easiest of the three, and also the most valuable since moving and renaming articles and their corresponding category trees and Meta pages is labor-intensive and manual. Doing so would likely require an external automated bot and a parameterized template to trigger the bot.
The labor of listing redirect targets manually within the target articles as proposed would likely be unnecessary or redundant if the bot itself can store and track the states of redirects and their associated target articles (via the allredirects API), and vice versa (via the redirects API).
-Oznogon (talk) 02:48, 20 March 2025 (UTC)Reply[reply]

Invalid template parameter checks

wiktionary:Module:checkparams provides a Scribunto module that can be added to individual templates to flag invocations that pass invalid parameters, such as misspelled parameter names or parameters not supported by the template. This module can flag warnings on edit previews, generate banners, and categorize pages with invalid parameters.

{{Infobox}} and {{File}} templates in particular have some easily botched parameter names, like 2e-sanctification or keyword1.... Simplifying such parameters or replacing them with semantic data might alleviate these issues, but it's likely that some templates could always benefit from validating parameter names. -Oznogon (talk) 19:40, 26 March 2025 (UTC)Reply[reply]