Last modified: 2014-09-20 19:11:07 UTC
If a user .js page (such as User:Foo/monobook.js) contains something that looks like template transclusion syntax, it is apparently parsed as such behind the scenes when the page is saved. The transcluded template is never actually shown to the user, since such pages are shown as raw wikitext, but if the template contains any category links, the .js page gets placed in those categories (although no categories are shown on the page itself) and is listed on Special:Whatlinkshere as transclusing the template. Fixing this properly may be somewhat tricky, since the fact that wikilinks (including category links) and {{subst:...}} are parsed even on user .js pages is generally considered a desirable feature. (The former is used for keeping track of which user .js pages include which scripts, while the latter is used for including standard boilerplate code.) Ideally, the pages should probably go through the pre-save transform (for "subst:") and get parsed for wikilinks, but _not_ for (non-subst) transclusions. As a workaround, any occurrences of "{{" in user JavaScript may be mangled (for example as "{"+"{") or the entire script (or just the affected parts) may be wrapped in commented-out <nowiki> tags. However, using <nowiki> also disables subst: and link tracking. Example pages: [[User:Ilmari Karonen/foo.js]] [[User:Ilmari Karonen/Template with category]] [[Category:Wikipedia user Ilmari Karonen's nonexistent test category]]
Note that most WMF wikis, at least, use templates for the 'owner' of a user subpage to request its deletion. Trying to place a {{db-user}} template on a .js subpage of my own (on the English Wikipedia), I found that the category didn't appear and the page wasn't in [[CAT:CSD]] (but other users reported that the category did appear when they tried it, so it's possible that this is an intermittent bug). So having categories in templates appear on .js pages is a desirable feature sometimes, but not always, and its operation appears to be intermittent at the moment.
(In reply to comment #1) > Note that most WMF wikis, at least, use templates for the 'owner' of a user > subpage to request its deletion. Trying to place a {{db-user}} template on a .js subpage of my own (on the English Wikipedia), I found that the category didn't appear and the page wasn't in CAT:CSD (but other users reported that the category did appear when they tried it FWI: This was my case: after I added {{delete}} to my [[JS]] and [[CSS]] pages, I noticed the page was added to the [[Category:Speedy deletion]], but the link to that category was not displayed in the footer of the pages (making me think I did something wrong, until I looked at the category itself) Is this problem related to Bug 17525?
This problem may be a duplicate of bug 8449.
(In reply to Dan Collins from comment #3) > This problem may be a duplicate of bug 8449. Yeah, sounds like. Anybody eles agreeing that this is a dup?
I don't think so. I think that problem is fixed, because nowadays templates are not expanded in any way that would increase the size of JS and CSS pages.
(In reply to Andre Klapper from comment #4) > (In reply to Dan Collins from comment #3) > > This problem may be a duplicate of bug 8449. > > Yeah, sounds like. Anybody eles agreeing that this is a dup? Yes. *** This bug has been marked as a duplicate of bug 8449 ***
This is not a duplicate. See comment 5.
IMO, bug 8449 was never completely fixed, and this is just another symptom of it.