craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.21k stars 624 forks source link

[5.x]: "Rename file" (and others) on folder leads to error message #15301

Closed webkp closed 2 months ago

webkp commented 2 months ago

What happened?

Description

When selecting a folder and trying to do "Rename file" an error appears (independently of the filesystem type [same with S3 or local]).

Note: While I create this issue for "Rename file", the other operations like "Preview file", "Download" and "Copy reference tag" lead to errors too when using them on folders. Only "Move" and "Delete" work as expected.

Steps to reproduce

04-07-2024_15-57-54

Expected behavior

Preferred: Disable and grey out "Rename file" as it is the case with "Replace file" and others -or- Being able to rename folders (but then I guess it should simply be "Rename" and not "Rename file".

Actual behavior

Operation "Rename file" is available for folders which leads to said error

Craft CMS version

5.2.5

PHP version

8.2

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

i-just commented 2 months ago

Hi, thanks for reporting! I raised a PR for this.

brandonkelly commented 1 month ago

Craft 5.2.6 is out now with a fix for this. Thanks again!