SUMMARY When adding tags to one or more files using the button in the information panel (unlike when using right click > assign tags), a / (slash) will be added to the tag name. In addition to adding a character that's not supposed to be there to the tag name, this causes some issues such as the file not appearing when browsing files by tag. STEPS TO REPRODUCE 1. use right click > assign tags to add a new tag to a file or directory 2. select one or more files and add the same tag to another file using the info panel 3. You might have to restart dolphin in order for the tag to show in the "tags" section OBSERVED RESULT When enabling "show additional information" > "tags" (or using the "assign tags" right click menu to inspect the tags), You will see that on the first file, the tag shows correctly, whereas on the second file, a slash is added to the tag. When selecting the tag in the tags section on the "places panel" in order to browse all files with the tag, You will find only files that had the tag added using the right click menu show, whereas the files you added the tag to by using the information panel won't show. This is pretty bad since one of the main reasons to use tags (at least for me) is to later browse all files with that tag. EXPECTED RESULT The tag gets added correctly, and the file appears when browsing the tag. SOFTWARE/OS VERSIONS Operating System: Aurora-DX 40 KDE Plasma Version: 6.1.3 KDE Frameworks Version: 6.4.0 Qt Version: 6.7.2 Kernel Version: 6.9.7-200.fc40.x86_64 (64-bit) Graphics Platform: Wayland Processors: 8 × Intel® Core™ i3-10100 CPU @ 3.60GHz Memory: 15.5 GiB of RAM Graphics Processor: AMD Radeon RX 6600 XT ADDITIONAL INFORMATION -
Created attachment 172494 [details] a python script to automatically fix file tags with an extra slash ("/") For anyone else coming across this issue who wants to use the information panel for tagging but also wants to be able to browse tags properly, this is my python script that I use to recursively fix all file tags starting from a given directory (requires xattr which can be installed from pypi).
I'm not super familiar with the source code, nor do I know how to build a custom baloo-widgets and have that work with my Dolphin instance, so I might be totally wrong with this but in baloo-widgets/src/kedittagsdialog.cpp line 148 (https://github.com/KDE/baloo-widgets/blob/master/src/kedittagsdialog.cpp#L148), I wonder if the leading "QLatin1Char('/') +" is the reason it's happening.
(In reply to Kody from comment #2) > I'm not super familiar with the source code, nor do I know how to build a > custom baloo-widgets and have that work with my Dolphin instance, so I might > be totally wrong with this but in baloo-widgets/src/kedittagsdialog.cpp line > 148 > (https://github.com/KDE/baloo-widgets/blob/master/src/kedittagsdialog. > cpp#L148), I wonder if the leading "QLatin1Char('/') +" is the reason it's > happening. Thank You! That looks like it really could be the relevant code, especially considering it was added 8 months ago, and I remember this is around the time this bug started to happen. I am, unfortunately, not at all familiar with the codebase either, but maybe someone else with more knowledge will be able to confirm this is the cause and pr a solution.
*** Bug 493862 has been marked as a duplicate of this bug. ***
(In reply to tagwerk19 from comment #4) > *** Bug 493862 has been marked as a duplicate of this bug. *** Upon reflection there are two bugs here... ... One is the way that Dolphin adds the leading slash (when it probably should not) ... The second is that Dolphin cannot cope with existing leading slashes (so it stumbles on tags:/mytag)
(In reply to tagwerk19 from comment #5) > ... Dolphin adds the leading slash (when it probably should not) Marking confirmed....
Confirmed in Dolphin 24.08.1 on : EndeavourOS KDE Plasma Version: 6.1.5 KDE Frameworks Version: 6.6.0 Qt Version: 6.7.3 Kernel Version: 6.11.1-arch1-1 (64-bit) (Tagging files in Gwenview works without issue).
Fix me if there is more ancient bug report than #488588 *** This bug has been marked as a duplicate of bug 488588 ***
Created attachment 174643 [details] kedittagsdialog.cpp Baloo-widgets.patch Patch I made fixed my problem. Implement it at latest git of Baloo-widgets.