Page 1 of 2

Trends and IE11

Posted: Thu 15 Jan 2015 2:46 am
by BCJKiwi
win7pro
CumulusMX 3.0.0 b3006, 7, 8

When opening trends.htm, very occasionally (as in almost never) the temperature chart appears but usually no matter how long one waits no chart appears. Clicking a button brings it up OK.
With Chrome and FF it displays right away on both Public and LAN.

This behaviour is the same on both local LAN development webserver and on Public hosted webserver with Win 8.1.

A win7 PC with IE11 seems to behave in a similar manner but with the exception that it is OK first time up (both Local and Public) but does not come up the next time around - i.e. if you navigate away then come back.

While fiddling around checking the detail for this post with IE11 F12 debugger open received this:-
in File: d3.v3.js, Line: 1036, Column: 5

Code: Select all

d3_selectionPrototype.call = function(callback) {
    var args = d3_array(arguments);
    callback.apply(args[0] = this, args);
Unable to get property 'apply' of undefined or null reference
    return this;
  };
Hopefully this may help but then again it may just be my setup??!

Re: Trends and IE11

Posted: Thu 15 Jan 2015 8:12 am
by BCJKiwi
Further to the last post, I now realise that IE11 will not show any new chart data - the data has frozen since mid afternoon. Updated to b3008 just before 2 pm.

However the files are being created by CumulusMX in the exe folder (C:\CumulusMX\) and sent to the webserver(s).

With Chrome, the temp chart loads on running trends.htm with up to date data on both the LAN and Public webservers.

Re: Trends and IE11

Posted: Thu 15 Jan 2015 8:52 am
by steve
I've spent a few minutes trying to reproduce this (with my web site), but I can't. What are your ftp settings - do you have 'rename' set and 'delete before upload' unset? Does this happen in the user interface as well? Can you give a link to your public trends page?

Re: Trends and IE11

Posted: Thu 15 Jan 2015 9:14 am
by henkg
BCJKiwi wrote:Further to the last post, I now realise that IE11 will not show any new chart data.
When viewing the published trends webpage?
With IE11 this happens to me every now and then. Refresh / F5 / Ctrl F5 does not help.
Closing all browser sessions does help. It must be something with IE11 caching.

Re: Trends and IE11

Posted: Thu 15 Jan 2015 11:14 am
by mcrossley
I managed to catch this on BCJKiwi's web site (I'm not publishing the standard pages). You have to have the browser cache enabled in the dev tools window.

Seems to be a timing thing with IE11.

The error occurs in doTemp() which is being called as the callback function from the initial json data fetch.

The problem is that 'tempChart' is still = undefined at that point (as are all the other charts)

The json data has been fetched from browser cache, so it is really quick, and the exception occurs before the page has (visibly) drawn in the browser window. The DOM does not contain the temp chart either.

As the createTemp() is called before doTemp(), then the d3 code must be delaying the creation of the chart - or it is event driven.
Capture.PNG

Re: Trends and IE11

Posted: Thu 15 Jan 2015 11:19 am
by mcrossley
You don't seem to be able to edit the script source on the fly in the IE11 dev tools.

What I would try is altering the call to doTemp() at line 13 in cumuluscharts.js to...

setTimeout(doTemp,5);

This will halt the javascript execution and allow events to be processed, maybe the chart will be drawn then before the event to call doTemp() which should be at the end of queue.

Re: Trends and IE11

Posted: Thu 15 Jan 2015 11:20 am
by steve
mcrossley wrote:As the createTemp() is called before doTemp(), then the d3 code must be delaying the creation of the chart - or it is event driven.
I was hitting some odd errors that looked 'impossible' when I was fixing the axis legends issue, that made me think the same.

Re: Trends and IE11

Posted: Thu 15 Jan 2015 11:27 am
by steve
It appears that nv.addGraph() is deliberately asynchronous - https://github.com/novus/nvd3/issues/737

We could perhaps try not using it, as in the example quoted?

Re: Trends and IE11

Posted: Thu 15 Jan 2015 11:32 am
by mcrossley
Yes, for the tempGraph anyway, it is probably beneficial to create the others asynchronously. Indeed those createXxx's could be moved to after the call to doTemp()

Re: Trends and IE11

Posted: Thu 15 Jan 2015 12:06 pm
by BCJKiwi
Thanks,
I thought I was going mad for a while.
Will wait for you gurus to sort this - have no experience with this code so don't want to make it worse - have plenty of other things to do (like try all this with the Saratoga templates :roll:).

Mark - how does the site look? Have pretty much everything working including the scripts I developed and published.
Most were good with only folder name changes.
As you probably noticed there is no wind, rain or solar. The config is for the working VP2 with Solar but the CumulusMX testing is being done on a VUE which is sitting inside so high/close inside/outside temp and humidity.
Any other glaring gotchas?

Also have no familiarity with the SS gauges. What period to the popups cover - the period appears to reset a midnight so the high/low is only for the current day so far rather than 24hrs as for the charts - is that normal?

Keep up the good work - it is very much appreciated and one almost feels guilty for raising these issues but that is what the beta phase is all about!

Re: Trends and IE11

Posted: Thu 15 Jan 2015 12:29 pm
by mcrossley
Yep the site looked good from what I saw.

You could always configure your Vue console to receive data from the VP2 ISS for testing?

Yep the gauges use "today's" min/max figures. There are no web tags available for min/max data over a period.

They would have to be added to the <#recentXXX> tags, so something like <#recentTempMax h=24>, but that isn't how the recent tags currently work, they give you the reading at a point in time rather than the min/max/avg over a specified period, and even if it were possible, I wouldn't dare ask Steve to consider it for about another year with all the work he is putting in to MX!

Re: Trends and IE11

Posted: Thu 15 Jan 2015 7:35 pm
by BCJKiwi
The VP2 is cabled so no chance of that unfortunately but good suggestion.
Do copy the Cumulus1 data folder across from to time to time to get some of the info for a quick check.

Re: Trends and IE11

Posted: Thu 15 Jan 2015 8:05 pm
by BCJKiwi
Should mention that there seems to be an inordinate amount of caching going on in IE11 - it seems to get worse over time - presumably with the updates from M$oft.

e.g. loading the home page this morning after closing it last night, still brings up the night background on my cloudbase script and requires a page refresh to load the page properly to get the current day background - just plain nuts.
Fiddled with the settings in IE!! but have not fixed that.
Also found it won't update changes in .js scripts unless the page is off for some 3 hrs or so.

Would really like to know where to change the settings in IE11 to sort that. It does not respect server side instructions to the browser - lots of verbiage from M$oft on how it should be done but nothing seems to work Grrrr.

### end of rant! ###

Re: Trends and IE11

Posted: Thu 15 Jan 2015 8:28 pm
by mcrossley
Chrome is caching mostly everything too, maybe instead of setting no-cache, you should try setting a short TTL instead? The browsers do seem to respect that - I use various times on my web server for different files and MIME types.

Re: Trends and IE11

Posted: Fri 16 Jan 2015 12:03 am
by BCJKiwi
Thanks Mark,
tried the ttl option - followed M$oft example exactly - still did not work.

If you have it working with IE11 would appreciate some tips - was testing it on the Saratoga scripts.