Greetings,
As you may know, the Wikimedia teach team has started to upgrade MediaWiki on some wikis. MediaWiki is the software that runs all Wikimedia wikis.
The most visible change for Wikimedia users will be the deployment of ResourceLoader [1].
ResourceLoader optimizes the use of JavaScript in MediaWiki, speeding up its delivery by compressing it sometimes, and cutting down on the amount of unused JavaScript that gets delivered to the browser in the first place.
The installation of ResourceLoader may cause compatibility issues with existing JavaScript code.
Trevor Parscal and Roan Kattouw, the main developers of ResourceLoader, will be available on IRC [2] on Monday, February 14th, at 18:00 (UTC) [3], to answer questions and help fix issues related to ResourceLoader.
*If you maintain JavaScript code on your home wiki, please attend.* Don't wait until your wiki's JavaScript is all broken.
Please spread this information as widely as possible; it's critical to reach as many local JavaScript maintainers as possible.
Logs of the session will be published publicly.
[1] http://www.mediawiki.org/wiki/ResourceLoader [2] http://meta.wikimedia.org/wiki/IRC_office_hours [3] All timezones: http://ur1.ca/3819u
What kind of issues are expected concretely?
Is there any kinds of checklist or todo?
-------- Original Message -------- Subject: [Wikitech-l] [ResourceLoader] JavaScript may break on your wiki: Fix it before that happens From: Guillaume Paumier gpaumier@wikimedia.org To: Wikimedia Foundation mailing list foundation-l@lists.wikimedia.org, Wikimedia Developers wikitech-l@lists.wikimedia.org, Coordination of technology deployments across languages/projects wikitech-ambassadors@lists.wikimedia.org Date: 2011年2月12日 18:49:27
Greetings,
As you may know, the Wikimedia teach team has started to upgrade MediaWiki on some wikis. MediaWiki is the software that runs all Wikimedia wikis.
The most visible change for Wikimedia users will be the deployment of ResourceLoader [1].
ResourceLoader optimizes the use of JavaScript in MediaWiki, speeding up its delivery by compressing it sometimes, and cutting down on the amount of unused JavaScript that gets delivered to the browser in the first place.
The installation of ResourceLoader may cause compatibility issues with existing JavaScript code.
Trevor Parscal and Roan Kattouw, the main developers of ResourceLoader, will be available on IRC [2] on Monday, February 14th, at 18:00 (UTC) [3], to answer questions and help fix issues related to ResourceLoader.
*If you maintain JavaScript code on your home wiki, please attend.* Don't wait until your wiki's JavaScript is all broken.
Please spread this information as widely as possible; it's critical to reach as many local JavaScript maintainers as possible.
Logs of the session will be published publicly.
[1] http://www.mediawiki.org/wiki/ResourceLoader [2] http://meta.wikimedia.org/wiki/IRC_office_hours [3] All timezones: http://ur1.ca/3819u
2011/2/12 "青子守歌 (aokomoriuta)" maillist@enmps.net:
What kind of issues are expected concretely?
Is there any kinds of checklist or todo?
Trevor probably knows more about this, but what I can tell you at least is that some wikis load their own version of jQuery in their site JS, which can break things terribly because plugins can get deregistered. Also, site JS overwriting jQuery with a different version can obviously cause issues.
A few subtleties with regards to the timing of JS loading and execution have changed, but Trevor is really the person to ask about that. Also, site and user JS/CSS is now served from bits.wikimedia.org as well, which means things like relative @import statements in CSS are broken at this time; we're working on a fix for that.
Roan Kattouw (Catrope)
Thank you for your advice.
You mean we should be careful about upgrading jQuery's version if the script uses jQuery, i.e. the problem you refer to is not caused if we dont' use jQuery, right?
-------- Original Message -------- Subject: Re: [Wikitech-l] [ResourceLoader] JavaScript may break on your wiki: Fix it before that happens From: Roan Kattouw roan.kattouw@gmail.com To: Wikimedia developers wikitech-l@lists.wikimedia.org Date: 2011年2月12日 20:23:14
2011/2/12 "青子守歌 (aokomoriuta)"maillist@enmps.net:
What kind of issues are expected concretely?
Is there any kinds of checklist or todo?
Trevor probably knows more about this, but what I can tell you at least is that some wikis load their own version of jQuery in their site JS, which can break things terribly because plugins can get deregistered. Also, site JS overwriting jQuery with a different version can obviously cause issues.
A few subtleties with regards to the timing of JS loading and execution have changed, but Trevor is really the person to ask about that. Also, site and user JS/CSS is now served from bits.wikimedia.org as well, which means things like relative @import statements in CSS are broken at this time; we're working on a fix for that.
Roan Kattouw (Catrope)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Another thing: The html might have changed at a few places (for example galleries), so scripts which do some dom manipulation could be affected as well
Leo On Saturday, February 12, 2011 at 10:53 PM, "青子守歌 (aokomoriuta)" wrote:
Thank you for your advice.
You mean we should be careful about upgrading jQuery's version if the script uses jQuery, i.e. the problem you refer to is not caused if we dont' use jQuery, right?
-------- Original Message -------- Subject: Re: [Wikitech-l] [ResourceLoader] JavaScript may break on your wiki: Fix it before that happens From: Roan Kattouw roan.kattouw@gmail.com To: Wikimedia developers wikitech-l@lists.wikimedia.org Date: 2011年2月12日 20:23:14
2011/2/12 "青子守歌 (aokomoriuta)"maillist@enmps.net:
What kind of issues are expected concretely?
Is there any kinds of checklist or todo?
Trevor probably knows more about this, but what I can tell you at least is that some wikis load their own version of jQuery in their site JS, which can break things terribly because plugins can get deregistered. Also, site JS overwriting jQuery with a different version can obviously cause issues.
A few subtleties with regards to the timing of JS loading and execution have changed, but Trevor is really the person to ask about that. Also, site and user JS/CSS is now served from bits.wikimedia.org as well, which means things like relative @import statements in CSS are broken at this time; we're working on a fix for that.
Roan Kattouw (Catrope)
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
青子守歌 aokomoriuta
e-mail: aokomoriuta@enmps.net URL: http://bgs.jpn.ph/ blog: http://bgs.jpn.ph/blog/ twitter: http://twitter.com/aokomoriuta jawp: http://ja.wikipedia.org/wiki/User:aokomoriuta mixi: http://mixi.jp/show_friend.pl?id=19926155 ========================================================
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
2011/2/12 "青子守歌 (aokomoriuta)" maillist@enmps.net:
Thank you for your advice.
You mean we should be careful about upgrading jQuery's version if the script uses jQuery, i.e. the problem you refer to is not caused if we dont' use jQuery, right?
It's not so much about using jQuery as it is to try and include your own jQuery. Local scripts should not attempt to include or provide jQuery in anyway; MediaWiki will provide jQuery for you, and any attempts to include jQuery yourself will just break things.
Roan Kattouw (Catrope)
Guillaume Paumier wrote:
The installation of ResourceLoader may cause compatibility issues with existing JavaScript code.
It'd be nice to have a list of things that will definitely be problematic (must be fixed), things that might be problematic (should be fixed), and things that are generally discouraged (can be fixed).
For example, Meta-Wiki was returning completely blank pages due to the use of document.write() on pages that contained a particular CSS class. If document.write() is completely disallowed, it should be noted somewhere prominently along with other problematic or possibly problematic bits of code. I briefly checked http://www.mediawiki.org/wiki/ResourceLoader but didn't see this kind of list off-hand.
I wrote http://www.mediawiki.org/wiki/ResourceLoader/Coding_changes as a stub, though shortly after doing so, I discovered http://www.mediawiki.org/wiki/ResourceLoader/Documentation/Migration_guide which was commented out from the list of documentation pages. It may or may not make sense to merge these pages (it's still a little unclear to me who the migration guide is intended for).
MZMcBride
2011/2/13 MZMcBride z@mzmcbride.com:
For example, Meta-Wiki was returning completely blank pages due to the use of document.write() on pages that contained a particular CSS class. If document.write() is completely disallowed, it should be noted somewhere prominently along with other problematic or possibly problematic bits of code. I briefly checked http://www.mediawiki.org/wiki/ResourceLoader but didn't see this kind of list off-hand.
document.write() is risky and usually evil, and should not be used unless you know exactly what you're doing. Specifically, ResourceLoader itself uses document.write() in one case, and checks that it's safe before it calls it. In scripts loaded by RL, using document.write() is almost always if not always unsafe. You're right that we should probably list this, but I'd forgotten about this subtlety.
Roan Kattouw (Catrope)
Hi all,
Starting with the wikis that have already been switched I'll make making a sweep accross all wikis checking for broken stuff.
Anything directly related and/or broken with 1.17 I will attempt to fix right away. Things I see more than one wiki will be noted on the migration guide [1] right away so that others can find and reference it as well.
Other things (like outdated versions of copied/pasted gadgets) I will do in a second round. Scripts that need a rewrite I will post under jQuery snippets [2] or as an importable gadget [3] (depending on the complexity)
Please note that all core modules are (or soon will be) documented at:
http://www.mediawiki.org/wiki/ResourceLoader/Default_modules
A complete table with all before/after of now-deprecated JavaScript from the mediawiki.legacy module can be found at:
http://www.mediawiki.org/wiki/ResourceLoader/JavaScript_Deprecations
If you come accross any broken JavaScript or need help or otherwise can't find a solution I'd like to refer to the migration guide's talk page as a central place for these questions:
http://www.mediawiki.org/wiki/Talk:ResourceLoader/Migration_guide_(users)
-- Krinkle
[1] http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(users) [2] http://www.mediawiki.org/wiki/jQuery_snippets [3] http://meta.wikimedia.org/wiki/User:Krinkle/Tools#Scripts
MZMcBride wrote:
Guillaume Paumier wrote:
The installation of ResourceLoader may cause compatibility issues with existing JavaScript code.
It'd be nice to have a list of things that will definitely be problematic (must be fixed), things that might be problematic (should be fixed), and things that are generally discouraged (can be fixed).
For example, Meta-Wiki was returning completely blank pages due to the use of document.write() on pages that contained a particular CSS class. If document.write() is completely disallowed, it should be noted somewhere prominently along with other problematic or possibly problematic bits of code. I briefly checked http://www.mediawiki.org/wiki/ResourceLoader but didn't see this kind of list off-hand.
I wrote http://www.mediawiki.org/wiki/ResourceLoader/Coding_changes as a stub, though shortly after doing so, I discovered http://www.mediawiki.org/wiki/ResourceLoader/Documentation/Migration_guide which was commented out from the list of documentation pages. It may or may not make sense to merge these pages (it's still a little unclear to me who the migration guide is intended for).
MZMcBride
I've moved the page to: http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(users) And the other one to: http://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_(developers)
The other page is/will be more oriented on the backend (ie. what Extensions developers should change, how to load the files, where to define the modules, etc.)
Which, in turn, reminds me of: http://www.mediawiki.org/wiki/ResourceLoader/Documentation/Using_with_extens... Which should probably be merged into Migration_guide_(developers).
-- Krinkle
2011/2/12 Guillaume Paumier gpaumier@wikimedia.org:
Trevor Parscal and Roan Kattouw, the main developers of ResourceLoader, will be available on IRC [2] on Monday, February 14th, at 18:00 (UTC) [3], to answer questions and help fix issues related to ResourceLoader.
Reminder: this is half an hour from now in #wikimedia-office.
Roan Kattouw (Catrope)
wikitech-l@lists.wikimedia.org