Bug 462598

Summary: All groups disappeared after upgrade of Ubuntu and Digikam
Product: [Applications] digikam Reporter: yan
Component: Albums-ItemsGroupAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 7.5.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 7.10.0
Sentry Crash Report:

Description yan 2022-12-03 16:31:45 UTC
SUMMARY
After I recently upgraded from Kubuntu 21.10 to 22.04 (LTS), all my groups are gone. I have ~45.000 images and I had hundreds of groups, but they are all gone. There has been no error message whatsoever.

STEPS TO REPRODUCE
1. Upgrade Kubuntu and with it Digikam
2. Start Digikam

OBSERVED RESULT
All groups are gone.

EXPECTED RESULT
Grouped images are still displayed in groups

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
On request
Comment 1 Maik Qualmann 2022-12-03 16:35:09 UTC
The problem has never been reported before. There is an option in the View menu that shows all groups as open, is this option enabled?

Maik
Comment 2 yan 2022-12-03 16:56:38 UTC
(In reply to Maik Qualmann from comment #1)
> The problem has never been reported before. There is an option in the View
> menu that shows all groups as open, is this option enabled?

After 10 minutes of search I couldn't find that option. (My system is in German, though.) In the views menu, there is an option that sounds similar ("Gruppierte Bilder anzeigen" which translates as "Show grouped images" but the real menu item is "Include Tag Sub-Tree") but if I understand it correctly, it actually refers to albums, not groups.

I re-created some groups an those show as closed and I can open and close them.
Comment 3 caulier.gilles 2022-12-03 17:06:14 UTC
Maik speak about this option :

https://i.imgur.com/qWc4bvU.png

But i'm not sure if this is available in previous version as 7.5.0.

I recommend to try the Linux AppImage bundle that we provide. 7.9.0 is available here :

https://files.kde.org/digikam/

Best

Gilles Caulier
Comment 4 Maik Qualmann 2022-12-03 17:17:47 UTC
Are you using Ubuntu's broken Snap digiKam package? Snap packages use a sandbox and have no file access outside of the home area. So if the database was outside, a new database may have been created. Otherwise I can not explain it to me that their group information is not available.

Maik
Comment 5 yan 2022-12-04 11:27:55 UTC
Thanks for your answers Maik and Gilles.

I can confirm that the option to show all groups as open was not activated. When I create new groups, I can see the small folder icon at the main image of the group, but for many images that I know where part of groups, that is not the case. So it seems that the groups don't exist anymore.

The package I am using was not installed using snap but the default apt package: 4:7.5.0-3fakesync1
Comment 6 Maik Qualmann 2022-12-04 12:18:54 UTC
Are you using MySQL or SQLite as the database? If SQLite could you send me the digikam4.db for verification.

Maik
Comment 7 Maik Qualmann 2022-12-04 15:28:24 UTC
Ok, thanks for the database DIFF. It shows that the entries of the ImageRelations table have been deleted.  When I read "database cleanup" in your description, I remembered. This was Bug 450153.
I would recommend restoring your backup. From digiKam-7.6.0 you can then vacuum the database again. Yes, was a very annoying bug.

Maik
Comment 8 yan 2022-12-04 17:49:01 UTC
Thanks a lot Maik. Fortunately I had a recent backup which I just restored. My groups are back.

In Bug 450153 the fix is mentioned for 8.0.0. Is it save to vacuum the database in 7.6?
Comment 9 Maik Qualmann 2022-12-04 17:57:26 UTC
The patch was backported, based on the date, the fix must be included in digiKam-7.6.0. However, a current backup is always advisable.

Maik