No idea how this happened, but I was in the darkroom view working on some photos I took today and somehow rejected every photo in my entire library. Photography isn’t my livelihood, but all the same, I have thousands of photos going back years, and losing every rating is catastrophic.
Is there some way to undo this? I hit Control-Z, but nothing seems to happen. The rating change is not in the history stack of any photo, the lighttable view has a “history stack” on the right, but doesn’t show any history of operations.
In lighttable view select all the photos and remove the reject option. Darktable will not delete the photos from storage unless you tell it to trash them and then accept the warning prompt.
@Terry he needs to restore his ratings, not just not delete his photos.
@ieure In your darktable user manual - configuration directory do you see files like library.db-snp-20260831113209? Try quitting dt, fully backing up the configuration directory to an archive, then copying/renaming the most recent files from before the disaster to not have the “-snp-” suffix. You might want to start with an early one to ensure the process works, before finding exactly the right backup to restore. (I think ratings should be in library.db and not data.db, but if this first test fails, repeat the process for data.db.)
The issue could have been caused by this:
Or this one:
Or this:
There are three focus stealing bugs where the darktable window can be minimized but still receiving input because it took focus from the foreground application. I think devastating is the right word for this.
I don’t know much about collections and ratings etc as I don’t use that part of lighttable myself, but I note that you did something while in darkroom.
What you can do in darkroom that somehow influences more than the one image under editing, must be related to the collection sorting icons in the left part of the top bar. (They are there for being able to adjust the current collection (similar to what you saw in lighttable) possibly at display if the film strip in the bottom bar is opened.) The settings you make there will carry over when you revert to lighttable.
Since you say that you have “rejected” all the images, I tend to think think that what you experience is that you have inadverdently clicked on the icon to select only those images that are rejected, (a circle with a cross within), and if you have no rejected images, they will all disappear from view. Try to click on the one star icon in the bar and drag the marking further to cover all stars to change the selection criteria again, so that images with all kinds of star rating will be displayed
If that doesn’t help you, we can be able to better help you if you upload a screen shot that shows us your settings in the top bar.
Hi, thank you for the reply. This isn’t a view filter issue, I can see all the images fine. The problem is that their rating has been changed to “rejected,” wiping out the previous rating (or that they weren’t rated). I need to restore the ratings, and (bonus points) understand what happened so I can avoid repeating it.
Thank you, I avoided closing Darktable in the hopes that there was an undfo stack in memory somewhere. I do have snapshots from 8/23 of both DBs, that’s likely the last time I worked in Darktable. I saved a copy of what’s on disk now, and will try recovering from there.
Is the rating stored in the .xmp sidecar file? My (loose) understanding is that the SQLite DBs are used to index data which the .xmp files are the source of truth for… so I’m wondering if the ratings will persist even if I restore the files.
Yes. Have a look and see if the files contain accurate ratings. If so, back them up, kill darktable, then investigate.
The .xmp data is a duplicate with what’s in your library. When the two get out of sync, darktable prompts you about which one to keep. (There’s an option to rescan XMPs at startup that probably needs to be enabled.)
If it happened in darkroom, the problem might be a temporary bug rather than actually changing all your images.
Then I tend to think that it is not some kind of user error, but rather a bug that ought to be reported. The problem is, of course, that you appear to have no idea what happened, and hence it is difficult to recreate for anybody who should try to tackle the issue.
I don’t think it was a bug, but I do think the darkroom view could use improvement. In particular, the target of a given action can be surprising in the darkroom, for example, if you hover a photo in the bottom strip, the r-1-2-3-4-5 controls target that. IMO in the darkroom view, all actions should target the selected/currently viewed image. Or at least, if they don’t target the most obvious & visible thing, there should be some sign that’s the case.
Emacs has a wonderful feature called view-lossage which reports the input events it receives and what commands it ran in response to them, something like that in Darktable would be very welcome also. It’s helpful both when you screw things up, and when something amazing happens on accident.
Why I “tended” to think it could be a bug was because @ieure was adamant that this happened in the darkroom view and I have not been aware of, or now could find any info on, any mechanism/shortcut that enables us to regularly perform any single action on all images while in darkroom, (whether filmstrip is displayed or not). I further could not understand how @ieure could unaware select all images in darkroom’s filmstrip with his mouse – in particular if the recent photos was included in a collection with his entire image library .
Reading the subsequent postings in this thread and searching further, I have become aware of the following that could possibly deserve a rethinking:
While in the shortcut list displayed by shortcut (alt+)h in lighttable we can under heading “Utility module” find “Ctrl+a Selection/Select all” which is similar to the button in right-hand panel.
To the contrary in the shortcut list in darkroom, (which also has the “Utility modules” heading), there is under the heading “Views” (which also was in the lighttable list) the entry “Ctrl+a Thumbtable/Select all”.
“Thumbtable”? Where does this word come from – shall users deduct that this is the same as filmstrip? “Thumbtable” is not a term used at all in the manual.
Is the varying position of the shortcut in the shortcut list under different headings, logically explained by different functions of darkroom and lighttable?
Fact is that even in darkroom and rejecting from filmstrip a Ctrl+z works so there is something unclear in this report. Maybe an old Darktable version as the Ctrl+z on Darkroom filmstrip was fixed not so long ago.