You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Trilium Version
0.48.1-beta
What operating system are you using?
Ubuntu
What is your setup?
Local + server sync
Operating System Version
Linux WATERFALCON 5.13.0-19-generic #19-Ubuntu SMP Thu Oct 7 21:58:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linu
Expected Behavior
I have a code note that is ~ similar to the "create new task" button in the demo. Full source:
api.addButtonToToolbar({
title: 'New task',
icon: 'check',
shortcut: 'alt+n',
action: async () => {
// creating notes is backend (server) responsibility so we need to pass
// the control there
const taskNoteId = await api.runOnServer(async () => {
const todoRootNote = await api.getNoteWithLabel('taskTodoRoot');
const todoNoteId = todoRootNote.noteId;
const newNoteParams = {"parentNoteId": todoNoteId, "title": "new task", "type": "text", "content": ""};
const {note} = await api.createNewNote(newNoteParams);
return note.noteId;
});
// we got an ID of newly created note and we want to immediatelly display it
await api.activateNewNote(taskNoteId);
}
});
Upon clicking the button this note creates, I expect for the script to create a note and open it.
Actual Behavior
The new note is created, but it isn't focused or found.
I note the following error in the frontend console:
tree.js:28 Uncaught (in promise) TypeError: t.split is not a function
at l (tree.js:28)
at Object.resolveNotePath (tree.js:12)
at I.getResolvedNotePath (note_context.js:94)
at I.setNote (note_context.js:31)
at x.activateNewNote (frontend_script_api.js:83)
at async HTMLSpanElement.action (eval at <anonymous> (bundle.js:18), <anonymous>:22:9)
l @ tree.js:28
resolveNotePath @ tree.js:12
getResolvedNotePath @ note_context.js:94
setNote @ note_context.js:31
activateNewNote @ frontend_script_api.js:83
async function (async)
action @ VM91:12
dispatch @ jquery.min.js:2
v.handle @ jquery.min.js:2
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Preflight Checklist
Trilium Version
0.48.1-beta
What operating system are you using?
Ubuntu
What is your setup?
Local + server sync
Operating System Version
Linux WATERFALCON 5.13.0-19-generic #19-Ubuntu SMP Thu Oct 7 21:58:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linu
Expected Behavior
I have a code note that is ~ similar to the "create new task" button in the demo. Full source:
Upon clicking the button this note creates, I expect for the script to create a note and open it.
Actual Behavior
The new note is created, but it isn't focused or found.
I note the following error in the frontend console:
Additional Information
No response
The text was updated successfully, but these errors were encountered: