Hey Keith, This is more a topic for the people that work or have worked on the resource loader, and thus better suited for the wikitech-l mailing list, which I have now cc'd.
Cheers -- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. -- On 26 May 2013 14:48, Keith <[email protected]> wrote: > I am developing D3JS reports. > > Using: > SemanticResultFormats 1.9 alpha > SemanticMediaWiki 1.9 alpha > MediaWiki 1.19.6 > > I was developing with > $wgResourceLoaderDebug = true; > in LocalSettings.php and discovered that things broke when I turned that > off. > > Iron gave me this error: > > Uncaught SyntaxError: Unexpected token ) load.php:62 > < > http://qqw/load.php?debug=false&lang=en-gb&modules=ext.cite%2Crtlcite%7Cext.d3.core%7Cext.srf.qqw%7Cjquery.checkboxShiftClick%2CfootHovzer%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2Ctooltip%7Cmediawiki.action.watch.ajax%7Cmediawiki.api%2Cdebug%2Cuser%7Cmediawiki.api.watch%7Cmediawiki.debug.init%7Cmediawiki.page.ready&skin=vector&version=20130526T095551Z&* > > > > and Firefox: > > Error: SyntaxError: function statement requires a name > Line: 62, Column: 8 > Source Code: > function(x){var j=d3.bisect(domain,x,1,k)-1;return i[j](u[j](x));};} > > I tracked it down to line 2436 in resources/jquery/d3/d3.v3.js - > Version 3.0.4 is bundled with SRF 1.9a > > while (++j <= k) { > u.push(uninterpolate(domain[j - 1], domain[j])); > i.push(interpolate(range[j - 1], range[j])); > } > return*<load.php is line breaking HERE>* function(x) { > var j = d3.bisect(domain, x, 1, k) - 1; > return i[j](u[j](x)); > }; > > Now, the d3.js code reads ok to me, so I assume it is some unfortunate > coincidence that just happens to line break right there where it should > not. > > I first added a throwaway line at 2436 (foo=bar;) and that fixes it. > Then I replaced d3.js with version 3.1.8 of and that is also OK. > Also, of course, leaving $wgResourceLoaderDebug = true; in > LocalSettings.php is a work around. > > So, this is just a heads up that something is broken in that load.php > minifying code. I haven't looked at it at all. I'm just prototyping > stuff for D3JS and SMW/SRF at the moment. I'm really "doing my own > thing" but after I get my required functionality I might look at > mediawiki-ifying my code. I currently have some forced-directed graphs > working from Special:Ask. > > I notice that the problem does not occur with any of the other D3 graphs > that are implemented in SRF. > I took a quick look at the output of load.php with these resources and > effectively, that line break is not occuring in the sameplace. > > I can't figure out what is causing the problem. > > > Keith. > > _______________________________________________ > Semediawiki-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
