Page 1 of 1

Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Thu 17 Dec 2020 9:18 am
by flort
The release notes for build 3097 says it fixed broken logfile, extralogfile, and dayfile editors in b3096, however, the logfile editor is still not working for me.

When I save my changes I get an error "Error! Response code: 404 There was an unknown error!" As the dayfile editor is working I assume it is a problem with datalogs.js possibly not identifying the correct datalog file to update.

Can someone please provide some assistance.

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Thu 17 Dec 2020 11:20 am
by freddie
Have you flushed your browser cache? It could be that you are accessing cached versions of files that have changed.

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Thu 17 Dec 2020 11:32 am
by flort
Yes, I have cleared cached images and files several times.

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Thu 17 Dec 2020 11:39 am
by freddie
Okay, next step is to ensure that all files in the /interface directory were copied across from the distribution file when you upgraded.

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Thu 17 Dec 2020 11:47 am
by flort
I copied across all the files from the download but I have modified the following -
index.html
charts.html
chartshistoric.html
charts.js

This was to allow for my own customisations to the interface. I don't think any of the changes should have impacted on the functionality as everything else is working fine.

I downloaded the installation files again tonight and copied across datalogs.js but it hasn't made any difference.

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Thu 17 Dec 2020 12:00 pm
by freddie
I would do a fresh extraction and reapply your changes - not just the interface contents but the executable too and it's library dependencies. Your 404 could have come from a call to a data endpoint that was missing rather than a missing file.

I would also do a fresh install elsewhere on your filesystem and independently test from that. I used the logfile editor yesterday and it was working for me.

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Thu 17 Dec 2020 12:06 pm
by flort
Thanks. I'll give all of that a go tomorrow and let you know the outcome.

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Thu 17 Dec 2020 10:35 pm
by flort
I did a separate install in a different location and the logfile editor still doesn't work. I didn't change any of the configuration files so everything was standard in the downloaded installation. I just copied across my data files, report files and cumulus.ini.

I am running Microsoft Edge for my browser but also tried with Google Chrome and that still didn't work. It still appears to me to be something to do with not finding the file to write the changes to. The logfile loads fine and brings up the editor window but it's only when I save the changes that the error occurs. The dayfile editor works and I think that's because there is only one file.

I'm only a novice at javascript but when I compare datalogs.js and dayfileeditor.js I see a difference in the way it handles the response. datalogs.js reads -
function formatResponse(action, rowdata) {
response = '{"action":"' + action + '","line":' + rowdata[0] + ',"month":"' + currMonth + '","extra":"false","data": [';

I assume the response line is telling it what action to take and what file to apply it to. The same line in dayfileeditor.js reads -
response = '{"action":"' + action + '","line":' + rowdata[0] + ',"data": [';

I might be completely off track and you are using the logfile editor without any issues so any other suggestions you can give would be greatly appreciated.

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Fri 18 Dec 2020 11:29 am
by mcrossley
Can you switch on debug logging, attempt the edit again, then post the current MXdiags file here please?

Though as you are getting a 404 error it means the script is requesting an invalid URL from Cumulus MX so I doubt there will be much to see.

Can you also open the browser dev tools, attempt the edit, then screen shot the network request that generates the 404 error?

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Fri 18 Dec 2020 11:41 am
by flort
I turned on debug logging but the MXdiags file doesn't report anything - refer attached file

Attached screenshot shows the network request from the browser dev tools.
Network Request.png
I've attached an extra screenshot showing the detail from the request initiator.
Network Request Extra Info.png

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Fri 18 Dec 2020 4:33 pm
by mcrossley
OK, I have managed to reproduce this, I'll work on a fix...

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Fri 18 Dec 2020 4:50 pm
by mcrossley
And the fix will be in the next release.

Re: Cumulus MX 3.9.2 b3097 Data Log Editor not working

Posted: Sat 19 Dec 2020 1:24 am
by flort
Thanks Mark. Appreciate your help.