Lissy93 / dashy

🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
https://dashy.to
MIT License
18.24k stars 1.38k forks source link

[BUG] Interactive Editor - Empty Edit Item #415

Closed EVOTk closed 2 years ago

EVOTk commented 2 years ago

Hello @Lissy93

Environment

Self-Hosted (Docker)

Version

1.9.6

Describe the problem

In interactive mode, when I click on the edit button to modify the configuration of an Item, the page is empty.

Same on Firefox and chrome up to date 2022-01-09 00_19_28-2022_01_09_00_19_15_EVOServ_Dashy_Mozilla_Firefox png - Paint 2022-01-09 00_19_39-EVOServ - Dashy — Mozilla Firefox

Additional info

In Firefox Console :

TypeError: t.items is undefined
    getItemById App.vue:66
    getItemById App.vue:65
    getItemFromState EditItem.vue:1
    mounted EditItem.vue:1
    VueJS 19
        ne
        Ni
        insert
        L
        Es
        _update
        n
        get
        run
        Xi
        ve
        he
        promise callback*re
        ve
        tn
        update
        notify
        set
        set
    openItemSettings Item.vue:148
    itemOpened ItemContextMenu.vue:1
    VueJS 3
        ne
        i
        _wrapper
vue.runtime.esm.js:1897:12

Please tick the boxes

Lissy93 commented 2 years ago

Heya @EVOTk

Thanks for raising, and sorry about that

Seems like this line, this.item = this.getItemFromState(this.itemId); in EditItem.vue doesn't have any data, like it's unable to find the item matching that ID 🤔

But weirdly I can't yet recreate it in any of my instances or on the dev version. I will look into it further and update you when I find a fix. Thank you for your patience :)

EVOTk commented 2 years ago

If that helps you, I just gave it a try and this bug goes away if I remove the pihole widgets from my configuration.

If I remove this from my configuration:

  - name: Serveur DNS
    widgets:
      - type: pi-hole-stats
        useProxy: true
        options:
          hostname: http://192.168.2.90
          hideChart: true
          hideInfo: true
        id: 0_1009_piholestats
      - type: pi-hole-stats
        useProxy: true
        options:
          hostname: http://192.168.2.91
          hideChart: true
          hideInfo: true
        id: 1_1009_piholestats

So it works fine: 2022-01-09 10_00_53-EVOServ - Dashy — Mozilla Firefox

EVOTk commented 2 years ago

Oh ! And copy that, I see that the 2 widgets have the same IDs.

I modified like this:

  - name: Serveur DNS
    widgets:
      - type: pi-hole-stats
        useProxy: true
        options:
          hostname: http://192.168.2.90
          hideChart: true
          hideInfo: true
        id: 0_1009_piholestats
      - type: pi-hole-stats
        useProxy: true
        options:
          hostname: http://192.168.2.91
          hideChart: true
          hideInfo: true
        id: 1_1010_piholestats

But that doesn't change anything :(

Lissy93 commented 2 years ago

Thanks so much, that was really helpful, have managed to recreate, and I think I've got a fix

EVOTk commented 2 years ago

Hello,

Thank you for your responsiveness, as always!

I just updated to 1.9.7, but the problem is still present with me :(

2022-01-09 21_43_30-EVOServ - Dashy — Mozilla Firefox 2022-01-09 21_43_38-EVOServ - Dashy — Mozilla Firefox

TypeError: t.items is undefined
    getItemById App.vue:66
    getItemById App.vue:65
    getItemFromState EditItem.vue:1
    mounted EditItem.vue:1
    VueJS 19
        ne
        Ni
        insert
        L
        Es
        _update
        n
        get
        run
        Xi
        ve
        he
        promise callback*re
        ve
        tn
        update
        notify
        set
        set
    openItemSettings Item.vue:148
    click languages.js:23
    VueJS 26
        ne
        i
        _wrapper
        qs
        ze
        eo
        z
        g
        k
        _
        k
        _
        Es
        _update
        n
        get
        run
        Xi
        ve
        he
        promise callback*re
        ve
        tn
        update
        notify
        set
    SET_EDIT_MODE App.vue:97
    I vuex.esm.js:844
    commit vuex.esm.js:466
    commit vuex.esm.js:465
    _withCommit vuex.esm.js:624
    commit vuex.esm.js:464
    commit vuex.esm.js:409
    startInteractiveEditor LanguageSwitcher.vue:66
    click dashy.151c3e0f.js:1
    VueJS 3
        ne
        i
        _wrapper
vue.runtime.esm.js:1897:12
    VueJS 22
        oe
        se
        ie
        ne
        Ni
        insert
        L
        Es
        _update
        n
        get
        run
        Xi
        ve
        he
        (Async: promise callback)
    re
        ve
        tn
        update
        notify
        set
        set
    openItemSettings Item.vue:148
    click languages.js:23
    VueJS 26
        ne
        i
        _wrapper
        (Async: EventListener.handleEvent)
    qs
        ze
        eo
        z
        g
        k
        _
        k
        _
        Es
        _update
        n
        get
        run
        Xi
        ve
        he
        (Async: promise callback)
    re
        ve
        tn
        update
        notify
        set
    SET_EDIT_MODE App.vue:97
    I vuex.esm.js:844
    commit vuex.esm.js:466
    commit vuex.esm.js:465
    _withCommit vuex.esm.js:624
    commit vuex.esm.js:464
    commit vuex.esm.js:409
    startInteractiveEditor LanguageSwitcher.vue:66
    click dashy.151c3e0f.js:1
    VueJS 3
        ne
        i
        _wrapper
EVOTk commented 2 years ago

Hello, Thank you, it's resolved at home :)

liss-bot commented 2 years ago

The fix for this issue has now been released in Dashy 2.0.0 ✨

If you haven't done so already, please update your instance to 2.0.0 or later. See Dashy 2.0.0 for full info.

Feel free to reach out if you need any more support. If you are enjoying Dashy, consider supporting the project.