Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HABPanel] Configuration of informational-header (or any customized header widget?) throws Script error #733

Closed
1 task
schmidmuc opened this issue Dec 30, 2020 · 0 comments · Fixed by #1078
Labels
bug Something isn't working

Comments

@schmidmuc
Copy link

schmidmuc commented Dec 30, 2020

Which UI are you reporting an issue for?

  • HABPanel

The problem

After migration from OH2.5 to OH3 the informational-header plugin for HABPanel didn't work anymore. Tried to re-install it according to installation guide (which worked for OH2.5):

When choosing "informational-header" for customized dashboard header widget, the following error can be seen in console:

TypeError: Cannot read property 'informational-header' of undefined
at m.DashboardSettingsCtrl.$scope.updateCustomWidgetSettings (menu.controller.js:209)
at vendor.js:255
at m.$eval (vendor.js:147)
at vendor.js:280
at vendor.js:292
at q (vendor.js:7)
at gh.$$writeModelToScope (vendor.js:292)
at vendor.js:292
at g (vendor.js:290)
at e (vendor.js:290)
(anonymous) @ vendor.js:119

Because of the error the configuration parameters are not shown in menu and cannot be configured. I assume that this is the reason why this customized header widget isn't working anymore.

Configuration menu looks like this (in German language):
image

Expected behavior

A working informational-header (as with OH2.5)

Configuration menu should look like this (taken from the installation guide):
image

Steps to reproduce

Described in section problem, follow installation instructions from https://github.com/gersilex/informational-header

Your environment

runtimeInfo:
version: 3.0.0
buildString: Release Build
locale: de_DE
systemInfo:
configFolder: /etc/openhab
userdataFolder: /var/lib/openhab
logFolder: /var/log/openhab
javaVersion: 11.0.9.1
javaVendor: Azul Systems, Inc.
javaVendorVersion: Zulu11.43+55-CA
osName: Linux
osVersion: 5.4.0-40-generic
osArchitecture: amd64
availableProcessors: 4
freeMemory: 551011688
totalMemory: 1365245952
bindings:

  • airquality
  • astro
  • chromecast
  • dwdpollenflug
  • dwdunwetter
  • exec
  • gpstracker
  • http
  • ipp
  • ism8
  • keba
  • miio
  • mqtt
  • network
  • ntp
  • openweathermap
  • pushover
  • samsungtv
  • shelly
  • snmp
  • spotify
  • systeminfo
  • tankerkoenig
  • tplinksmarthome
  • tr064
  • zwave
    clientInfo:
    device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1.125
    prefersColorScheme: light
    isSecureContext: false
    locationbarVisible: true
    menubarVisible: true
    navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 4
    language: de-DE
    languages:
    • de-DE
    • de
    • en-US
    • en
      onLine: true
      platform: Win32
      screen:
      width: 1536
      height: 864
      colorDepth: 24
      support:
      touch: false
      pointerEvents: true
      observer: true
      passiveListener: true
      gestures: false
      intersectionObserver: true
      themeOptions:
      dark: light
      filled: true
      pageTransitionAnimation: default
      bars: filled
      homeNavbar: default
      homeBackground: default
      expandableCardAnimation: default
      userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
      like Gecko) Chrome/87.0.4280.88 Safari/537.36
      timestamp: 2020-12-30T23:23:14.895Z

Browser console

TypeError: Cannot read property 'informational-header' of undefined
at m.DashboardSettingsCtrl.$scope.updateCustomWidgetSettings (menu.controller.js:209)
at vendor.js:255
at m.$eval (vendor.js:147)
at vendor.js:280
at vendor.js:292
at q (vendor.js:7)
at gh.$$writeModelToScope (vendor.js:292)
at vendor.js:292
at g (vendor.js:290)
at e (vendor.js:290)
(anonymous) @ vendor.js:119

  (anonymous) @ vendor.js:119
  (anonymous) @ vendor.js:92
  (anonymous) @ vendor.js:292
  q @ vendor.js:7
  $$writeModelToScope @ vendor.js:292
  (anonymous) @ vendor.js:292
  g @ vendor.js:290
  e @ vendor.js:290
  $$runValidators @ vendor.js:290
  $$parseAndValidate @ vendor.js:291
  $commitViewValue @ vendor.js:291
  $$debounceViewValueCommit @ vendor.js:293
  $setViewValue @ vendor.js:292
  (anonymous) @ vendor.js:316
  $eval @ vendor.js:147
  $apply @ vendor.js:147
  (anonymous) @ vendor.js:316
  eg @ vendor.js:37
  d @ vendor.js:37
  ListPicker._handleMouseUp

Browser network traffic

No network traffic with errors

Additional information

None

@schmidmuc schmidmuc added the bug Something isn't working label Dec 30, 2020
@schmidmuc schmidmuc changed the title [HABPanel] Configuration of informational-header (or any header?) throws Script error [HABPanel] Configuration of informational-header (or any customized header widget?) throws Script error Dec 30, 2020
ghys added a commit that referenced this issue May 31, 2021
This feature is deprecated in OH3 but code remains which would break if `$rootScope.configWidgets` is left undefined.
So define it as an empty object early.
Fixes #733.

Signed-off-by: Yannick Schaus <[email protected]>
@ghys ghys closed this as completed in #1078 Jun 2, 2021
ghys added a commit that referenced this issue Jun 2, 2021
This feature is deprecated in OH3 but code remains which would break if `$rootScope.configWidgets` is left undefined.
So define it as an empty object early.
Fixes #733.

Signed-off-by: Yannick Schaus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant