SUMMARY: when a photo/video files has a matching XMP file, and the current setting is not to use XMP files, Digikam can't remove old tags because it rereads old XMP on every save/sync. STEPS: - a test media file with a matching XMP file. - Digikam settings: use XMP files. - Change Digikam settings: Metadata - Write to sidecar files - Write to XMP for read-only item only. - Create tag: TEST_TAG_OLD - "write metadata to file", sync - optionally: open file exporer, confirm that XMP is created and "date modified" is later then the media file. - optionally: grep - XMP file mentions TEST_TAG_OLD - Change Digikam settings: Metadata - Write to sidecar files - Write to XMP for read-only item only. - For the same media file, add tag: TEST_TAG_NEW and remove tag: TEST_TAG_OLD - save/sync - confirm that media file has "date modified" newer then the XMP file. - optionally: check with exiftool that the media has TEST_TAG_NEW tag. - optionally: grep - XMP file only mentions TEST_TAG_OLD OBSERVED BEHAVIOR: - After the sync, Digikam rereads XMP and restores the TEST_TAG_OLD tag for the media file. DESIRED BEHAVIOR: - Media file needs to have tag TEST_TAG_NEW and no TEST_TAG_OLD JUSTIFICATION - If a user changed a tag, the new tag should be in affect, regardless of prior configuration setup. WORKAROUND: - remove XMP file or rename its extension.
Created attachment 184208 [details] Settings - Metadata - Behavior
Created attachment 184209 [details] Settings - Metadata - Sidecars
The behavior is clear and logical. If a sidecar exists for a file that isn't read-only, the sidecar won't be updated. The sidecar metadata takes precedence over the file metadata. You must delete the sidecar or choose a different setting when creating the sidecar. There's no other way for digiKam to break this behavior for other users. Maik
Git commit 6b3490c5ef86483e2784fc08086933828684b2f9 by Maik Qualmann. Committed on 18/08/2025 at 17:50. Pushed by mqualmann into branch 'master'. write to the sidecar if it is available also in read only sidcare mode FIXED-IN: 8.8.0 M +1 -1 NEWS M +6 -2 core/libs/metadataengine/engine/metaengine_fileio.cpp https://invent.kde.org/graphics/digikam/-/commit/6b3490c5ef86483e2784fc08086933828684b2f9