Lightroom: Folder Synchronisation Doesn't Restore/Repair Missing Subfolders

  • 1
  • Problem
  • Updated 7 years ago
  • Solved
  • (Edited)
A synchronisation of a parent folder doesn't bring back missing subfolders.

I have a corrupt catalogue. It contains photos that can be accessed via "All Photographs" or through the parent folder of the (sub-)folder they are contained in, but the (sub-)folder itself is missing from the folder list on the LHS in the Library module.

If I select "Goto Folder in Library" from the context menu of such an orphaned photo, nothing happens.

I tried to synchronise the parent folder to bring back the subfolder but without success. LR insists that the photos are in the catalogue already, yet the subfolder is not restored.

Out of curiosity I removed all folders from the library. The catalogue now contains 200+ photos accessible through "All Photographs" which are not in any folder.

Just saving all edits and then creating a new catalogue isn't a solution because then all edit histories are lost.

I would therefore expect that there is a way to repair a catalogue, i.e., in my case get LR to list the subfolder containing the photos again.

The corrupt folder passes the integrity test that is available when starting LR with the Ctrl-Key pressed.

My config: Windows XP SP3, LR 3.4RC.
Photo of TK

TK

  • 531 Posts
  • 110 Reply Likes
  • left between a rock (corrupt catalogue) and a hard place (no edit histories)

Posted 8 years ago

  • 1
Photo of Chad B

Chad B, Employee

  • 11 Posts
  • 1 Reply Like
Do you have any recent backups? Do they exhibit the same behavior?
Photo of TK

TK

  • 531 Posts
  • 110 Reply Likes
Hi Chad, thanks a lot for responding.

Yes, the recent backups have the same problem.

This whole thing didn't let me go to sleep so I probed a bit deeper. As I just reported I found a solution to get the missing folders back into the library folder list.

The corruption of the original catalogue was apparently only caused by one single photo. This photo never received a preview in the "All Photographs" grid overview, hence I became suspicious. When I selected "Show in Explorer" from its context menu, I got an error dialogue stating "An internal error has occurred: ?:0: attempt to index field 'rootFolder' (a nil value)".

It appears that this problematic photo got moved between folders at some point in the past.

So I selected all photos except this problematic one and exported them to a new catalogue. Much to my surprise, the new catalogue includes all the missing subfolders in the library view again!

It seems that LR choked on the corrupt database entry for one photo to the extent of hiding some folders it knew about. It got also very, very slow whenever the corrupt photo was within view of the library grid. Seems like it wouldn't stop trying to generate a thumbnail preview for the corrupted photo.

Either the corrupted catalogue had only one issue but that single issue had a pretty drastic (folder hiding) effect, or exporting the new catalogue restablished some broken links (I'd say that's less likely). In either case, I've got a complete catalogue now.
Photo of Chad B

Chad B, Employee

  • 11 Posts
  • 1 Reply Like
I'm a bit curious as to whether this particular image was the cause of the catalog corruption or a victim of it. Have you managed to successfully add this image back to the restored catalog and get a preview, etc? Or is it just a damaged file?
Photo of TK

TK

  • 531 Posts
  • 110 Reply Likes
I successfully managed to add the image back to the new catalogue. The new catalogue now has the same number of total photos as the old (corrupted) one, but the previous problematic image (a DNG file) isn't an orphan anymore. It received a preview and everything else works as normal.
Photo of Chad B

Chad B, Employee

  • 11 Posts
  • 1 Reply Like
I'd like to get a copy of the corrupt catalog, and possible the affected image as well. If you're ok with providing those, let me know and I'll contact you offline. Thanks!
Photo of TK

TK

  • 531 Posts
  • 110 Reply Likes
Chad, sorry for having not responded earlier. I'm happy to be contacted offline and assume you can look up my email address.
Photo of Chad B

Chad B, Employee

  • 11 Posts
  • 1 Reply Like
Excellent. Thanks!
Photo of TK

TK

  • 531 Posts
  • 110 Reply Likes
Thank you for your interest! I'd be happy to check out the problematic file's database entry for you with SQLite, if that would help. I reckon the numeric value in its "rootFile" column didn't have a valid target anymore, but I haven't checked it to this level of detail. I kept all the corrupted catalogue versions I produced when trying to narrow down the problem (always worked on copies).
Photo of TK

TK

  • 531 Posts
  • 110 Reply Likes
I'm pretty sure Steffen Bechtold stumbled across the same issue that caused my catalogue synchronisation issues.

I'm pretty sure that somehow one (or more) of his images lost its "rootFolder" reference as well and now he is missing subfolders in the library hierarchy as well.

It appears that while it was OK to regard "folder synchronisation" as working, and thus mark this report as "solved", there is still a bug to be addressed that was the root cause for the synchronisation to fail.