Bug 488588 - Tags are added incorrectly with slash (/) through Information Panel (F11) Tags section
Summary: Tags are added incorrectly with slash (/) through Information Panel (F11) Tag...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 24.08.0
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 491393 492903 497422 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-16 16:19 UTC by m1vri31c
Modified: 2025-03-09 07:06 UTC (History)
9 users (show)

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


Attachments
Showcase (2.96 MB, video/mp4)
2024-09-10 15:29 UTC, reports_go_brrr
Details
kedittagsdialog.cpp Baloo-widgets.patch (391 bytes, text/plain)
2024-10-10 18:39 UTC, reports_go_brrr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m1vri31c 2024-06-16 16:19:05 UTC
SUMMARY
Tags are added incorrectly through add/edit tags menu. They are added with an unnecessary "/" before them, and those tags do not appear in the tag menu or other tags views like all tags. This happens whether existing tags are ticked or new tags are typed in. If an item is dragged into a tag fragment it gets tagged just fine without the "/" in front of it. You can actually tag things twice with the same tag, the "/" version and the regular, by ticking the tag in the edit tags menu and by dragging it into the tag.

STEPS TO REPRODUCE
1. Tick tag in edit tags menu or add it by typing in a new or existing tag

OBSERVED RESULT
Tag is added, and looks normal in properties panel only, while in the Tags info column it has a "/" in front of the tag. The item does not appear in any tag fragments, including new tags not appearing as a tag fragment or in the places panel (although if you add a tag to a tag, both new, e.g. Tag1/Tag2, Tag1 is added as a tag fragment).

EXPECTED RESULT
Tag is added where it is meant to and without an unnecessary "/" in front of it.

SOFTWARE/OS VERSIONS
NixOS 24.11 (unstable channel)
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0 
Qt Version: 6.7.1
Comment 1 m1vri31c 2024-07-16 02:02:17 UTC
Sorry, I forgot the context menu add tags menu existed. This refers to the pop-up window accessed through the properties panel. Adding/editing tags works as intended through the context menu.
Comment 2 m1vri31c 2024-09-10 13:55:32 UTC
*** Bug 492898 has been marked as a duplicate of this bug. ***
Comment 3 reports_go_brrr 2024-09-10 15:20:45 UTC
To m1vri31c@duck.com
First of all, thank you for reporting this bug before me. So i'll mark my 492903 bug as duplicate of yours.
Easily reproduced on mine system.

I'd like to describe it more detailed to resolve confusions:
There are 2 methods of assigning the tag: through "Assign Tags" in Context menu and through Information Panel.
Information Panel assigns tag with slash (/) like "/context" while "Assign Tags" does this without slash (/) so tag must be like "context".

Tag itself can be watched if it is with with slash (/) or not through:
1. By holding mouse over tag name in "Tags:" section in Information Panel (F11)
2. Through "Tags" column
3. Through terminal for file through `getfattr -d <path-to-file>`

# Reproduced bug under:
Operating System: EndeavourOS
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.7-arch1-1 (64-bit)
Graphics Platform: X11
Vanilla Dolphin, vanilla Baloo, vanilla EndeavourOS.

---

Also... I want to ask question to you: Can I modify yours summary from "Tags are added incorrectly through add/edit tags menu" to "Tags are added incorrectly with slash (/) through Information Panel (F11) Tags section" to eliminate confusions in title of bug?
Comment 4 reports_go_brrr 2024-09-10 15:29:14 UTC
Created attachment 173532 [details]
Showcase
Comment 5 reports_go_brrr 2024-09-10 15:31:40 UTC
*** Bug 492903 has been marked as a duplicate of this bug. ***
Comment 6 m1vri31c 2024-09-11 03:46:47 UTC
(In reply to reports_go_brrr from comment #3)
> Also... I want to ask question to you: Can I modify yours summary from "Tags
> are added incorrectly through add/edit tags menu" to "Tags are added
> incorrectly with slash (/) through Information Panel (F11) Tags section" to
> eliminate confusions in title of bug?

I went a head and made the change, that is much clearer
Comment 7 tagwerk19 2024-09-13 17:20:06 UTC
There's some bulletproofing needed with tags ...

... Also Bug 433990, Bug 437494, Bug 437501
Comment 8 reports_go_brrr 2024-10-05 19:18:00 UTC
*** Bug 491393 has been marked as a duplicate of this bug. ***
Comment 9 reports_go_brrr 2024-10-10 18:39:28 UTC
Created attachment 174642 [details]
kedittagsdialog.cpp Baloo-widgets.patch

Patch I made fixed my problem. Implement it at latest git of Baloo-widgets.
Comment 10 David Edmundson 2024-10-25 15:42:13 UTC
*** This bug has been marked as a duplicate of bug 493862 ***
Comment 11 reports_go_brrr 2024-11-18 13:44:55 UTC
Okay, I made a merge request which must fix this bug. Help me to approve it.
https://invent.kde.org/libraries/baloo-widgets/-/merge_requests/80
Comment 12 postix 2024-12-13 18:58:13 UTC
*** Bug 497422 has been marked as a duplicate of this bug. ***
Comment 13 Bug Janitor Service 2025-03-03 23:57:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/baloo-widgets/-/merge_requests/86
Comment 14 Bug Janitor Service 2025-03-04 12:51:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/baloo-widgets/-/merge_requests/87
Comment 15 Bug Janitor Service 2025-03-05 12:17:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/baloo-widgets/-/merge_requests/88
Comment 16 Méven 2025-03-05 12:35:38 UTC
Git commit 8b69de1110b20a24ef41842efd7d1bb634568de0 by Méven Car.
Committed on 05/03/2025 at 12:29.
Pushed by meven into branch 'master'.

kedittagsdialog: Don't prepend slash to tags
Related: bug 493862

M  +1    -1    src/kedittagsdialog.cpp

https://invent.kde.org/libraries/baloo-widgets/-/commit/8b69de1110b20a24ef41842efd7d1bb634568de0
Comment 17 tagwerk19 2025-03-09 07:06:21 UTC
I can see that this has reached Neon Unstable...

If I add a tag from within the F11 info panel, it no longer gets a slash prepended.

I can be nasty and try adding a tag with explicit slashes, such as "/mytag/". These slashes get removed.

I can add a hierarchical tag such as parent/child and that gets added

It is still the case that if there's an xattr tag with a prefixed slash (a "/badtag"), Dolphin includes it in the Places panel and fails when trying to open the tag folder. This can be considered a bit of a hangover, people could have edited tags and written them back with prepended slashes and get the "Could not enter folder tags:/badtag" failure. Bug 493862 is still there, a bit more bulletproofing would be nice...

It is good to see this bug fixed though, it was hurting. Thanks.