Bug 361378 - Tags are not being removed from files metadata
Summary: Tags are not being removed from files metadata
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Hub (show other bugs)
Version: 4.14.0
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-04 13:59 UTC by Andrius
Modified: 2017-05-30 20:07 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrius 2016-04-04 13:59:55 UTC
I re-did the tags structure of my whole library and wrote metadata to files. However, if I view the files on another computer, the tags I deleted/renamed still exist. If I read metadata from files the deleted/modified tags are back in Digikam. 

Reproducible: Always

Steps to Reproduce:
1. Assign a tag to multiple files
2. Delete / modify the tag from the files
3. Write metadata to files
4. Read metadata from files


Actual Results:  
The tag you just deleted will appear again

Expected Results:  
The tag you deleted and wrote to metadata should be deleted from files' metadata
Comment 1 caulier.gilles 2016-04-04 16:00:28 UTC
Veaceslav,

This problem have not been fixed with 5.0.0 ?

Gilles Caulier
Comment 2 Maik Qualmann 2016-04-05 20:26:16 UTC
The problem here is with digiKam-5.0.0-beta5 not to reproduce. The writing of image tags must of course be activated in the metadata settings. Otherwise old tags are not updated and with a new reading of the metadata appear again.

Maik
Comment 3 Andrius 2016-04-05 21:32:10 UTC
(In reply to Maik Qualmann from comment #2)
> The problem here is with digiKam-5.0.0-beta5 not to reproduce. The writing
> of image tags must of course be activated in the metadata settings.
> Otherwise old tags are not updated and with a new reading of the metadata
> appear again.
> 
> Maik

Hello Maik 
Thanks for looking into that. I am pretty sure the setting "white Metadata into files" is being switched on. I will double check when I am back in front of the desktop though and will let you know.
Comment 4 Andrius 2016-04-06 13:37:33 UTC
Hello Maik,
Just wanted to let you know that I double checked the metadata settings and all the boxes are checked.
"Write this information to the Metadata:
Image Tags - CHECKED
Captions and title - CHECKED
Rating - CHECKED
Pick label - CHECKED
Color label - CHECKED
Timestamps - CHECKED
Metadata templates (Copyright, etc.) - CHECKED
Face tags (including face areas) - CHECKED"
Comment 5 Maik Qualmann 2016-04-13 19:40:27 UTC
The problem also not to reproduce here with digiKam-4.14. Only certain tags (Color label, Pick label...)? Do you use sidecar files for metadata?

Maik
Comment 6 Andrius 2016-04-18 21:21:00 UTC
(In reply to Maik Qualmann from comment #5)
> The problem also not to reproduce here with digiKam-4.14. Only certain tags
> (Color label, Pick label...)? Do you use sidecar files for metadata?
> 
> Maik

Hello,

I do not use color labels / pick labels nor sidecar files.  I use regular tags and star ratings only and write it to files' metadata.
Comment 7 caulier.gilles 2016-07-16 11:52:56 UTC
wildcowboy,

Can you check if with last stable 5.0.0, the problem still reproducible...

Thanks in advance

Gilles Caulier
Comment 8 caulier.gilles 2016-07-25 08:54:34 UTC
wildcowboy,

We need to know you exact metadata settings.

Also, which Exiv2 version do you use ? Look in Help/Components Info for details.

Please also, run digiKam from a console and report here all debugs statements printed on the console while metadata writing operations. This very important

Thanks in advance

Gilles Caulier
Comment 9 Andrius 2016-07-27 16:31:54 UTC
(In reply to caulier.gilles from comment #7)
> wildcowboy,
> 
> Can you check if with last stable 5.0.0, the problem still reproducible...
> 
> Thanks in advance
> 
> Gilles Caulier

Ok, I Just tried to play around in stable 5.0.0 for Windows and here is what is happening:

Test 1. Picasa and Digikam

1. Adding a tag
1.1 Add a tag to a file in Picasa

2. Removing the tag in digikam
2.1 Reread metadata from the file in digikam
2.2. Remove the tag from the file in digikam

3. Checking the results
3.1. Refresh the file in Picasa
3.2. Reread metadata fromthe file in digikam
3.3. Open file properties in windows file explorer

Expected result: the file should have no tags in any of these 3 apps
Actual result: Picasa noticed that the file was updated but still shows the tag. No tag can be seen in either or digikam.
Comment: The result is acceptable for me since I don't really care about Picasa database

Test 2. Windows Photo Gallery and Digikam

1. Adding a tag
1.1 Add a tag to a file in Windows Photo Gallery

2. Removing the tag in digikam
2.1 Reread metadata from the file in digikam
2.2. Remove the tag from the file in digikam

3. Checking the results
3.1. Refresh the file in Windows Photo Gallery
3.2. Reread metadata fromthe file in digikam
3.3. Open file properties in windows file explorer

Expected result: the file should have no tags in any of these 3 apps
Actual result: The tag is still there and can be seen in all 3 apps.
Comment: If you remove the tag via Windows Photo Gallery it disappears from the file properties but still can be seen in digikam. Re-read metadata from the file does not help. You have to delete the tag from digikam database manually.

Test 3. Windows File Explorer and digikam
Test procedure and results were exactly the same as test 2.

Conclusions:
1. Looks like Windows Photo Gallery or any other windows service is running in background and overwrites the metadata. If a tag was added via Windows Photo Gallery or Windows File Explorer it has to be removed via the same software  otherwise it will keep coming back.
2. Even if the tag was removed via Photo Gallery or File Explorer it will have to be removed from digikam database manually. Re-read metadata from file does not help. So you are going to have to remove an unwanted tag twice: 1. In Windows Photo Gallery or File properties in Windows File Explorer 2. In Digikam

Someone please do the same and confirm the results.
Comment 10 caulier.gilles 2016-11-29 13:57:34 UTC
There is no explicit error message visible from the console trace...

Can you reproduce the problem using digiKam Linux AppImage bundle ? The last
bundle is available at this url:

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier
Comment 11 caulier.gilles 2017-04-16 20:31:06 UTC
new 5.6.0 pre-release as bundle is available here :

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Please check if this problem still reproducible with these versions.

Thanks in advance

Gilles Caulier
Comment 12 Andrius 2017-05-30 18:40:08 UTC
(In reply to caulier.gilles from comment #11)
> new 5.6.0 pre-release as bundle is available here :
> 
> https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM
> 
> Please check if this problem still reproducible with these versions.
> 
> Thanks in advance
> 
> Gilles Caulier

I think this is fixed. I don't see this problem happening anymore