Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot convert or link attachements #4682

Closed
Maksim-us opened this issue Mar 7, 2024 · 2 comments
Closed

Cannot convert or link attachements #4682

Maksim-us opened this issue Mar 7, 2024 · 2 comments

Comments

@Maksim-us
Copy link

Trilium Version

0.62.6

What operating system are you using?

Other Linux

What is your setup?

Server access only

Operating System Version

Linux trilium 6.5.11-8-pve #1 SMP PREEMPT_DYNAMIC PMX 6.5.11-8 (2024-01-30T12:27Z) x86_64 GNU/Linux

Description

I am able to upload attachment (PDF file) to a note. However, when I try to convert the attachment to a note or copy the link to add it to the note, it doesn't work. When trying to copy link nothing happens. When trying to convert it to note there is an error on the front end.

Error logs

When clicking "copy link to clipboard"

14:00:53.259 JS Error: Uncaught error: Message: ResizeObserver loop completed with undelivered notifications., URL: http://192.168.50.46:8080/#root/iIb3uoO0mCZx/6mi3I9NleXBU/mABf6k3nufge?ntxId=8A8oqX&viewMode=attachments&attachmentId=DS7Pn4X0MUmS, Line: 0, Column: 0, Error object: null, Stack: null
Stack: Error
    at Object.T [as logError] (http://192.168.50.46:8080/assets/v0.62.6/app-dist/desktop.js:2:117933)
    at Ri.window.onerror (http://192.168.50.46:8080/assets/v0.62.6/app-dist/desktop.js:2:668246)
14:00:53.296 204 PUT /api/options with 0 bytes took 1ms
14:00:58.208 304 GET /api/notes/mABf6k3nufge/blob with 559 bytes took 1ms
14:00:58.965 204 PUT /api/options with 0 bytes took 1ms

When trying to "convert attachment to note":
Front end error:

 500 POST attachments/DS7Pn4X0MUmS/convert-to-note
×
Mapping from attachment role 'file' to note's type is not defined

Backend log:

14:01:02.065 200 GET /api/backend-log with 18818 bytes took 1ms
14:02:27.071 JS Error: Uncaught error: Message: ResizeObserver loop completed with undelivered notifications., URL: http://192.168.50.46:8080/#root/iIb3uoO0mCZx/6mi3I9NleXBU/mABf6k3nufge?ntxId=8A8oqX&viewMode=attachments&attachmentId=DS7Pn4X0MUmS, Line: 0, Column: 0, Error object: null, Stack: null
Stack: Error
    at Object.T [as logError] (http://192.168.50.46:8080/assets/v0.62.6/app-dist/desktop.js:2:117933)
    at Ri.window.onerror (http://192.168.50.46:8080/assets/v0.62.6/app-dist/desktop.js:2:668246)
14:02:27.109 204 PUT /api/options with 0 bytes took 1ms
14:03:10.657 ERROR: post /api/attachments/:attachmentId/convert-to-note threw exception: 'Mapping from attachment role 'file' to note's type is not defined', stack: Error: Mapping from attachment role 'file' to note's type is not defined
    at BAttachment.convertToNote (/opt/trilium/src/becca/entities/battachment.js:149:19)
    at convertAttachmentToNote (/opt/trilium/src/routes/api/attachments.js:96:23)
    at Function.cb (/opt/trilium/src/routes/routes.js:444:34)
    at Function.sqliteTransaction (/opt/trilium/node_modules/better-sqlite3/lib/methods/transaction.js:65:24)
    at Object.transactional (/opt/trilium/src/services/sql.js:242:52)
    at /opt/trilium/src/routes/routes.js:446:44
    at /opt/trilium/node_modules/cls-hooked/context.js:118:13
    at Namespace.run (/opt/trilium/node_modules/cls-hooked/context.js:97:5)
    at Namespace.runAndReturn (/opt/trilium/node_modules/cls-hooked/context.js:117:8)
    at Object.init (/opt/trilium/src/services/cls.js:5:22)
14:03:10.666 JS Error: 500 POST attachments/DS7Pn4X0MUmS/convert-to-note - Mapping from attachment role 'file' to note's type is not defined
Stack: Error
    at Object.T [as logError] (http://192.168.50.46:8080/assets/v0.62.6/app-dist/desktop.js:2:117933)
    at Object.throwError (http://192.168.50.46:8080/assets/v0.62.6/app-dist/desktop.js:2:100765)
    at c (http://192.168.50.46:8080/assets/v0.62.6/app-dist/desktop.js:2:97489)
    at async Object.error (http://192.168.50.46:8080/assets/v0.62.6/app-dist/desktop.js:2:96233)
14:03:34.618 204 PUT /api/options with 0 bytes took 1ms
@zadam
Copy link
Owner

zadam commented Mar 27, 2024

Hello, sorry for your trouble, copying link was broken in the server edition (perhaps only in some browsers - FF).

Will be fixed in the next patch release.

@Maksim-us
Copy link
Author

Thank you. this was in Chrome. I will wait for next release and will retest. Thank you!!!

@zadam zadam closed this as completed in 83d5d6b Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants