darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Sidecar files are not written when tagging from lighttable

Open GustavHaapalahti opened this issue 4 months ago • 13 comments

Is there an existing issue for this?

  • [x] I checked and did not find my issue in the already reported ones

Describe the bug

When tagging multiple files from lighttable, sidecar files are not written. This is quite annoying when tagging a lot of files. One cannot be certain that tags are not lost when copying files to a portable drive for example, or if the database is somehow corrupted.

Steps to reproduce

  1. Go to lighttable and select a few files
  2. Choose a tag to attach in the tagging module
  3. Open the sidecar files in an editor, the tag is not there but it should be.

Choose write sidecar file from the history module for the selected files and the tags will appear in the sidecar file.

Expected behavior

Write the sidecar files immediately when setting a tag from lighttable.

Logfile | Screenshot | Screencast

No response

Commit

Unsure

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

5.2.1

What OS are you using?

Windows

What is the version of your OS?

Windows 10

Describe your system

16GB ram Interl core i7-7700k Nvidia geforce gtx 1070

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

Nvidia geforce gtx 1070 8GB Driver version 560.94

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

GustavHaapalahti avatar Sep 07 '25 14:09 GustavHaapalahti

What is your preference setting for writing sidecars?

wpferguson avatar Sep 08 '25 17:09 wpferguson

This is also something that has been annoying me. Right now you have to explicitly choose to write the metadata or make an edit in the darkroom.

I would suggest adding an option to create XMP files that updates the sidecars on any change. Lets call it all changes.

Donatzsky avatar Oct 11 '25 12:10 Donatzsky

https://github.com/darktable-org/darktable/pull/15373

gi-man avatar Oct 11 '25 13:10 gi-man

@gi-man That's only for tags. Star ratings, color labels and several other metadata changes still have to be updated manually.

Donatzsky avatar Oct 11 '25 13:10 Donatzsky

The only way to satisfy everyone is to have a preference page that lists all of the things that can be changed with an image so that each user can define "edit" to suit their idea of what it is and what should be in a sidecar and when it should be written.

Do a search for all the sidecar issues and you can read the various opinions of what an edit is or is not.

wpferguson avatar Oct 11 '25 18:10 wpferguson

The only way to satisfy everyone is to have a preference page that lists all of the things that can be changed with an image so that each user can define "edit"

I'm not talking about changing what the current after edit option does. I'm suggesting adding a new option, called after all changes or something like that. While I'm sure there are those that would want something in between, I suspect that the vast majority would be satisfied with that.

One problem is that right now there is no such option, and so many users (myself included once upon a time) assume that after edit must mean after all changes, and then either get confused when that turns out not to be the case or even lose metadata they thought was safely stored in the XMP files. And even if you are aware, it's very easy to forget to manually write the sidecars. So, all pedantic bickering aside, this is something that needs a solution.

Donatzsky avatar Oct 11 '25 19:10 Donatzsky

I'm suggesting adding a new option, called after all changes

In my opinion, that's what on import is almost doing. What the negative of using on import setting for you?

gi-man avatar Oct 11 '25 19:10 gi-man

In my opinion, that's what on import is almost doing.

And indeed you're right. Somehow I had gotten it in my head that this setting was not just about when sidecars are first created, but also about when they get updated. And had changed it accordingly way back when I started using DT. My bad.

Donatzsky avatar Oct 11 '25 19:10 Donatzsky

In my opinion we could rename on import to always and maybe the on edit to on darkroom edit. This might make it more clear.

gi-man avatar Oct 11 '25 19:10 gi-man

The truest description of after edit that I've heard is "it doesn't do what I thought it did", and it seems to be true for everyone. The other crowd that gets "excited" about writing sidecars is the backup crowd who don't want "unnecessary" backups being written caused by things they don't consider edits being saved to the sidecars.

wpferguson avatar Oct 11 '25 23:10 wpferguson

What is your preference setting for writing sidecars?

I have it set to "on import" and sidecars are now written correctly when I re-test the "problem". I dont know why sidecars weren't written before when I was tagging images. Maybe I somehow changed it to "on edit". If I read the previous posts correctly, on import should handle tagging differently than on edit?

GustavHaapalahti avatar Oct 12 '25 16:10 GustavHaapalahti

Yes, on edit suffers from the definition of edit, which no one can agree on.

wpferguson avatar Oct 12 '25 17:10 wpferguson

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Dec 12 '25 00:12 github-actions[bot]