zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

(Bug report) Cannot create internal trilium links since 0.57.2, on both Windows local app and trilium server app #3376

Closed deajan closed 1 year ago

deajan commented 1 year ago

Trilium Version

0.57.2

What operating system are you using?

Windows

What is your setup?

Local + server sync

Operating System Version

Windows 10 21H2 x64

Description

Hello,

Just updated trilium from 0.56.2 to 0.57.2 and noticed that I cannot create internal links anymore. After a quick downgrade to 0.56.2, internal links work again. I've tested this on both the windows local app and on my trilium server on linux.

Please find below both log files, with the error when I try to create a link;

Windows machine

DB size: 2912 KB
Trusted reverse proxy: false
App HTTP server starting up at port 37840
{
  "appVersion": "0.57.2",
  "dbVersion": 197,
  "syncVersion": 26,
  "buildDate": "2022-12-01T22:56:29+01:00",
  "buildRevision": "36c98e919aa5d4bd7da0d4bbdb4d048ea12f53c8",
  "dataDirectory": "c:\\Users\\someuser\\Desktop\\TRILIUM\\trilium-windows-x64\\trilium-data",
  "clipperProtocolVersion": "1.0",
  "utcDateTime": "2022-12-02T17:15:35.473Z"
}
CPU model: AMD Ryzen 7 1800X Eight-Core Processor         , logical cores: 16 freq: 3593 Mhz
Listening on port 37840
Becca (note cache) load took 8ms
Registered global shortcut Ctrl+Alt+P for action createNoteIntoInbox
Generated CSRF token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx with secret _csrf=xxxxxxxxxxxxxxxxxxxxx; Path=/
200 GET /api/options with 5766 bytes took 1ms
200 GET /api/tree with 16332 bytes took 1ms
200 GET /api/keyboard-actions with 12153 bytes took 0ms
200 GET /api/keyboard-shortcuts-for-notes with 2 bytes took 0ms
200 GET /api/script/widgets with 2717 bytes took 1ms
200 POST /api/tree/load with 4347 bytes took 1ms
websocket client connected
200 POST /api/tree/load with 2568 bytes took 1ms
200 GET /api/search/%23bookmarked%20or%20%23bookmarkFolder with 31 bytes took 1ms
200 POST /api/tree/load with 6835 bytes took 1ms
200 GET /api/notes/QESIZ3iL5bVw with 5328 bytes took 1ms
200 GET /api/note-map/QESIZ3iL5bVw/backlink-count with 11 bytes took 0ms
200 GET /api/script/startup with 2231 bytes took 0ms
200 POST /api/tree/load with 3180 bytes took 1ms
200 POST /api/tree/load with 2716 bytes took 1ms
Table counts: notes: 230, note_revisions: 51, branches: 267, attributes: 347, etapi_tokens: 1
All consistency checks passed with no errors detected (took 14ms)
Nothing to push
Finished pull
Nothing to push
Content hash computation took 5ms
Content hash checks PASSED
Sending message to all clients: {"type":"sync-finished","lastSyncedPush":4040}
200 GET /api/autocomplete?query=.env%20modifi%C3%A9%20netperfect&activeNoteId=QESIZ3iL5bVw with 2 bytes took 5ms
Slow 200 GET /api/autocomplete?query=e&activeNoteId=QESIZ3iL5bVw with 98263 bytes took 29ms
200 GET /api/autocomplete?query=en&activeNoteId=QESIZ3iL5bVw with 23270 bytes took 5ms
200 GET /api/autocomplete?query=env&activeNoteId=QESIZ3iL5bVw with 7169 bytes took 1ms
200 POST /api/tree/load with 11645 bytes took 1ms
200 POST /api/tree/load with 2605 bytes took 1ms
200 POST /api/tree/load with 11092 bytes took 1ms
200 POST /api/tree/load with 11090 bytes took 1ms
200 POST /api/tree/load with 7138 bytes took 1ms
200 GET /api/autocomplete?query=.env&activeNoteId=QESIZ3iL5bVw with 249 bytes took 1ms
JS Error: Uncaught error: Message: Uncaught TypeError: Cannot read properties of undefined (reading 'editing'), URL: http://127.0.0.1:37840/assets/v0.57.2/app-dist/desktop.js, Line: 2, Column: 86388, Error object: {}, Stack: TypeError: Cannot read properties of undefined (reading 'editing')
    at f (http://127.0.0.1:37840/assets/v0.57.2/app-dist/desktop.js:2:86388)
    at HTMLDivElement.<anonymous> (http://127.0.0.1:37840/assets/v0.57.2/app-dist/desktop.js:2:88830)
    at HTMLDivElement.dispatch (http://127.0.0.1:37840/assets/v0.57.2/libraries/jquery.min.js:2:43064)
    at HTMLDivElement.v.handle (http://127.0.0.1:37840/assets/v0.57.2/libraries/jquery.min.js:2:41048)
    at Object.trigger (http://127.0.0.1:37840/assets/v0.57.2/libraries/jquery.min.js:2:71515)
    at HTMLDivElement.<anonymous> (http://127.0.0.1:37840/assets/v0.57.2/libraries/jquery.min.js:2:72110)
    at Function.each (http://127.0.0.1:37840/assets/v0.57.2/libraries/jquery.min.js:2:3003)
    at S.fn.init.each (http://127.0.0.1:37840/assets/v0.57.2/libraries/jquery.min.js:2:1481)
    at S.fn.init.trigger (http://127.0.0.1:37840/assets/v0.57.2/libraries/jquery.min.js:2:72086)
    at http://127.0.0.1:37840/assets/v0.57.2/libraries/bootstrap/js/bootstrap.bundle.min.js:6:53515
Stack: Error
    at Object.C [as logError] (http://127.0.0.1:37840/assets/v0.57.2/app-dist/desktop.js:2:96237)
    at window.onerror (http://127.0.0.1:37840/assets/v0.57.2/app-dist/desktop.js:2:586944)

Linux server

déc. 02 18:29:07 my.trilium.local trilium.sh[1506]: 304 GET /api/autocomplete?query=.env&activeNoteId=QESIZ3iL5bVw with 249 bytes took 1ms
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]: JS Error: Uncaught error: Message: Uncaught TypeError: Cannot read properties of undefined (reading 'editing'), URL: https://my.trilium.server.local/assets/v0.57.2/app-dist/desktop.js, Line: 2, Column: 86388, Error object: {}, Stack: TypeError: Cannot read properties of undefined (reading 'editing')
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at f (https://my.trilium.server.local/assets/v0.57.2/app-dist/desktop.js:2:86388)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at HTMLDivElement.<anonymous> (https://my.trilium.server.local/assets/v0.57.2/app-dist/desktop.js:2:88830)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at HTMLDivElement.dispatch (https://my.trilium.server.local/assets/v0.57.2/libraries/jquery.min.js:2:43064)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at v.handle (https://my.trilium.server.local/assets/v0.57.2/libraries/jquery.min.js:2:41048)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at Object.trigger (https://my.trilium.server.local/assets/v0.57.2/libraries/jquery.min.js:2:71515)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at HTMLDivElement.<anonymous> (https://my.trilium.server.local/assets/v0.57.2/libraries/jquery.min.js:2:72110)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at Function.each (https://my.trilium.server.local/assets/v0.57.2/libraries/jquery.min.js:2:3003)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at S.fn.init.each (https://my.trilium.server.local/assets/v0.57.2/libraries/jquery.min.js:2:1481)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at S.fn.init.trigger (https://my.trilium.server.local/assets/v0.57.2/libraries/jquery.min.js:2:72086)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at https://my.trilium.server.local/assets/v0.57.2/libraries/bootstrap/js/bootstrap.bundle.min.js:6:53515
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]: Stack: Error
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at Object.C [as logError] (https://my.trilium.server.local/assets/v0.57.2/app-dist/desktop.js:2:96237)
déc. 02 18:29:09 my.trilium.local trilium.sh[1506]:     at window.onerror (https://my.trilium.server.local/assets/v0.57.2/app-dist/desktop.js:2:586944)
zadam commented 1 year ago

Hello, thanks for report, unfortunately I can't reproduce that. Does it perhaps happen in a specific note or even in new ones? Which method of creating an internal link do you use?

lndjenkinson commented 1 year ago

Hi. Also doesn't work in 0.57.3. Using the right click context menu button for internal links. Happens on all the notes. What alternate methods are there?

It does work on the editor paragraph menu, but not in the highlighted context menu.

deajan commented 1 year ago

Tried on different notes, but no new one. Used the right click menu from CKEditor

zadam commented 1 year ago

@lndjenkinson @deajan I feel like I'm missing something, but what right click / context menu? This is what I have on right click menu:

image

I guess a screenshot / screencast would be helpful.

What alternate methods are there?

You can create internal links inline via typing @, with CTRL+L shortcut, in the balloon toolbar ...

zadam commented 1 year ago

Okay, I think I found it - this happened when creating an internal link over selected text in a balloon toolbar:

image

deajan commented 1 year ago

Sorry, didn't think of making it visual. I just did this with a fresh Trilium 0.57.2 on the demo data.

image image image

zadam commented 1 year ago

Yep, eventually I found out. The "right click" confused me since this toolbar does not appear on a right click.

deajan commented 1 year ago

Any chance to get a point release ? This is quite a blocker for 0.57 series I guess. Again, thanks for the tremendous work you put into Trilium.

zadam commented 1 year ago

@deajan only this specific method of inserting links doesn't work. Inserting with @ or without selection still works:

image

New point release will come in the coming days.

lndjenkinson commented 1 year ago

Yes, the selected text menu is where it didn't work. The words escaped me and I didn't know what to call it. Sorry!

On Sat, Dec 3, 2022 at 2:15 PM zadam @.***> wrote:

@deajan https://github.com/deajan only this specific method of inserting links doesn't work. Inserting with @ or without selection still works:

[image: image] https://user-images.githubusercontent.com/617641/205460171-c2e99bf7-6435-40c2-be22-e7e9b80ce191.png

— Reply to this email directly, view it on GitHub https://github.com/zadam/trilium/issues/3376#issuecomment-1336250493, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKGKSA66HLHHCMHU6MEYSTWLOS7RANCNFSM6AAAAAASSEUPR4 . You are receiving this because you were mentioned.Message ID: @.***>