solid-panes
solid-panes copied to clipboard
Unable to create new link
Summary
When clicking the green plus button and adding a Link, after entering the name, an error is thrown without a new link being created.
Console Output
create.js:78 Uncaught (in promise) Error: Cannot mint new - missing newInstance
at create.js:78
at
Screenshot
More Debug
newThingUI: Minting new link at https://melvin.localhost:9999/public/link/
Source code : https://github.com/linkeddata/solid-ui/blob/master/src/create.js#L77
Same problem here
Now when I create a link, it doesnt give an error.
But it makes a new meeting, which unexpected.
Also getting the same issue (on solid.community)

Update: So I just spent an hour or so in chrome debugger following the code.
Like you said @melvincarvalho the issue is this if statement
If you trace it back to the mintNew, the mintNew in linksPane.js function does not add newInstance to it. The previous newPaneOptions[op] = options[op] that gets done above does not have newInstance on it. The original ops set as well

Does not have it either. However, the interesting thing is that it fails here because the very next if statement after the if check and it throws the error is

Now newPaneOptions does contain the folder property and its valid in the debugger so it would never hit the else check in this scenario and cause an error. My guess is that the newInstance property gets added once you add the link target to the newly created link or whatever its supposed to do (new to this, never seen the next step in adding a link).
My proposed solution (just taking a stab at it) is that the!newPaneOptions.newInstance
check before it should only be checked if its passed that next step (giving it an actual link target) because there is no actual instance created yet. So no matter what its ALWAYS going to fail there because it hasnt progressed far enough in the link adding process to be warranted for that check.
If you need me to explain any of that further let me know. I'll see if I get some free time this weekend to pull this project down and try implementing a fix. Still wading through a lot of this project as I have just found it recently.