I need help with a mess I made!

MacBook Pro 16-inch, 2021 Apple M1 Pro 32 GB RAM
macOS Sequoia 15.7.7
DxO PhotoLab 9.9.1

I have an external drive that contains all my images in two main top-level folders.

The first folder is called “_Referenced Images” and contains all my images that are in an Apple Aperture library. I successfully moved those to another external drive and I deleted the top-level folder.

My top-level folder for images I edit with DxO PhotoLab 9 is called “_Referenced Images 2”. I used Rename in PhotoLab to rename “_Referenced Images 2” to “_Referenced Images” and now I have a complete disaster: Yesterday, after renaming the top-level folder and starting PL I saw many “ghost” folders in the Source Browser (see screenshot), the PL loaded and I was able to edit my images. Today, when I started. PL I received notification that there was a minor update (9.10.0). I quit and downloaded the update from the website. After installation PL crashes every time I launch it. I decided to revert to PL 9.9.1, but it crashes too - so now I cannot run PL.

I assume this has something to do with my stupid idea of renaming my top-level folders.

Any advice you have to make PL launch without immediately crashing would be very welcome. I did not make backups of anything. I am ready to to edit the SQL database if necessary.

Thank you.

Francis.

I have managed to make it startup without crashing by moving the database and the wal and shm files out of the DxO PhotoLab v9 library folder, thus triggering creating of a new database.

…solves a lot of problems and adds a few others: Some information contained in the database is NOT exported to .dop sidecars. This means that a few things can be missing.

Check if you need/have history and projects, the most prominent absentees - depending on whether you use Mac or Win.

My projects are gone, and it looks like the keyword list isn’t complete. Not the end of the world but not nice. Editing history gone.

Hi Francis

You may find the data is not lost. I have had a few issues with the DXO DAM side of things and bought IMatch to file and add keywords. I also found moving information with DXO can create “lost” information, but when I created the IMatch catalogue the data was there. It just didn’t show up in DXO. It is a lot more stable and reliable and I trust it more than the DXO DAM system. Not sure what operating system you are using as IMatch is just for Windows, but there are other DAM software packages that covers Apple and more. Might be worth a try.

2 Likes

Andre, thanks for your information. I should have provided the technical information - I am on macOS. I am aware of many DAM software for Mac but none of them will read the PhotoLab database to get any information - they will read the xmp files created by PhotoLab.

SQL - you can find thread/comments on ‘drive/volume manipulation in database’ in the forum! Simple work, piece of cake. The thread was about drive (volume) change. However, its describe data tables and similar. I think just find the folder name, and re-type manually (to the new folder).

I find it for you for Mac - @platypus describe quite well.

Mine SQL script under Windows (its also handle folder name change as i remember):

I hope its helps. I dont have Mac, cant test for you.

Note: As far as i remember, someone once post the ‘whole’ Mac data table, field stuffs, and may the table/fields naming difference PC vs Mac db, but i not find it.

Thanks! I’ll give that a try.

1 Like

The awful thing about the PL database is that it records every folder you click on, even if you never edited an image in that folder. This makes it quite difficult to narrow the data that needs correcting.

I have decided to give up. After taking a look at the data I realize it will be too easy for me to make a further mess, though I could possibly retrieve data from the old database to load into the new database.

May its helps. Its under Windows database, but i think Mac similar.
I have the following folder structure (i add with RED the Drive/Folder Id in the PL database. Its only for better overview, editing need to be done on data table.

I made a small SQL query for better overview / understanding the logic:

/* id - folder or drive/volume id  ,  ParentFolderId -> as its means. 
 * Example: D:\!zzz_temp\folder01 ->  1/166/168 (id's in order)
 * 				'D:\' -> id = 1, parentfolderid is null (empty, because it's s drive letter / volume, has no parent)
 *          	'!zzz_temp' id = 166, parentfolderid = 1
 * 				'folder01' id = 168, parentfolderid = 166 
 * name - folder name, full_path - full folder path, full_id - folder full id , separated by '/' */
WITH RECURSIVE pl_folders AS (
    -- Root (drives)
    select
        id
      , ParentFolderId
      , name
      , name as full_path
      , id as full_id
    from folders
    where ParentFolderId IS NULL
    UNION ALL
    -- Folders
    select
        n.id
      , n.ParentFolderId
      , n.name
      , h.full_path || '\' || n.name as full_path
      , h.full_id || '/' || n.id as full_id
    from folders n
    join pl_folders h on n.ParentFolderId = h.id
)
Select *
from pl_folders
ORDER BY full_path

You can change to Mac data table and field names.
I think the ‘Folders’ data table is → ‘zdopfolder’, ‘id’ field is ‘z_pk’, ‘ParentfolderId’ → ‘zparent’, ‘name’ → ‘zname’
I try my best to modify for Mac, may works fine

WITH RECURSIVE pl_folders AS (
    -- Root (drives)
    select
        z_pk --id
      , zparent --ParentFolderId
      , zname --name
      , zname as full_path --name as full_path
      , z_pk as full_id  --, id as full_id
    from zdopfolder --folders
    where zparent IS NULL  --where ParentFolderId IS NULL
    UNION ALL
    -- Folders
    select
        n.z_pk    --n.id
      , n.zparent --n.ParentFolderId
      , n.zname   --n.name
      , h.full_path || '\' || n.zname as full_path      --h.full_path || '\' || n.name as full_path
      , h.full_id || '/' || n.z_pk as full_id
    from zdopfolder n --folders n
    join pl_folders h on n.zparent  = h.z_pk  --n.ParentFolderId = h.id
)
Select *
from pl_folders
ORDER BY full_path

And here the results for overview of Id’s (inder Windows, but under Mac the logic is the same.

The drive / volume dont have ParentFolderId - as its the drive/volume, and it doesn’t has parent.

All folder below ParentFolderId is filled > as its the parent of the folder. Parnet alos can be not folder, but drive / volume

I highlight with red the linking logic.

So, its depend on the case, you can change the parentfolderId to the correct one (all of its subfolders need to check, just the ‘main folder’) can works. You can also add a new data row, fill the values (Id generated automatically)

For example: i highlight with orange color 3 folder, what was previously known by PL , but not under ‘D:!zzz_temp’, but somewhere totally different place. I quit from PL. Open database. Find the folder name: ‘folder01’, whatever was the parentfolderid, i change manually to ‘166’ ( ‘D:!zzz_temp’). Also for the ‘folder02’ do the ‘166’.
But what about ‘folder03’ what is below ‘folder01’ → nothing, as its parentfolderId already point to ‘folder01’! So, generally if you link manually some folder, the sub-folders not need to change the parentfolderid.

I suggest to first try it with some test folders. Example:

  1. Create a ‘test_folder01’, create some ‘test_folder02’ under that. PL is running → Click on that folders. Copy some photo to this folders, create collection ‘test_collection01’ from photos from both (01, 02) folder. In last step we check via the Collection to database manipulation is fine or not). Also, some keyword can be added (to check in the end)
  2. Quit from PL.
  3. Move manually this folders to some other place (where you not click on that in PL!)
  4. Create manually folder like ‘test_folder_final’. Leave empty (not copy back the test_folder01, 02)
  5. Start PL.
    1. IF PL not start for some reason, then do database manipulation manually → create the new data row in the table, fill datas.
  6. Click in PL to the ‘test_folder_final’ → PL now register this folder in the database.
  7. Open collection ‘test_collection01’ → you see, all item is Question marked (as folders not exist in the database known position)
  8. Quit PL.
  9. Open database.
  10. Go the the ‘folder’ data table (whatever is the tabel name in Mac: ZDOPFOLDER )
  11. Find the folder in the data table (zname): ‘test_folder_final’. Copy its Id (mac: z_pk)(and NOT parentFolderId, mac: zparent) to the clipboard.
  12. Find in the data table the ‘test_folder01’ → and whatever the ParentFolderId (zparent) in there: paste the previously copied Id (‘z_pk’) to that field.
  13. Start PL.
  14. Check Collection you create previously. Its need to be okay.

Huhh, it was long. But i think, may the idea can be catched. It may takes some time to change the parentfolderid (Mac: zparent). But may you change a few places, and all okay (and you done in 1 minute)