JEX Notebooks Import Broken for Nested Notebooks(?)

Hello!

Is it expected and desired that JEX imports do not honor notebook nesting? For example, when attempting to import a notebook that was nested inside another notebook, I end up with the below image. This seems very strange to me as I imported the parent notebook first.

image

Were the parent and the child notebooks imported from different JEX files? This might be the cause.

Thanks very much for the reply. Yes - the parent and child notebooks were from different exports. I expected/assumed there would be some metadata in the export to pull it into the proper parent notebook.

I wonder if it would be possible or a valid feature request to honor parent/child notebooks for separate JEX exports?

I believe (though not 100% sure) that when importing Joplin generates new ids for each item, including notebooks.

This would explain the issue you're seeing - the id of the parent notebook has been changed during import, and when you imported the subnotebook it's reference to the parent was no longer valid.

Maybe it's possible to retain the IDs in a way that the parent/child relationship can be restored.

I will aim to get a request logged to the Backup plugin Github to change the default to a single JEX. I don't really see any major benefits of splitting out the notebooks if it scrambles the hierarchy.

It can't keep exactly the same IDs because it is possible for it to potentially clash that way (happy to stand corrected).
I believe if you do what @roman_r_m suggests in your other thread then the relationships will be maintained.

I agree it makes more sense for it to default to single Jex (especially when it comes to new users) but that is for @JackGruber to decide, however even if not then there still could be a case for Joplin setting that option itself as part of the default plugins project.

Thanks for the reply. I have been working through the process suggested in the other thread. Once I have completed the reimport and restore I'll post the steps I ran through in more detail.

Unfortunately, even combining the exported files into one jex manually still does not retain the notebook parent/child relationship properly. I think there should be a (beta) tag or some sort of denotation next to any single notebook export functionality. Losing the notebook hierarchy is quite problematic.

This is being prepared with other changes. But since the plugin should stay compatible it is a bit tricky.

2 Likes

Is there a bug logged to track this effort or do you think I should get one logged on Git?

It's not a bug though, it's purposely implemented that way. A backup shouldn't have dependencies to anything outside the backup archive, and that's why all IDs are rewritten on import.

As mentioned if you need to retain links between items you need to put them all in the same archive, which means doing a full backup.

Sorry @laurent - I meant a bug logged to the Backup plug-in GitHub to default to the single JEX export option.

I went ahead and got the below Issue logged:

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