Page MenuHomePhabricator

Have RL wrap all modules in (function($) { ... })(jQuery); to prevent noConflict() interference
Closed, ResolvedPublic

Description

With both a few day old revision and the newest SVN r.79244, skin: Vector:

Going to user preferences, the pages (User profile, Appearance, Date and time, Editing, etc.) appear correctly as tabs. However, clicking on any of these tabs results in no action - the javascript functionality behind is not working.

It could be a problem in combination with jquery. In principle, jquery is being loaded, we have Vector-extension running and the hideable menus on the left are ok. However, we have code in Mediawiki:Common.js, which is unable to pick up the jquery. Should the preferences-tab-click be implemented through jquery, there may thus be a more generic jquery problem behind it.


Version: 1.18.x
Severity: critical
URL: http://biowikifarm.net/test/Special:Preferences

Details

Reference
bz26507

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:21 PM
bzimport set Reference to bz26507.

I can't diagnose this without being able to view Special:Preferences, which I can't do without an account, which I can't create other than through a Citizendium-like request procedure. Can you give me a test account so I can poke at this?

Thanks for setting me up with a test account.

This line appears in the HTML source of your pages and should be removed:
<script type="text/javascript">var $j=jQuery.noConflict();</script>

Although of course the real issue is that some modules aren't properly wrapped in (function($) { ... })(jQuery); , which should really be done for *all* modules by the resource loader itself. Repurposing this bug for that.

(In reply to comment #2)

Although of course the real issue is that some modules aren't properly wrapped
in (function($) { ... })(jQuery); , which should really be done for *all*
modules by the resource loader itself. Repurposing this bug for that.

This was done in r79246. I also fixed some JS errors on the preferences page in r79245.

I confirm that the root cause for the failing preferences is the jQuery.noConflict() setting.