Last modified: 2011-12-09 16:56:32 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 T34450, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32450 - Scripts pages in MediaWiki: namespace parsed like wiki pages
Scripts pages in MediaWiki: namespace parsed like wiki pages
Status: RESOLVED DUPLICATE of bug 32858
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.18.x
All All
: Normal major with 1 vote (vote)
: ---
Assigned To: Antoine "hashar" Musso (WMF)
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-16 22:17 UTC by DavidL
Modified: 2011-12-09 16:56 UTC (History)
4 users (show)

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


Attachments

Description DavidL 2011-11-16 22:17:42 UTC
Since MediaWiki 1.18 script pages of the MediaWiki namespace (having .js and .css extensions) are parsed like any other pages (link, category, ...).

This is a problem because it creates weird category names like for the following example script: https://fr.wikibooks.org/w/index.php?title=MediaWiki:Gadget-HotCats.js&oldid=347262
which was added in the following category: https://fr.wikibooks.org/wiki/Cat%C3%A9gorie:%22_+_hrc_+_%22

The problem is more critical when the script include some string like "{{subst:" because when the script is modified the template is substituted in the source code.

Script pages should not be parsed as other Wiki pages.
Comment 1 Antoine "hashar" Musso (WMF) 2011-11-17 14:42:08 UTC
I can reproduce the issue in both REL1_18@r103457 and trunk@r103448 

Any content such as [[Category:foo]] is parsed and the MediaWiki:bar.js page is added to that category.
Comment 2 Antoine "hashar" Musso (WMF) 2011-11-17 16:47:27 UTC
Patch send for REL1_19 with r103476
Comment 3 Antoine "hashar" Musso (WMF) 2011-11-17 16:52:26 UTC
Code review will let us know if we want to backport this.

Please note I have not tested how it worked in 1.17. This might or might not be a 1.18 regression.
Comment 4 DavidL 2011-11-17 17:25:19 UTC
I think it's a regression because when I modified these scripts, I haven't seen the problem when MW 1.17 was in use on Wikimedia projects.

Thanks for r103476 about Category.
What about the {{subst: problem in scripts ?
Comment 5 db [inactive,noenotif] 2011-11-17 18:10:00 UTC
There were stored in database before 1.17, but not shown at the bottom of the page, see bug 17525. This is maybe changed with 1.18.
Comment 6 Krinkle 2011-12-06 21:41:54 UTC
(In reply to comment #4)
> Thanks for r103476 about Category.
> What about the {{subst: problem in scripts ?

Please be careful as many systems currently DEPEND on the fact:
* that subst: is expanded on saving js/css
* that tables pagelinks/imageslinks/globalfileusage are populated for [[links]] from js/css comments.

Is this about about the population of those tables or about action=view ? (or both).
Comment 7 Platonides 2011-12-08 17:33:50 UTC

*** This bug has been marked as a duplicate of bug 32858 ***
Comment 8 DavidL 2011-12-08 17:54:46 UTC
But this bug has been opened before 32858...
Comment 9 Platonides 2011-12-09 16:56:32 UTC
I merged several bugs to bug 32858 since it seemed to be the most clear.

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


Navigation
Links