Bug 451545 - Strange tagging after building a new database
Summary: Strange tagging after building a new database
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Keywords (other bugs)
Version First Reported In: 7.6.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-15 19:35 UTC by Markus Kempf
Modified: 2022-03-20 06:34 UTC (History)
3 users (show)

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


Attachments
the tree structure of the tags is puzzled (197.43 KB, image/png)
2022-03-15 19:35 UTC, Markus Kempf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Kempf 2022-03-15 19:35:30 UTC
Created attachment 147518 [details]
the tree structure of the tags is puzzled

I upgraded my hard disk to a higher volume version. After moving the pictures to the new disk I started a new database. I have checked the tags and the result is strange: the tree structure is puzzled (see attachment).

The original tree is partially visible, a lot of "leaves" moved to the first rank, some virtual subsubsubsub branches are created with one leave - really strange.

And it is not the first time. I changed the database several month ago and I got a similar result. 

Any hints? Correct the tag tree, delete the tags in the pictures and move the database tags to the pictures?


Linux/KDE Plasma: ubuntu 20.04.4 LTS
GNOME 3.36.8
X11
Comment 1 caulier.gilles 2022-03-15 19:45:28 UTC
which kind of database type did you use exactly ?

Gilles Caulier
Comment 2 Maik Qualmann 2022-03-15 21:07:06 UTC
If "Ubuntu Packages" is the Snap package? Numerous problems are now known. Snap packages use a sandbox and are unusable for use with digiKam.

I understand correctly that they rebuilt the database from the image metadata?

In order for this to work without problems, the digiKam tags metadata must be present in all images. Reading the digiKam tags must be the top priority in the advanced metadata settings.

Otherwise, building up the tags tree is just a matter of luck, depending on which images the scanning process reads first.

Maik
Comment 3 Markus Kempf 2022-03-15 21:10:05 UTC
(In reply to caulier.gilles from comment #1)
> which kind of database type did you use exactly ?
> 
> Gilles Caulier

I am using SQlite
Comment 4 Markus Kempf 2022-03-15 21:20:04 UTC
(In reply to Maik Qualmann from comment #2)
> If "Ubuntu Packages" is the Snap package? Numerous problems are now known.
> Snap packages use a sandbox and are unusable for use with digiKam.
> 
> I understand correctly that they rebuilt the database from the image
> metadata?
> 
> In order for this to work without problems, the digiKam tags metadata must
> be present in all images. Reading the digiKam tags must be the top priority
> in the advanced metadata settings.
> 
> Otherwise, building up the tags tree is just a matter of luck, depending on
> which images the scanning process reads first.
> 
> Maik

I have installed the latest appimage.
I didn't rebuilt the tags directly - I created a new database, added my picture folder and waited - slowly the thumbnails appear and the number of pictures in the collections incremented, then I checked the tags and was surprised.

Xmp.digiKam.TagsList is the uppest line in advanced metadata settings.
Comment 5 Maik Qualmann 2022-03-15 21:30:53 UTC
A new database and add folders, scans all images and creates a new tag tree from the image metadata.
And now the question arises, is the Xmp.digiKam.TagsList present in all images?

If not, see what metadata in the images contain a full tag tree and set this to the top in the advanced metadata settings.

You could have continued to use the "old" database.

Maik
Comment 6 Markus Kempf 2022-03-15 21:56:57 UTC
(In reply to Maik Qualmann from comment #5)
> A new database and add folders, scans all images and creates a new tag tree
> from the image metadata.
> And now the question arises, is the Xmp.digiKam.TagsList present in all
> images?

How is it checked if the tagslist is present in all images? 
> 
> If not, see what metadata in the images contain a full tag tree and set this
> to the top in the advanced metadata settings.
> 
> You could have continued to use the "old" database.
> 
> Maik

You are right - "new" doesn't mean "better" in all cases. Unfortunatly I have to recover the backup.

Markus
Comment 7 Markus Kempf 2022-03-16 20:13:48 UTC
I have recovered the "old" database and the tags looks like expected. Do you recommend a special procedure to adjust the "old" database with the images on the new hard disk?

Can you give some hints how to avoid such strange tagging in the future?
E.g. delete all tags in the pictures and transfer the db tags to the pictures? (is it possible?) Or is the order in advanced metadata settings sufficient (it seems not to be)

Best regards,

Markus
Comment 8 Maik Qualmann 2022-03-20 06:34:20 UTC
It is important that at least one metadata entry contains the full tag path and that this is also set first in the advanced metadata settings. Our recommendation is the digiKam TagsList. To do this, the digiKam TagsList must be included in all images. Otherwise, the structure of the tags tree is a puzzle, depending on which images are rescanned first.

Maik