LukeWoodward / SplitsBrowser

Orienteering results analysis
GNU General Public License v2.0
13 stars 9 forks source link

javascript error #31

Closed euproprio closed 9 years ago

euproprio commented 9 years ago

Hello, I'm gettings this javacript error when I open every event.

d3.v3.min.js:1 Uncaught TypeError: Cannot read property 'documentElement' of undefined

I'm using Google Chrome version

Version 40.0.2214.94 m

Maprunner commented 9 years ago

This is a bit strange. I am getting the same problem for all RG2 links to Splitsbrowser. The problem shows up for version 3.3.3 and 3.3.4, and you are also getting it on the Splitsbrowser.co.uk site.

The line causing the problem for RG2 links is 486 in si-reader.js return new CourseClass(className, courseClass.numControls, courseClass.competitors);

This generates an "undefined is not a function" exception.

The only thing that looks like it could have changed is d3, which I'm loading from their CDN: <script type="text/javascript" src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>

I'll look a bit further later, but need to go the Southern Champs now.

LukeWoodward commented 9 years ago

I'm looking into it.

LukeWoodward commented 9 years ago

This issue should now be fixed in 3.3.5. Sorry about this.

There looks to have been a change to d3, which caused d3.select(document) to fail, when it has previously worked. I only used this in one place, and it's easy enough to change it to d3.select(document.body), so I've done that.

Maprunner commented 9 years ago

d3 released a new version this evening, so 3.3.4 now works again.

Splitsbrowser 3.3.5 is still working OK so I guess you can leave the change in.

By the way, splitsbrowser.co.uk is still running 3.3.4.

LukeWoodward commented 9 years ago

@Maprunner : Thanks for the info.

I asked the maintainer of splitsbrowser.org.uk to upgrade SplitsBrowser to 3.3.5, but now that the issue with d3 has been fixed I've let him know that the upgrade is no longer urgent.