assign tag A to an image, hit 'apply' assign tag B to the same image, hit 'apply' tag A is now 2 times assigned to A (also two times in the database in the ImageTags table). Reproducible: Always Expected Results: A tag should only be assigned once to an image
Not reproducible here. Which version of digiKam you use ? Do you share tags with Nepomuk (look Metadata setup for details) ? Gilles Caulier
Digikam Versie 2.5.0 Gebruikmakend van KDE Development Platform 4.8.2 (4.8.2) Do not share tags with Nepomuk Han van Os Gilles Caulier schreef op do 31-05-2012 om 10:01 [+0000]: > https://bugs.kde.org/show_bug.cgi?id=300920 > > Gilles Caulier <caulier.gilles@gmail.com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |caulier.gilles@gmail.com > > --- Comment #1 from Gilles Caulier <caulier.gilles@gmail.com> --- > Not reproducible here. Which version of digiKam you use ? > > Do you share tags with Nepomuk (look Metadata setup for details) ? > > Gilles Caulier >
Which Database type do you use ? Mysql or sqlite ? If you store tags into image metadata (check Metadata setup dialog), look your image metadata to see if dual tags are stored in XMP or IPTC or Exif ? Gilles Caulier
In the metadata they are ok (each tag once). In the database and below the thumbnail they are multiple, Han van Os Gilles Caulier schreef op do 31-05-2012 om 10:49 [+0000]: > https://bugs.kde.org/show_bug.cgi?id=300920 > > --- Comment #3 from Gilles Caulier <caulier.gilles@gmail.com> --- > Which Database type do you use ? Mysql or sqlite ? > > If you store tags into image metadata (check Metadata setup dialog), look your > image metadata to see if dual tags are stored in XMP or IPTC or Exif ? > > Gilles Caulier >
run kdebugdialog and turn on digikam debug space. run digiKam from a console, assign tags to image and look debug trace on the console. There is any suitable info to hack ? Gilles Caulier
I activated Digikam in kdebugdialog. Started Digikam from console. Assigning tags only results messages about image orientation: digikam(5524)/digikam (core) Digikam::DImg::load: "/home/han/Afbeeldingen/Afbeeldingenmap/2012/2012-05-12/L1030866.jpg" : JPEG file identified digikam(5524)/digikam (core) Digikam::DImg::load: "/home/han/Afbeeldingen/Afbeeldingenmap/2012/2012-05-12/L1030866.jpg" : JPEG file identified digikam(5524)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation => Exif.Image.Orientation => 1 digikam(5524)/KEXIV2 KExiv2Iface::KExiv2::getImageOrientation: Orientation => Exif.Image.Orientation => 1 Han v Os Gilles Caulier schreef op do 31-05-2012 om 11:40 [+0000]: > https://bugs.kde.org/show_bug.cgi?id=300920 > > --- Comment #5 from Gilles Caulier <caulier.gilles@gmail.com> --- > run kdebugdialog and turn on digikam debug space. > run digiKam from a console, assign tags to image and look debug trace on the > console. There is any suitable info to hack ? > > Gilles Caulier >
There is nothing special to see in the console. Can you share your DB file for investigations ? Gilles Caulier
You will receive my database via WeTransfer.com within some minutes Han v Os Gilles Caulier schreef op do 31-05-2012 om 11:56 [+0000]: > https://bugs.kde.org/show_bug.cgi?id=300920 > > --- Comment #7 from Gilles Caulier <caulier.gilles@gmail.com> --- > There is nothing special to see in the console. > > Can you share your DB file for investigations ? > > Gilles Caulier >
Created attachment 71483 [details] Schermafdruk van 2012-05-31 22:26:20.png CREATE TABLE ImageTags (imageid INTEGER NOT NULL, tagid INTEGER NOT NULL, UNIQUE (imageid, tagid)); Any duplicate entry in the database would be violating the table definition. How do you check the entries? MySQL or SQLite?
sqlite. check screenprint of database browser attached. HvO Marcel Wiesweg schreef op do 31-05-2012 om 18:04 [+0000]: > https://bugs.kde.org/show_bug.cgi?id=300920 > > --- Comment #9 from Marcel Wiesweg <marcel.wiesweg@gmx.de> --- > CREATE TABLE ImageTags > (imageid INTEGER NOT NULL, > tagid INTEGER NOT NULL, > UNIQUE (imageid, tagid)); > > Any duplicate entry in the database would be violating the table definition. > How do you check the entries? MySQL or SQLite? >
I checked the database. The Create table statement does not contain the constraints mentioned below. So the problem is solved, as far as i am concerned. I will repair the database. Thank kindly for your help. Best regards, Han van Os Marcel Wiesweg schreef op do 31-05-2012 om 18:04 [+0000]: > https://bugs.kde.org/show_bug.cgi?id=300920 > > --- Comment #9 from Marcel Wiesweg <marcel.wiesweg@gmx.de> --- > CREATE TABLE ImageTags > (imageid INTEGER NOT NULL, > tagid INTEGER NOT NULL, > UNIQUE (imageid, tagid)); > > Any duplicate entry in the database would be violating the table definition. > How do you check the entries? MySQL or SQLite? >
Still weird that the UNIQUE constraint was not in your database's schema. It's definitely in the SQL code that we ship.