agerardin / joplin-plugin-knowledge-graph

Notes as nodes. Explore your Joplin knowledge graph.
MIT License
93 stars 5 forks source link

Unchecking SHOW_ON_START results in blank graph #14

Closed shbach closed 2 years ago

shbach commented 2 years ago

In the latest version of the plugin, the fix for the panel persisting breaks the graph. Now with the SHOW_ON_START unchecked, the graph is blank: image

agerardin commented 2 years ago

I cannot reproduce this. Can you confirm it is still an issue and if so check Help > Toggle development tools and copy any error message that pops up? Also does this happen at startup or after exiting the settings?

shbach commented 2 years ago

For me it happens if SHOW_ON_START is unchecked and then upon restarting Joplin the graph is blank.

This is the only error message I saw that mentioned this plugin directly: image

agerardin commented 2 years ago

It seems that Joplin is trying to update its layout and fails to do so. The user preferences for the layout may be corrupted. I would guess that uninstalling and reinstalling the graph plugin should fix the problem, as it will probably re-register.

Failing code from Joplin :

        case 'MAIN_LAYOUT_SET_ITEM_PROP':

            {
                let newLayout = produce(state.mainLayout, (draftLayout: LayoutItem) => {
                    iterateItems(draftLayout, (_itemIndex: number, item: LayoutItem, _parent: LayoutItem) => {
                        if (item.key === action.itemKey) {
                            (item as any)[action.propName] = action.propValue;
                            return false;
                        }
                        return true;
                    });
                });
shbach commented 2 years ago

Uninstalling and reinstalling the plugin fixed it! I'll close this issue.