Joplin 1.0.218 win32 bug Excel file changes are not saved to Joplin

summary of the issue:

Windows7:
the Excel file is not synchronized from the edited_resources folder to the resources folder after modification and saving

Windows10:
If other Joplin notes are opened during the editing of the attachment, the data of the edited attachment will be lost

Steps to reproduce Windows 7 failure:

  1. Create an excel file and attach it to a note
  2. Edit Excel file, save and exit
  3. Open other notes of Joplin, and then return to the note where the EXCEL attachment is located, the data edited by EXCEL will be lost

Steps to reproduce Windows 10 failure:

  1. Create an excel file and attach it to a note
  2. Edit Excel files, do not save or close
  3. Open other notes of Joplin (not the note where Excel is located)
  4. Save and close the Excel file, and then reopen, the data is lost

Windows7 Problem screenshot:

Windows10 Problem screenshot:

Please help, the data is lost after editing the EXCEL file, I hope you can confirm the problem. Thank you

I can not reproduce this issue. I follow every step and in #6 the edits from #3 are shown as expected.

Joplin 1.0.218 (Win10 pro) + Excel for Microsoft 365 MSO (16.0.12827.20200)

Thank you, can anyone who uses win7 help verify this?

It might be that Excel does something “smart” when saving the file, like not really saving it, so Joplin cannot detect any file change.

What if Joplin provided a small popup when it detects file change, saying “Your file has been saved to Joplin”?

It could also be useful when using an external text editor.

1 Like

I thought about it but wanted to make the process as unobtrusive as possible - you open file, you save it and the resource is updated, no extra popup or message.

If it turns out that Office is so special that you can’t watch for file changes, we can add a warning later for these files, but by default I prefer if there’s no extra messages.

2 Likes

Hello, today I did further testing and updated the question, please help me to see. Thank you

Hello, I found that Windows 10 also has problems, but the probability of problems is lower than Windows7, I have updated the problem, if you can, trouble test a few times

I have tried approximately 30 times now and still can not reproduce this issue.

Every time i press Ctrl-S (or File > Save) in Excel the file in the edited_resources folder is updated and so is the corresponding file in the resources folder. Seems to be working bullet proof to me.

( On the other hand I wish someone would look into my related problem and see if they are able to reproduce that issue… )

Thank you very much, updated the steps to reproduce the problem in Windows 10, if you can, please take a look

Aha, with your updated steps I am able to reproduce the problem. Seems to have nothing to do with Excel as it also happens with LibreOffice and ods files.

Easily reproducible:

  1. Open any attachment from a Joplin note to edit it in external application.
  2. While editing the document, switch to another note in Joplin (just click on any other note in the note list)
  3. Save the edited document in the external application.
  4. Changes are lost in Joplin.

It does not work like that when editing notes in external editor - we can edit many notes at the same time with Typora for example.

2 Likes

help

And?

Thanks for looking into it @eagle. It is by design that the app stops watching when switching notes. The problem is that it's either that, or to keep on watching files for as long as Joplin is open. This is because there's no reliable way to know if a file is being edited in an external app or not.

So not sure what's the best way in terms of usability. Maybe there should after all be some banner showing "file xxxx is being watched", and that banner goes away when no longer watching?

@laurent
When the file is automatically deleted from the edited_resources folder, first synchronize to the resources folder so that no data will be lost. In addition, the files in the edited_resources folder are not named by id, which will cause file name conflicts. It is recommended to keep the naming in resources the same.

When the file is automatically deleted from the edited_resources folder, first synchronize to the resources folder so that no data will be lost.

You're stating the obvious, of course the file is saved and synced before it's deleted. Read above - what you were doing is editing a file on a note that was closed.

In addition, the files in the edited_resources folder are not named by id, which will cause file name conflicts.

Again stating the obvious. The app of course checks for file name conflicts.

Not making any progress here, so please before posting check that what's been said before and check that what you're saying is actually true.

You’re stating the obvious, of course the file is saved and synced before it’s deleted. Read above - what you were doing is editing a file on a note that was closed.

When editing files, it is very common to open other notes. In this case, data loss is a problem that needs to be solved urgently. I hope to have a more complete solution.
@laurent

I think you have solved this very elegantly now, @laurent! Thanks a lot for this enhancement :slight_smile: