Bug 493862 - Dolphin tag folders fail when meeting a "/mytag"
Summary: Dolphin tag folders fail when meeting a "/mytag"
Status: ASSIGNED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 492905 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-30 08:54 UTC by tagwerk19
Modified: 2025-03-09 07:12 UTC (History)
7 users (show)

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


Attachments
kedittagsdialog.cpp Baloo-widgets.patch (391 bytes, text/plain)
2024-10-10 18:44 UTC, reports_go_brrr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tagwerk19 2024-09-30 08:54:37 UTC
SUMMARY
    If you assign a tag with a leading slash, "/mytag", to a file, "mytag"
    appears in Dolphin's Places Panel, Tags section and under the
    "All Tags" view, however you get an

        Could not enter folder tags:/mytag

    error when you try to open the folder.

STEPS TO REPRODUCE:

1...
    Make sure you have content indexing enabled and you are indexing
    your test directory

2...
    Create a test file and assign a tag "/mytag":

        $ echo "Hello Penguin" > test-file.txt
        $ setattr -n "user.xdg.tags" -v "/mytag" test-file.txt

3...
    Confirm that Baloo has indexed it with

        $ baloosearch tags:/mytag

    and the "mytag" folder appears in Places and under the tags:"All Tags" folder

4...
    Click on "mytag" under Places...

OBSERVED RESULT:
    You will get an

        Could not enter folder tags:/mytag

    error message

EXPECTED RESULT:
    If you click on "mytag" you get the list of files tagged with "/mytag" or "mytag".

SOFTWARE/OS VERSIONS:
    Neon Unstable
    Dolphin: 24.11.70
    Plasma: 6.1.90
    Frameworks: 6.7.0
    Qt: 6.7.2

ADDITIONAL INFORMATION:
    Not just Neon Unstable but elsewhere, also seen on Fedora 40

    Plasma: 6.1.4
    Frameworks: 6.5.0
    Qt: 6.7.2

    The Tags section under Places does not distinguish between "mytag" and
    "/mytag", ideally there should be a way of looking just for "/mytag" (and
    finding file tagged with "/mytag" and not those with "/parenttag/mytag")

    Of course this bug may belong elsewhere...
Comment 1 tagwerk19 2024-10-01 13:39:28 UTC
Discussion here:
    https://old.reddit.com/r/kde/comments/1fosm7i/dolphin_cannot_enter_folder_tags/
with reference to Bug 491393

*** This bug has been marked as a duplicate of bug 491393 ***
Comment 2 tagwerk19 2024-10-01 13:51:09 UTC
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)

I had set this as a duplicate of 491393, I think I'll reopen it...
Comment 3 reports_go_brrr 2024-10-05 19:07:05 UTC
Can reproduce.

Operating System: Arch Linux 
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.6.0
Qt Version: 6.8.0
Kernel Version: 6.10.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 4 reports_go_brrr 2024-10-05 19:26:44 UTC
Heck, it is just becoming the whole maze with this silly, pesky, awful bug. Aaarrrgh!
Can I mark this bug report as a duplicate of #488588? This one was sent 16 June 2024.
Comment 5 tagwerk19 2024-10-06 05:42:27 UTC
(In reply to reports_go_brrr from comment #4)
> Aaarrrgh!
Heartfelt "Aaarrrgh!" understood :-)

> Can I mark this bug report as a duplicate of #488588? This one was sent 16 June 2024.
You can see I originally marked this as a duplicate but then I changed my mind. The rationale being Bug 488588 (et. al.) refer to add/editing tags in the F11 info panel. However Dolphin also fails if it meets a  previously created "/mytag". It should be proof against this independent of how it is created.

Maybe it's the same root cause but slightly different symptoms. I would say keep the two separate.
Comment 6 reports_go_brrr 2024-10-10 18:44:22 UTC
Created attachment 174644 [details]
kedittagsdialog.cpp Baloo-widgets.patch

Not fully, but partially fixed problem.
Can be implemented towards kedittagsdialog.cpp in Baloo-widgets git sources.
Comment 7 David Edmundson 2024-10-25 15:42:13 UTC
*** Bug 488588 has been marked as a duplicate of this bug. ***
Comment 8 reports_go_brrr 2024-11-18 13:48:54 UTC
I you can, please help me with approval of my merge request. It must fix the bug at the side of tags creation. Now it does not creates tag with slash before it.
https://invent.kde.org/libraries/baloo-widgets/-/merge_requests/80
Comment 9 Akseli Lahtinen 2024-11-26 14:57:24 UTC
*** Bug 492905 has been marked as a duplicate of this bug. ***
Comment 10 Bug Janitor Service 2025-03-03 23:57:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/libraries/baloo-widgets/-/merge_requests/86
Comment 11 Méven 2025-03-05 12:35:30 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 488588

M  +1    -1    src/kedittagsdialog.cpp

https://invent.kde.org/libraries/baloo-widgets/-/commit/8b69de1110b20a24ef41842efd7d1bb634568de0
Comment 12 tagwerk19 2025-03-09 07:12:41 UTC
(In reply to Méven from comment #11)
> Git commit 8b69de1110b20a24ef41842efd7d1bb634568de0 by Méven Car.
> Committed on 05/03/2025 at 12:29.
> Pushed by meven into branch 'master'.not enter folder tags:
> 
> kedittagsdialog: Don't prepend slash to tags
> Related: bug 488588
The commit fixes the issue of prepending a slash when adding/editing tags in the F11 info panel, it does not help if you have already written such tags to the xattr data.

If you had created a tag "/badtag" before the patch, Dolphin still gives an error "Could not enter folder tags:/badtag"