Re-Enable Folder Renaming

Created on 29 August 2018, over 6 years ago
Updated 19 January 2025, 3 months ago

I've noticed folder renaming is no longer allowed in the Drupal 8 version. There is specifically this comment above a commented out submitForm() method in the src/Form/RenameForm:

// Folder renaming is disabled in D8 version.
// Folder renaming is very expensive on remote storage because directories are prefixes to the files.
// Renaming these "directories" requires all the files with these prefixes to be changed. Also, it requires
// all the paths to be changed in the database. Until we find a safe and stable way to do this,
// while maintaining the assigned fids, Folder renaming is not available.

In the section of the code which does the renaming for all contents within the folder, there is also this comment:

         // if this is a folder we have to update the root for this and other files also:
         if (!$is_file) {
           // get all the content for this node.
           // I am not very happy with this fiddling around with the DB.
           // todo: better solution using entities

I have swapped the commented out submitForm() methods and attempted to rename folders without any issues, but I am also unfamiliar with exactly what the issue is. We are not using remote storage for this particular project if that matters. I also was not able to find a relevant issue related to this.

Thanks!

✨ Feature request
Status

Closed: outdated

Version

2.0

Component

Directory Listing Pages

Created by

πŸ‡ΊπŸ‡ΈUnited States joegl

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024