Last modified: 2014-07-08 00:07:45 UTC
From https://bugzilla.mozilla.org/show_bug.cgi?id=854395 To test a minimization problem, I created a page in the sandbox. This resulted in a JS error when clicking "show" (preventing the toggle from working). Adding &debug=true to the URL -- to stop JS minimization -- allows the toggle to work without an error. https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=664164 https://www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=664164&debug=true
This has nothing to do with minification. Class "collapsible" is something that is handled by a community maintained gadget. A gadget that is several years old having many (mostly unmaintained) copies on many wikis. It has been failing on various wikis where the old version is still used that assumes the legacy loading method where everything is a global variable. The reason it works in debug mode is because in debug mode the scripts are loaded via <script> in the global scope. The solution is to either: * Upgrade your copy of the community-maintained "collapsible" gadget on your wiki. * Use mw-collapsible instead (which is handled by jquery.makeCollapsible).
v2.0 of the legacy gadget: https://www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-collapsibleTables.js&diff=next&oldid=664182
Thank you!
The old installation of wiki.mozilla.org did not have the Gadgets extension installed, so it didn't use the old gadget. The new Gadget would work as would mw-collapsible. Ideas?
(In reply to comment #4) > The old installation of wiki.mozilla.org did not have the Gadgets extension > installed, so it didn't use the old gadget. The new Gadget would work as > would mw-collapsible. Ideas? If they don't have the Gadgets extension installed they likely have it in their Common.js, so upgrade it there instead.
(In reply to comment #4) > The old installation of wiki.mozilla.org did not have the Gadgets extension > installed, so it didn't use the old gadget. The new Gadget would work as > would mw-collapsible. Ideas? If they don't have the Gadgets extension installed they likely have it in their Common.js, so upgrade it there instead. (Quoting comment #1) > The solution is to either: > > * Upgrade your copy of the gadget on your wiki. > > * Use mw-collapsible instead (which is handled by jquery.makeCollapsible). In their case, since they have a lot of existing pages with "collapsible", is probably best to upgrade it and from now no slowly migrate to using mw-collapsible instead. Alternatively if they don't mind not having collapsible tables on old pages (it's only a minor enhancement) they could decide to simply remove the old broken code from their Common.js and just use core's mw-collapsible from now on.