ek468
16 November 2023 20:09
1
Operating system
macOS
Joplin version
2.12.19
Desktop version info
Joplin 2.12.19 (prod, darwin)
Client ID: 44bc808c1e414ae98b80047d70ca5c24
Sync Version: 3
Profile Version: 43
Keychain Supported: Yes
Revision: 7081046
Simple Backup: 1.3.3
Sync target
Dropbox
What issue do you have?
All of the links to documents I had in any note have been stripped of their target URL. The link is there, but it doesn’t take me anywhere. I found all of my files in the .config folder with paths like: /Users/[username]/.config/joplin-desktop/resources/[encrypted name].crypted. When I try to attach a new file, a link is created and the file is copied to the .config location as expected. However, when navigating to another note and back again, the link URL is deleted again and cannot open the file. What can I do?
More information might be helpful:
Are you using the rich text editor or the markdown editor?
Are you using HTML notes or markdown notes? (Notes are markdown by default, unless imported from somewhere else, or created with specific plugins).
If you are using the rich text editor with HTML notes, you might be affected by this issue:
opened 04:01PM - 14 Nov 23 UTC
bug
desktop
editor
high
## Operating system
macOS
## Joplin version
2.13.5
## Desktop versio… n info
Joplin 2.13.5 (prod, darwin)
Client ID: 64df9fdc01c6479ead3a1f7b132d48a6
Sync Version: 3
Profile Version: 44
Keychain Supported: Yes
Revision: 1d04ec6
## Current behaviour
Editing an HTML note with an attachment link in the rich text editor clears the link's target. For example,
```html
<a href=":/93d25985c31c4aad91d5e710390de5f1" alt="syncReport-1689640089262.txt">syncReport-1689640089262.txt</a>
```
becomes
```html
<p><a data-from-md="" href="#">syncReport-1689640089262.txt</a>. Some edit here.</p>
```
### Reproduction steps
1. Create a new HTML note (for example, by exporting a note as HTML, then importing it as HTML)
2. Open the note in the markdown/HTML editor (HTML in this case)
3. Delete the note's content
4. Attach a file to the note using the "attach" button
5. Switch to the rich text editor
6. Edit the note
7. Switch back to the markdown/HTML editor
## Expected behaviour
The resource link should be preserved.
## Logs
**Note**: This log is from the Electron development tools and starts just before attaching a resource to the HTML note.
```
Logger.ts:254 07:58:35: Preparing scheduled sync
Logger.ts:254 07:58:35: Starting scheduled sync
Logger.ts:254 07:58:35: Synchronizer: Sync: starting: Starting synchronisation to target 3... supportsAccurateTimestamp = false; supportsMultiPut = false [1699977515154]
Logger.ts:254 07:58:35: Synchronizer: Indexing resources...
Logger.ts:254 07:58:35: ResourceService::indexNoteResources: Start
Logger.ts:254 07:58:35: ResourceService::indexNoteResources: Completed
Logger.ts:254 07:58:35: Synchronizer: Sync target remote info: SyncInfo {version_: 3, masterKeys_: Array(5), e2ee_: {…}, activeMasterKeyId_: {…}, ppk_: {…}}
Logger.ts:254 07:58:35: Synchronizer: Sync target is already setup - checking it...
Logger.ts:254 07:58:35: Synchronizer: Sync target local info: SyncInfo {version_: 3, masterKeys_: Array(5), e2ee_: {…}, activeMasterKeyId_: {…}, ppk_: {…}}
useMessageHandler.ts:18 Got ipc-message: noteRenderComplete undefined
Logger.ts:254 07:58:37: Synchronizer: Sync: updateRemote: local has changes: Note: (Local dd659c3451ff488eb6dd27fce922d4f9): (Remote dd659c3451ff488eb6dd27fce922d4f9.md)
Logger.ts:254 07:58:37: Synchronizer: Processing a path that has already been done: dd659c3451ff488eb6dd27fce922d4f9.md. sync_time was not updated? Remote item has an updated_time in the future?
Logger.ts:254 07:58:37: Synchronizer: Sync: finished: Synchronisation finished [1699977515154]
Logger.ts:254 07:58:37: Synchronizer: Operations completed:
Logger.ts:254 07:58:37: Synchronizer: updateRemote: 1
Logger.ts:254 07:58:37: Synchronizer: Total folders: 25
Logger.ts:254 07:58:37: Synchronizer: Total notes: 717
Logger.ts:254 07:58:37: Synchronizer: Total resources: 982
Logger.ts:254 07:58:37: Sync has finished and note has never been changed - reloading it
Logger.ts:254 07:58:41: resourceHandling: Attaching /Users/MyUserName/Downloads/Link text.pdf
Logger.ts:254 07:58:41: resourceHandling: File was attached.
useMessageHandler.ts:18 Got ipc-message: noteRenderComplete undefined
TinyMCE.tsx:336 Loading script /Applications/Joplin.app/Contents/Resources/app.asar/vendor/lib/tinymce/tinymce.min.js
loadScript.ts:14 Loading script: {src: '/Applications/Joplin.app/Contents/Resources/app.asar/vendor/lib/tinymce/tinymce.min.js', id: 'tinyMceScript', loaded: false}
TinyMCE.tsx:336 Loading script gui/NoteEditor/NoteBody/TinyMCE/plugins/lists.js
loadScript.ts:14 Loading script: {src: 'gui/NoteEditor/NoteBody/TinyMCE/plugins/lists.js', id: 'tinyMceListsPluginScript', loaded: false}
useMessageHandler.ts:18 Got ipc-message: noteRenderComplete null
useMessageHandler.ts:18 Got ipc-message: noteRenderComplete null
Logger.ts:254 07:58:46: SearchEngine: Updating FTS table...
Logger.ts:254 07:58:47: SearchEngine: Updated FTS table in 21ms. Inserted: 1. Deleted: 0
useMessageHandler.ts:18 Got ipc-message: noteRenderComplete null
useMessageHandler.ts:18 Got ipc-message: noteRenderComplete null
2useMessageHandler.ts:18 Got ipc-message: noteRenderComplete undefined
```
## Additional information
This has also been tested on Linux (Ubuntu 23.10) with Joplin 2.12.19. The issue is present in that version as well.
Edited : Added request for editor/note type.
ek468
16 November 2023 20:28
3
I think I imported a lot of my notes from OneNote, so that is probably it. I just created a new note natively (which i'm assuming is markdown) and it retained the attachment. Do you see this being resolved and the links restored or am I going to need recreate all my notes and reattach the files?
Depending on what links are changed to in the markdown viewer, it's likely that files will need to be reattached. (Joplin doesn't seem have good support for editing HTML notes in its rich text editor).
For me, a link in this form
<a href=":/93d25985c31c4aad91d5e710390de5f1" alt="syncReport-1689640089262.txt">syncReport-1689640089262.txt</a>
is converted to a link in this form:
<p><a data-from-md="" href="#">syncReport-1689640089262.txt</a></p>
which doesn't have the ID of the attachment resource.
Depending on whether the attachment filenames were changed, it might be possible to write a plugin that links recreates the links (plugin API documentation ).
It's also possible that some of the original attachment URLs are stored in previous versions of notes .
ek468
17 November 2023 20:09
5
The issue linked above is the cause of my problem. I went through all my notes and had to convert them to MD if I wanted to retain the link to documents. Thanks for making me aware!
system
Closed
17 December 2023 20:10
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.