Bug 227898

Summary: Colon in tag causes blank tag in tag list
Product: [Applications] dolphin Reporter: Chris Fritz <chris.fritz>
Component: generalAssignee: Peter Penz <peter.penz19>
Status: RESOLVED FIXED    
Severity: normal CC: sebastian
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Chris Fritz 2010-02-21 08:02:48 UTC
Version:           1.4 (using KDE 4.4.0)
OS:                Linux
Installed from:    Ubuntu Packages

Expected behavior: Tagging a file with "Artist:BARASUI" will result in the file having a tag with the text "Artist:BARASUI".

Actual result: Tagging a file with "Artist:BARASUI" results in the file having a tag with the text "".  ***Adding the "Artist:BARASUI" tag a second time results in the expected behavior (file is tagged with the "Artist:BARASUI" text).***  However, the "" tag remains in the tag list, and cannot be deleted.  More "" tags fill up as I try using more tags with colors, such as "Series:Strawberry Marshmallow" or "Studio:Studio Ghibli" or "Character:Fakir".

Here are some screen shots showing the process:

1) I am adding the tag "Artist:BARASUI" to an image file.
http://www.flickr.com/photos/chris-fritz/4374486125/sizes/o/

2) The tag in the info panel shows a Nepomuk resource.
http://www.flickr.com/photos/chris-fritz/4374486249/sizes/o/

3) Changing the image's tags shows the tag is blank.
http://www.flickr.com/photos/chris-fritz/4374486363/sizes/o/
Comment 1 Chris Fritz 2010-02-21 08:13:48 UTC
Since posting this bug report, closing and reopening Dolphin has wiped out my tags.  I tried tagging without colons, and had the same problem in this report.  Tagging without colons worked earlier, before I tried using colons.  I wonder if using colons broke something so I can't get tagging to work at all, or if this is a coincidence that things broke at the same time as I tried using colons in tags.
Comment 2 Chris Fritz 2010-02-21 08:35:51 UTC
Deleting everything in ~/.kde/share/apps/nepomuk/repository/ has allowed Dolphin to tag correctly again if I do not use colons.  Also, during the time I had the issues in this bug report, Dolphin would forget all tags on files when Dolphin was closed, or if I left Dolphin open without doing anything for a few minutes (files would simply no longer be tagged).  Deleting those database files has solved this problem.

With the problem "fixed", I was able to test reproducing it.  The following steps reproduce the issues I'm seeing:

1) Click on "Add tags" in the information panel.
2) Create a new tag with the tag containing a colon.
3) Click OK.
4) Click on "Change" in the information panel to change tags.
5) Delete the tag with the colon in it.
6) Click "OK".
7) Click on "Add tags" in the information panel.  There will be a blank tag.

At this point, different things happen each time for me.  Sometimes closing and opening Dolphin causes all tags to be lost.  Other times, closing and opening Dolphin retains the tags, but each time Dolphin is closed and opened, there are more blank tags (whereas repeatedly bringing up "Add tags" without closing Dolphin doesn't add more).  It's inconsistent.
Comment 3 Sebastian Trueg 2010-02-25 16:39:03 UTC
SVN commit 1096034 by trueg:

Determine all URIs before removing a resource. This is a workaround for the problem
that one resource could be created twice without being loaded. Then, if one of them
is deleted the other one would still be around.

BUG: 227898
BUG: 225528


 M  +17 -2     resourcedata.cpp  
 M  +12 -0     resourcemanager.cpp  
 M  +9 -0      resourcemanager_p.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1096034