Bug 462269 - "Show Target" on relative symlinks does not work anymore since 22.0X
Summary: "Show Target" on relative symlinks does not work anymore since 22.0X
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 22.08.3
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-11-26 13:56 UTC by hasezoey
Modified: 2023-04-03 10:08 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hasezoey 2022-11-26 13:56:16 UTC
SUMMARY
Since around 22.08 Dolphin is not capable of opening relative symlinks with "Show Target" anymore, before it could do it and non-relative symlinks work, also using "Properties -> Points To -> (Button on the right side)" works too for relative links


STEPS TO REPRODUCE

1. Setup:
(script assumes that you are at / for absolute links)
mkdir -p ./testroot/testlower1/testlower2
mkdir -p ./testroot/links
ln -sf /testroot/testlower1/testlower2  ./testroot/links/non-relative
ln -sfr /testroot/testlower1/testlower2  ./testroot/links/relative

2. now go to /testroot/links within dolphin
3. try to use context menu "Show Target" on the "relative" link and observe nothing happens
4. try to use context menu "Show Target" on the "non-relative" link and observe that it opens a new tab in the correct place
5. try to use context menu "Properties" on "relative" and then the "Points To" button on the right and observe that it now opens a new tab like the "non-relative" 

OBSERVED RESULT

"Show Target" does nothing anymore on relative symlinks

EXPECTED RESULT

"Show Target" to open a new tab with the target path

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.7
Kernel Version: 6.0.8-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX Vega
Manufacturer: ASUS

ADDITIONAL INFORMATION

I am not sure if it is since 22.08 because of how manjaro updated it, but i know that the last 21.XX version works perfectly whereas (at least) 22.08 does not work.
I have also tried already to remove `~/.config/dolphinrc`, which did not have a effect on this.

i have seen some logs when trying to do "Show target", but i am not sure if it is related to "Show target" or just switching between terminal and dolphin window:

Nov 26 14:53:49 Meicoo-Manjaro plasmashell[1503]: org.kde.plasma.libtaskmanager: Got invalid activation app_id: ""
Nov 26 14:54:05 Meicoo-Manjaro dolphin[91207]: qt.qpa.wayland: setGrabPopup called with a parent, QtWaylandClient::QWaylandXdgSurface(0x560d6d2c2c80) which does not match the current topmost grabbing popup, QtWaylandClient::QWaylandXdgSurface(0x560d6dce3fc0) According to the xdg-shell protocol, this is not allowed. The wayland QPA plugin is currently handling it by setting the parent to the topmost grabbing popup. Note, however, that this may cause positioning errors and popups closing unxpectedly because xdg-shell mandate that child popups close before parents
Nov 26 14:54:06 Meicoo-Manjaro plasmashell[1503]: org.kde.plasma.libtaskmanager: Got invalid activation app_id: ""
Comment 1 Werner Lehmann 2022-12-20 23:26:58 UTC
I can confirm this bug on Fedora 37, same version of Dolphin. Plus related other issues with symlink handling:

mkdir -p linktargets
touch 'linktargets/file' 'linktargets/file # file'
for x in linktargets/* ; do ln -s "$x"; done

This produces

$ tree
.
├── file -> linktargets/file
├── file # file -> linktargets/file # file
└── linktargets
           ├── file
           └── file # file


For the link named "file":

1) "Show Target" does not work on any of the links. As reported with this ticket.

2) The status bar shows issue #456198. When selecting this link, the status bar reads:
      file (empty document, Link to file:///home/wl/var/test/file)
It should be
      file (empty document, Link to file:///home/wl/var/test/linktarget/file)

For the link named "file # file":

3) The status bar reads:
      file # file (empty document, Link to file:///home/wl/var/test/file %23 file)
It should be
      file (empty document, Link to file:///home/wl/var/test/linktarget/file # file)

4) The properties dialog, button ">.", does not resolve the link but shows a warning:
      The file or folder /home/wl/var/test/linktargets/file  does not exist.
It should resolve and jump to the link instead. Apparently it cuts everything off after the hash symbol.

Note that column "Link Destination" in the file list always shows the correct value.
Comment 2 hasezoey 2022-12-22 16:36:11 UTC
Recently updated to "dolphin 22.12.0" (manjaro), and now the "Show Target" works again, but it opens 2 new instances of dolphin instead of just 1 as a tab in the same instance
Comment 3 hasezoey 2022-12-22 16:38:20 UTC
correction, it opens a random number of new instances when clicking "show target", from what i have tested:
at least 1 new instances are opened
at most (currently) 15 new instances are opened
opening 2 instances is the most common
Comment 4 Werner Lehmann 2022-12-31 10:13:10 UTC
I am now also on Dolphin 22.12.0 (Fedora 37). "Show Target" in the link's context menu opens a new Dolphin window with the expected location for me now. I don't see more than one window. However, this used to be a new tab, not a new window. This sort of resolves the originally reported issue for me, although I'd really prefer to get a new tab.

Issues 2, 3, 4 reported in comment 1 remain though.
Comment 5 Werner Lehmann 2022-12-31 10:27:31 UTC
I did not realize it before but actually this also depends on whether the link points to a directory or to a file. 

For file links everything is as described before including the remaining issues. "Show Target" opens a new window with the containing directory of the link target. I guess this has not been different before. A new tab would be nice. For directory links there is more control. A (double)click opens the link target in the same tab. The context menu allows to open it in a new tab or a new window. And "Show Target" opens a new window with the link target location (the parent directory).
Comment 6 hasezoey 2023-04-03 10:08:58 UTC
Seems to be fixed with dolphin 22.12.3 and KDE 5.27 and frameworks 5.104
(it now opens the paths of symlinks, with only one instance via the "show target" way)

Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.8-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX Vega
Manufacturer: ASUS