Last modified: 2014-09-20 19:11:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T10761, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8761 - Template transclusion done "behind the scenes" when saving a user .js page
Template transclusion done "behind the scenes" when saving a user .js page
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.10.x
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/WP:VPT#P...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-25 04:09 UTC by Ilmari Karonen
Modified: 2014-09-20 19:11 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ilmari Karonen 2007-01-25 04:09:26 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]]
Comment 1 ais523 2007-01-25 08:52:13 UTC
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.
Comment 2 Helder 2011-04-03 13:23:25 UTC
(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?
Comment 3 Dan Collins 2011-07-18 04:25:33 UTC
This problem may be a duplicate of bug 8449.
Comment 4 Andre Klapper 2014-08-23 19:35:11 UTC
(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?
Comment 5 Helder 2014-08-23 19:52:31 UTC
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.
Comment 6 Jackmcbarn 2014-09-20 18:38:25 UTC
(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 ***
Comment 7 Helder 2014-09-20 18:53:13 UTC
This is not a duplicate. See comment 5.
Comment 8 Jackmcbarn 2014-09-20 19:11:07 UTC
IMO, bug 8449 was never completely fixed, and this is just another symptom of it.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links