Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Logfile edits not saving

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Logfile edits not saving

Post by freddie »

I'm using the monthly logfile editor to remove some spurious humidity spikes and my edits aren't saving. I see this in the MXdiags logfile:

Code: Select all

2023-01-08 16:12:56.039 api/edit: Unexpected Error, Description: "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"
On clicking "save" in the editor it causes the above in the logs.

I have tried a forced refresh of the page, and also opening the editor in an incognito window.

Running the latest version - 3.23.0 build 3220. It hasn't worked at all since I upgraded on the 2nd Jan - but have only just tried it in the past couple of days. It was working prior to the 2nd Jan.

When I upgrade I install to a clean directory and copy across the data folder and any other configuration/data items required.
Freddie
Image
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Logfile edits not saving

Post by mcrossley »

I'll take a look at this later, sorry but family issues mean I'm likely to be offline at least most of this week.
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Logfile edits not saving

Post by freddie »

mcrossley wrote: Sun 08 Jan 2023 9:50 pm I'll take a look at this later, sorry but family issues mean I'm likely to be offline at least most of this week.
Okay, no rush - I can always edit manually. Family comes first.
Freddie
Image
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Logfile edits not saving

Post by mcrossley »

No fix, but I had time to try a quick edit and it worked OK on my system - and afaik that code hasn't been touched in the while.

A basic check would be the line number shown on the display/edit screens does exist in the file itself.

Otherwise, I'm back in the car this afternoon, I may have time to look at it in more detail tomorrow.
broadstairs
Posts: 1185
Joined: Thu 14 Aug 2008 7:17 am
Weather Station: Ecowitt GW2000/GW3000
Operating System: Linux openSUSE LEAP
Location: Broadstairs, Kent, UK
Contact:

Re: Logfile edits not saving

Post by broadstairs »

I did try this yesterday and it failed for me as well on the first line of the file. Don't know if it's relevant but this is on Linux. I'll test again today just in case I made a mistake somewhere.

Stuart

I just tried this again a couple of times and it fails for me with that same message about the index.
Currently running CMX V4.4.2 4085 on Linux openSUSE Leap
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Logfile edits not saving

Post by mcrossley »

I looked at this a bit more closely. The error is coming from the surrounding code that handles the browser response.

The page JS was changed to allow for multiselection, do you have the previous version of the JS cached?
If you haven't already, please try clearing your browser cache for the CMX site - or for start the browser dev tools, which unless you have changed it automatically disables the use of cached files.
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Logfile edits not saving

Post by freddie »

Using dev tools I see this:

Code: Select all

Uncaught SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at altEditor._editRowCallback (dataTables.altEditor.free.js:907:70)
    at Object.success (dataTables.altEditor.free.js:391:62)
    at c (jquery-latest.min.js:2:28327)
    at Object.fireWith [as resolveWith] (jquery-latest.min.js:2:29072)
    at l (jquery-latest.min.js:2:79901)
    at XMLHttpRequest.<anonymous> (jquery-latest.min.js:2:82355)
dataTables.altEditor.free.js:385 {0: '10366', 1: '08/01/23', 2: '13:43', 3: '6.5', 4: '85', 5: '4.2', 6: '8.8', 7: '13.7', 8: '199', 9: '0.0', 10: '0.4', 11: '986.29', 12: '28.4', 13: '15.8', 14: '67', 15: '8.2', 16: '3.4', 17: '6.5', 18: '0.0', 19: '0', 20: '0.00', 21: '0.00', 22: '2.2', 23: '123', 24: '0.0', 25: '201', 26: '0.0', 27: '2.0', 28: '3.4', 29: '6.5', undefined: '', editRowBtn: ''}
FWIW I am editing entries 4 and 5 of the array, and can see my changed values in there.

Also, this is in an incognito window.
Freddie
Image
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Logfile edits not saving

Post by mcrossley »

Doh!

Thanks, for some reason I was looking at the dayfile editor! :bash:
Yes, the log file editor is broken, now fixed in the next patch release.
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Logfile edits not saving

Post by freddie »

mcrossley wrote: Tue 10 Jan 2023 2:48 pm Yes, the log file editor is broken, now fixed in the next patch release.
Brilliant, thanks Mark.
Freddie
Image
cliftonweather
Posts: 33
Joined: Sat 14 Nov 2009 12:34 pm
Weather Station: Vantage pro+
Operating System: RPi3 Model 3 running Buster
Location: Clifton, Beds
Contact:

Re: Logfile edits not saving

Post by cliftonweather »

Just updated to 3221 and this still does not seem to be working for the Extra data log viewer/editor.
When I try to edit a record I get:-

2023-01-12 09:13:48.637 api/edit: Unexpected Error, Description: "Object reference not set to an instance of an object."
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Logfile edits not saving

Post by water01 »

Me To

Code: Select all

2023-01-12 12:50:56.630 api/edit: Unexpected Error, Description: "Object reference not set to an instance of an object."
2023-01-12 12:51:04.541 api/edit: Unexpected Error, Description: "Object reference not set to an instance of an object."
David
Image
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Logfile edits not saving

Post by mcrossley »

Doh! I forgot to check if affects the Extra data log editor as well, it looks like it does. :roll:
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Logfile edits not saving

Post by freddie »

Monthly data log editor working now - thanks for the quick fix :)
Freddie
Image
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Logfile edits not saving

Post by mcrossley »

The fix for the Extra Data Logs editor is just the JavaScript file in the interface folder.

Sorry, I have been juggling three different versions of the interface files due to some upcoming improvements and the wrong one has ended up in the zip.

I have now completely separated the three versions so it shouldn't(!) happen again.

The file goes in /interface/js
You do not have the required permissions to view the files attached to this post.
water01
Posts: 3670
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Logfile edits not saving

Post by water01 »

Tested and it works Mark.
David
Image
Post Reply