bender icon indicating copy to clipboard operation
bender copied to clipboard

Hidden or possible corrupt JSON elements in config

Open michealespinola opened this issue 2 years ago • 2 comments

(I'm not a JSON expert so please bear with my lack of proper terminology)

After upgrading to the latest version, I decided to save some key-presses by editing the JSON directly to add the new ""newWindow": true," to all of my menu entries. This worked fine. I'm proficient with JSON enough to not screw up the adding of a new/additional object element.

The issue I am reporting is that when I was looking at the file, I saw an entire object branch/block? that:

  1. Is a duplicate of the default page
  2. Has an object? name of "-1"
  3. Is not visible in the web interface

I manually removed it, but I do have a backup of the file if it would help to see it. Looking at the config file: The default page is 'order "0"'. the next element block was this 'corrupt element' page with no order number specified, and the next page jumped to order "2" and continued properly sequentially from there (3 and 4).

After removing it, I renamed the other pages so they are now 0 through 3 sequentially.

Everything was otherwise working fine and I had no reason to beleive there was an issue until I stumbled upon it. I had previously changed the order of some of the pages, by altering the "Menu order" field via the web interface. I recall that I had to alter the numbers of both pages to get them to swap positions (keeping track of the number order). I can only image this was a result of that process.

michealespinola avatar Sep 08 '22 22:09 michealespinola

Hi @michealespinola thanks for reporting, I will look into it. If you or anyone else has a way of reproducing it consistently, it will help get to the bottom of it faster

jez500 avatar Sep 11 '22 03:09 jez500

I suspect this was caused (i.e., I made a mistake) when I was learning/understanding how changing page order worked. I have changed the order of additional pages since, but I haven't been able to recreate the issue.

I've been keeping my eye on the confg.json file with adds, moves, and changes; and it's been stable since the update.

michealespinola avatar Sep 13 '22 16:09 michealespinola