Unsharing folder orphaned its contents

Operating system

Linux

Joplin version

3.4.1

Desktop version info

Joplin 3.4.1 (prod, linux)

Device: linux, Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz
Client ID: c59716952b4f4782839b8b1ff61ca325
Sync Version: 3
Profile Version: 47
Keychain Supported: No
Alternative instance ID: -

Revision: 24df674

ABC Sheet Music Plugin: 1.0.5
Backup: 1.4.3
Conflict Resolution: 1.2.3
Csv Import: 1.0.1
Diff view: 0.2.0
Freehand Drawing: 3.1.0
Link Graph UI: 1.5.1
OCR: 0.3.2
Plugin Bundle: 0.5.5
Templates: 2.4.0
Typograms: 1.0.3

Sync target

Joplin Server

What issue do you have?

I was sharing a notebook and decided to unshare it. When I turned off sharing, the folder disappeared, with all the subnotebooks and notes inside it. I have realized that the contents of that notebook are basically orphaned. I can see the notes under Notebooks -> 'all notes'. When I open that note, I can click on the “In: ” under the title and see all the notes that are in that notebook in the note list. These orphaned notes also show up in searches as well. Also, if I use the move notebook window, I can see the orphaned notebooks and move notes into or out of them.
My working theory is that the sidebar only shows root notebooks. When I unshared the notebook the root notebook was deleted and orphaned its contents.

There an easy way to retrieve these notes and notebooks. I don't think I had any notes in the root folder but I don't know for sure. I could just move the notes from these orphaned notebooks but the notebooks would remain, and I would not have a way to delete them since they don't show up in the sidebar.

Any help would be much appreciated!

To restore your notes, see this article:

If none of these methods work please let me know.

Regarding the bug you had, were you unsharing your own notebook, or a notebook that someone had shared with you?

It was a notebook I shared.

I looked in the database and I see that the parent folder is missing but see that the children folders were present. So my idea is to create a new root notebook in joplin and change its id in the folder table. Is there any reason this wouldn't work?

It won't work, it will break sync

I actually tried it before you responded.

I was worried that it would break sync too. So I disabled sync for the then created the new root folder and and closed joplin. I then changed the ID of the newly created notebook in the database directly. I opened joplin and all the orphaned notebooks and the notes they contained appeared. I started sync and the notes appeared on phone so it looks like all is well.

Thank you so much! I wouldn't have thought about looking in the sqlite db without you pointing me in that direction.

For the record, if someone else read this thread - it's a bad idea to modify the SQLite database (I'm not sure where I pointed in that direction).

If you're lucky, everything might be fine and you won't break any app, sync target, plugin or third-party app, but if you're not, things may be broken in a subtle way which may lead to data loss. You might realise there's a problem only a few weeks or months later, and you won't be able to know why it did this or what may have been lost (and you will probably assume there's a bug in the app).

1 Like

This is an unfortunate comment. Presuming what I will think when I have a problem seems passive-aggressive. Anything I say at this point might just be considered me being defensive or aggressive. I want nothing more than to help contribute to good software and ask for and provide help in a good community.

That wasn't aimed at you specifically, but yes users don't always remember making a small tweaks a few weeks or months ago and will then assume there's a problem with the app. I do that too.

I understand that. However, I'm a little more than the average user. Other than the fact that I have been developing software for over 30 years. I also have been running the Joplin server in a FreeBSD jail for a couple of years.
I'd be the first to admit that I caused a problem. But now if I say I see something that isn't working, the assumption might be that I broke it. My questions would not be taken seriously, and I would just be left to debug it on my own. I would say this that already happened in this thread. My notes were not lost as much as I could not navigate to them easily because the root notebook was gone.

I don't think that's true. In many cases submitting an error log can indicate to the developers roughly the cause of a problem, or if you provide steps and the issue is reproducable for other users, it certainly won't be ignored (at least not intentionally). But if you submit an issue and the logs indicate a scenario which should not normally happen, then it could be called into question if the scenario was caused by your own actions and you might not receive any support for it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.