Home Page won't load after changes

Hi! So in January I made some changes to the code of my home page. The change was not what I was expecting and so I removed the changes I did. When doing so the home page would not load anymore. If I enter it, its stuck on"loading" and I cannot view the code for it in my browser. What is weird though is that if I enter run mode, it pops up, but none of my changes are there. Also it shows everything on blank cards. No images are present on the cards and none of the excluded card filtering is active.

So I have done some digging and I’ve found the sourcecode for the page in the uicomponents:ui_page.json, but I cannot for the life of me figure out what is wrong with it.

Below is what I have for my home page:

"home": {
    "class": "org.openhab.core.ui.components.RootUIComponent",
    "value": {
      "uid": "home",
      "tags": [],
      "props": {
        "parameters": [],
        "parameterGroups": []
      },
      "timestamp": "Jan 16, 2023, 9:34:47 PM",
      "component": "oh-home-page",
      "config": {
        "label": "Home Page"
      },
      "slots": {
        "equipment": [
          {
            "component": "oh-equipment-tab",
            "config": {},
            "slots": {}
          },
          {
            "component": "oh-locations-tab",
            "config": {
              "excludedCards": [
                "Hus",
                "Uspesifisert",
                "Variabler",
                "Overetasje",
                "Underetasje",
                "Bools",
                "Lysstyring",
                "Moduser",
                "Varmestyring"
              ]
            },
            "slots": {
              "Bad": [
                {
                  "component": "oh-location-card",
                  "config": {}
                }
              ],
              "Gang": [
                {
                  "component": "oh-location-card",
                  "config": {
                    "backgroundImage": "http://1.bp.blogspot.com/-IRqe9-wtqkk/USCqQ_qTjFI/AAAAAAAAALc/oxe-NJmX07k/s1600/Gang+nede+f%C3%B8r.jpg"
                  }
                }
              ],
              "Hus": [
                {
                  "component": "oh-location-card",
                  "config": {
                    "backgroundImage": "https://www.thespruce.com/thmb/Bhae19SVcbCiBP07x5dR6Ob15nE\u003d/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/modern-living-room-design-ideas-4126797-hero-a2fd3412abc640bc8108ee6c16bf71ce.jpg"
                  }
                }
              ],
              "Krypkjeller": [
                {
                  "component": "oh-location-card",
                  "config": {}
                }
              ],
              "Loft": [
                {
                  "component": "oh-location-card",
                  "config": {
                    "backgroundImage": "https://akamai.vgc.no/v2/images/bf9d2e68-18c1-4378-9a70-e842599bbff4?fit\u003dcrop\u0026format\u003dauto\u0026h\u003d215\u0026w\u003d464\u0026s\u003d6288ff41a24304fc6541f4dfd35415fc2cf86771"
                  }
                }
              ],
              "Stue": [
                {
                  "component": "oh-location-card",
                  "config": {
                    "backgroundImage": "https://www.ikea.com/images/a-light-living-room-centred-around-a-jaettebo-three-and-a-ha-d80334e03b4e4094d0e02846c7de2e85.jpg?f\u003dxxxl"
                  }
                }
              ],
              "Utebod": [
                {
                  "component": "oh-location-card",
                  "config": {
                    "backgroundImage": "https://hoved.talgo.no/content/uploads/2020/03/117663_MoereTre_Scene05_Sportsbod-1851_Cam01.jpg"
                  }
                }
              ],
              "Utendoers": [
                {
                  "component": "oh-location-card",
                  "config": {
                    "backgroundImage": "https://s3-eu-west-1.amazonaws.com/solvecms/idehus.no/6897ac43-1478-406f-b148-69050197865f"
                  }
                }
              ],
              "Vaskerom": [
                {
                  "component": "oh-location-card",
                  "config": {
                    "backgroundImage": "https://schibsted-smb-cms-assets.s3-eu-west-1.amazonaws.com/images/_largeImageDynamic/369069/vaskerom-casaeriksen_2021-02-25-153937.jpg"
                  }
                }
              ],
              "Yttergang": [
                {
                  "component": "oh-location-card",
                  "config": {
                    "backgroundImage": "https://i.pinimg.com/550x/40/1f/6e/401f6e16dc2785aee94072af7327583b.jpg"
                  }
                }
              ]
            }
          }
        ],
        "properties": [
          {
            "component": "oh-properties-tab",
            "config": {},
            "slots": {}
          }
        ]
      }
    }
  },

Anyone here who have had issues with this or can spot what might be wrong? I can not for the life of me figure this one out.

I don’t see any overt problems in that.

Are there any errors in your browser console when you try to load the page?

Have you made any changes to other pages since you had this error?

Thansk for your reply.

So yeah, I’ve made a bunch of changes to other pages and the all load just fine. I know that the change I made on my home page when I reverted my first change, resulted in this kind of response but I didn’t bother fixing it at that time. Unfortunately that time has now come.

From my browser I get the following error message:

app.b85df14c3a7ad94c41f1.js:7 TypeError: Cannot read properties of undefined (reading ‘0’)
at i. (18.app.b85df14c3a7ad94c41f1.js:1:68974)
at e._render (app.b85df14c3a7ad94c41f1.js:7:35314)
at i.a (app.b85df14c3a7ad94c41f1.js:7:68190)
at fn.get (app.b85df14c3a7ad94c41f1.js:7:26678)
at fn.run (app.b85df14c3a7ad94c41f1.js:7:27562)
at pn (app.b85df14c3a7ad94c41f1.js:7:25670)
at Array. (app.b85df14c3a7ad94c41f1.js:7:12361)
at Ze (app.b85df14c3a7ad94c41f1.js:7:11804)

This doesn’t really tell me much though. Any guesses to where I might start looking?

Ah well. I asked about that because if it was the only change then maybe you still had a viable backup in the jasondb backups folder.

There’s an error with the formatting of an array, and that helps pin point the problem. I just missed it before. You’ve lost the proper header lines defining the locations tab.

Instead of:

        "equipment": [
          {
            "component": "oh-equipment-tab",
            "config": {},
            "slots": {}
          },
          {
            "component": "oh-locations-tab",
            "config": {
              "excludedCards": [
...

you should have

        "equipment": [
          {
            "component": "oh-equipment-tab",
            "config": {},
            "slots": {}
          }  <-- comma that was here is not required
        ], <-- you do have to use the closing bracket (and comma) to end the equipment array definition
        "locations": [  <-- you need to start the locations array definition
          {
            "component": "oh-locations-tab",
            "config": {
              "excludedCards": [
...
1 Like

Well I’ll be damned. That did the trick!!
Thank you so much, this totally made my day :smile: