digiKam replaces existing sidecar file (at least for CR2), resulting in loosing existing information, if "Read from sidecar files" option is not enabled (Configure→Metadata→Sidecars). This is unexpected given the option name. If that's a feature not a bug at least a warning should be displayed that existing sidecar will be replaced or wiped. The expected effect of the option would be to preserve existing sidecar file with all information on writing and skipping it on reading. At least that's what the option name implies.
That the sidecare file is changed is normal, if the writing is activated. In digiKam-6.0.0 it is also possible to clean up information that no longer exists in the sidecar or image from the database. What information is lost exactly. Possibly upload a sidecar file before and after. Maik
Created attachment 113592 [details] darktable XMP The source XMP coming from darktable containing processing history
Created attachment 113593 [details] digiKam XMP with Read from sidecar files enabled The darktable XMP after updating from digiKam with the "Read from sidecar files" option enabled
Created attachment 113594 [details] digiKam XMP with Read from sidecar files disabled The darktable XMP after updating from digiKam with the "Read from sidecar files" option disabled
Ok, I think the correct solution is always to mix the sidecar metadata when writing. The digiKam metadata will then have the higher priority when writing. Maik
(In reply to Maik Qualmann from comment #5) > Ok, I think the correct solution is always to mix the sidecar metadata when > writing. That's what I'd expect. Always merge, never overwrite.
*** Bug 434438 has been marked as a duplicate of this bug. ***
I think we should always treat sidecars as a unit with the image. We should remove the option to read from sidecars and always read from sidecars if they are available. Gilles, do you see a use case to disable reading from sidecar when writing to sidecar is enabled? Maik
Hi Maik, No, i don't remember a specific case to disable reading from sidecar when writing to sidecar is enabled. Gilles
M
Maik, I think we needs to let the choice to the users at end in all cases, to read or not the XMP sidecars. Gilles
Maik, We needs to take a decision about this file. Removing code is easy but can have side effects with users workflow. I vote to let's reading XMP sidecar option available but force to read when writing option is turned on. Gilles
Git commit 1d7c8ae301946d363838df04ec6d33a827661598 by Maik Qualmann. Committed on 15/10/2023 at 21:06. Pushed by mqualmann into branch 'master'. always read from sidecar when write is enabled FIXED-IN: 8.2.0 M +1 -1 NEWS M +5 -0 core/libs/metadataengine/engine/metaengine.cpp M +12 -3 core/utilities/setup/metadata/setupmetadata.cpp M +0 -3 core/utilities/setup/metadata/setupmetadata_sidecars.cpp https://invent.kde.org/graphics/digikam/-/commit/1d7c8ae301946d363838df04ec6d33a827661598