Renaming files in dolphin does not work

I have found two ways to 100% reproduce this bug:

Method #1

  1. Click on a file in Dolphin, then click it again to enter the inline filename editing mode. This works most reliably from “Compact” or “Details” file view. “Icons” view sometimes requires an extra click or two to enter filename editing mode.
  2. Even though you are already in filename editing mode, press F2 on your keyboard.
  3. Rename the file and hit Enter.

ACTUAL RESULT: The file fails to rename.

EXPECTED RESULT: The file should now have the new name.

Method #2

  1. Click on a file in Dolphin.
  2. Press F2 on your keyboard twice.
  3. Rename the file and hit Enter.

ACTUAL RESULT: The file fails to rename.

EXPECTED RESULT: The file should now have the new name.


I figured this out while editing a folder containing hundreds of PDF files, and the rename failures usually seemed to happen when I switched back to Dolphin from another application. I always use F2 on my keyboard to rename a file, but when activating Dolphin by clicking on an already-selected file, it would very briefly enter filename editing mode just before my swift F2 keypress was registered, thus triggering the bug.

Perhaps there may be additional ways to trigger the bug as others here have reported, but I’m pretty sure this is what was happening in my case, and why the failures seemed to be so random.

Oh Mr Bumpy, you made me so happy that I can finally reproduce this (without it being in a search result).

That’s absolutely brilliant, so this bug is basically reproducible by pressing F2 whilst already in edit mode…

It’s hardly surprising that nobody could deliberately reproduce it (and folks with the ‘issue’ said it was not 100%).

It really feels like we’ve been trolled for the last month over this… so it’s a USER issue really, but the bug would be that pressing F2 when already in Edit mode should either exit edit mode, or do nothing at all.

So it’d be nice if the other victims of this huge :bug: would verify whether it’s the same for them.

From testing a few different Linux live ISO files, I have found that the bug does not occur in Dolphin 25.08.1, but does occur in Dolphin 25.12.3. I’m not sure about versions in-between, but this seems to be a fairly recent regression.

I was just able to test further Dolphin versions thanks to the Windows builds (which exhibit the bug), so now we can pin down the bug’s appearance to somewhere between 25.08.2 and 25.12.1.

There is 25.08.3 and 25.12.0 in between.

The most important version to test is 25.12.0 since it is a major version. That’s where the regression appeared first most likely or at least can reduce further the list of versions to test and then investigate from.

The best way to pick versions to test to detect regression is dichotomy.

For KDE Gears distribution, the first number is a the year, the second, the month, the next a maintenance release number.

This is all documented Schedules - KDE Community Wiki

That’s kinda helpful, it reduces the list of change to review.

I think I found the culprit commit: KItemListView: Don't allow starting role editing when animation is running (94e08f04) · Commits · System / Dolphin · GitLab

Feel free to test kitemlistview: don't cancel an edit if already editing (!1218) · Merge requests · System / Dolphin · GitLab

Until the fix makes it into my desktop, I took over the F2 keyboard shortcut with a crude hack using xdotool (me being on X11) to simulate the pressing of the Menu key, followed by r.

REPLACES THE MESSAGE ABOVE: I had to remove the code from here because I found issues and I cannot update code here.

@meven tested the fix in the current git and cant reproduce the bug with the git version.
Sure i had the issue before with the current release version on cachyos.

thx a lot for the fix.

Sorry to add noise: what version will have the fix? I switched to Manjaro-unstable and got Dolphin 26.04.0, but the issue still occurs.

@the-ge On CachyOs the current version is 26.04.0-1.1 and for me the issue is fixed (as it was in the current git version).

Same as popyKDE or same as me :smiley:?

Yes, it seems I’m on Dolphin 26.04.0-1. Is there any way to get that, other than

pamac list --installed | grep 'dolphin'

?

I haven’t been able to replicate this bug, so yes - same as popy :stuck_out_tongue:

dolphin -v
dolphin 26.04.0
QThreadStorage: entry 4 destroyed before end of thread 0x55e58a085b80
QThreadStorage: entry 3 destroyed before end of thread 0x55e58a085b80

The extra Qt errors are just noise - that appears also with konsole/spectacle, nothing to worry about.

Those QThreadStorage should be fixed in next Qt version, btw.

Hi,

Am I understanding it correct, that it should be fixed on the newest CachyOS version?

I still can replicate it 100% with the 2*F2 method (even with the simplest filename “a.txt”->F2->F2->“b.txt”->“a.txt”).

My System:

Operating System: CachyOS Linux
KDE Plasma Version: 6.6.4
KDE Frameworks Version: 6.25.0
Qt Version: 6.11.0
Kernel Version: 7.0.3-1-cachyos-bore (64-bit)
Graphics Platform: Wayland
Dolphin 26.04.0-1.1 (from cachyos-extra-znver4)
CPU: Ryzen9 9950X3D
FS: /dev/nvme2n1p2 on / type btrfs (rw,noatime,compress=zstd:1,ssd,discard=async,space_cache=v2,subvolid=256,subvol=/@)
$LANG: en_US.UTF-8

I didn’t understand this - I still can’t make it happen.

Can you actually explain the 2*F2 method step by step without missing out steps?

Sorry @all i confused the bug with another one.

I can also replicate the bug 100% in CachyOS with Dolphion 26.4.0.

To reproduce do the following (exactly the same like @PietroPizzi):

  • Open dolphin
  • select a folder with at least a file in it
  • mark a file (ex. a.txt) with a single short mouse click
  • hit F2
  • hit F2 again
  • Change the filename with the keyboard
  • hit enter
  • issue occurs → file will revert to original file name

I still have this issue as well

I’m sorely tempted to ask why you think it’s a good idea to press F2 to enter edit mode, and then… press it again.

I accept that it shouldn’t really make a difference, so there is a bug…

Actually there are TWO bugs here :stuck_out_tongue: The first is that you employed a rather strange tactic to uncover the bug… I believe it’s called ‘out of bounds’ interactions…

Avoiding AI for this one, employing :brain: tells me that pressing F2 again should:

  1. Do absolutely nothing or

  2. Completely cancel the edit mode cleanly.

Call in @Mevin 'cos he is the boss in this domain :wink:

How many more ghosts in the machine?

… it’s fairly easy, barely an inconvenience ;).

Because you don’t have to press F2 two times. Another naturaly way I trigger the bug “all the time”:

  1. Open Dolphin and work in 2 pane mode
  2. Click on a file in one pane
  3. Click on a file in the other pane
  4. Click on the already selectet file in the first pane
  5. Hit F2
  6. Edit the file
  7. Press enter
  8. Filename gets reverted

It also works even more natural:

  1. Open Dolphin
  2. Click on a file
  3. Click on a nother app
  4. Click on the already selected file in Dophin
  5. Instantly Hit F2 (so you don’t see that it goes into edit mode before)
  6. Edit the file
  7. Press Enter
  8. Filename gets reverted

That is like 2 times F2 because clicking on a selected file, even if you come from another pane or app, goes directly into edit mode but clicking on a non selected file just selects it. So my natural habit when i want to rename a file, is click on it and instantly hit F2. This works on non selected files but with this bug not on selected.

So the solution should be that the 2nd F2 does nothing (not turns edit mode of because then you have the problem that it seams that F2 did nothing) OR select a selected file, coming from another pane or app, should NOT go into edit mode, just if you select it a 2nd time from within the same working pane.

I would prefere that both this solutions would be true the same time. Because the first one (2*F2) is just a real bug and the 2nd one "(selecting a file from outside goes strait into rename mode) is just annoying i think :wink:.