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

Uncaught TypeError: views[view].widgets[group] is undefined #699

Open
bkomac opened this issue Apr 10, 2023 · 2 comments
Open

Uncaught TypeError: views[view].widgets[group] is undefined #699

bkomac opened this issue Apr 10, 2023 · 2 comments
Labels
bug vis-v1 Issues that affect the Vis framework/Editor v1

Comments

@bkomac
Copy link

bkomac commented Apr 10, 2023

Describe the bug
After some small change (maybe just the position of some random widget) causes Vis project to become unstable and won't load anymore. Have to switch to default project and re-import the original project from backup.
The error in browser console is the same on vis view and admin page:
Uncaught TypeError: views[view].widgets[group] is undefined

To Reproduce
I can provide vis-views.json.
vis-views.json.txt

Expected behavior
Vis project to load ok.

Screenshots & Logfiles
Posnetek zaslona 2023-04-10 175945
console-export-2023-4-10_18-1-11.txt
console-export-2023-4-10_18-0-51.txt

Versions:

  • Adapter version: Vis v1.4.16
  • JS-Controller version: 4.0.24
  • Node version: v16.19.0
  • Operating system: Raspbian GNU/Linux 10 (buster)

Additional context
package-lock.json.txt

@Feuer-sturm Feuer-sturm added bug vis-v1 Issues that affect the Vis framework/Editor v1 labels Apr 10, 2023
@maffi-git
Copy link

I have this problem too.
Created some new groups in vis and after that, it broke. Now I have to find out, how to restore that backup...

@p-kehling
Copy link

+1 I have same issue. I cannot restore my view from backup.

Current workaround i found, edit the file files/vis/js/visUtils.js line 513 and 514 to:

var result3 = replaceGroupAttr(lcsid, views[view].widgets[ggroup].data);
if (result3.doesMatch) {

to:

var result3 = replaceGroupAttr(lcsid, views[view].widgets[ggroup]?.data);
if (result3?.doesMatch) {

(adding ? on property accessor)

Now vis is loading again, but I miss two widget groups which are now shown white / empty.

I think it's an issue while export, I can reproduce it now with another view.

Can someone please help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug vis-v1 Issues that affect the Vis framework/Editor v1
Projects
None yet
Development

No branches or pull requests

4 participants