Being able to rename physical file

Created on 14 August 2023, over 1 year ago
Updated 17 May 2024, 7 months ago

Problem/Motivation

Discussed on Slack: https://drupal.slack.com/archives/C0287U62CSG/p1692017117804009?thread_t...

I am able to change a file entity name and URI but the physical file is not renamed.

Proposed resolution

Create a plugin to rename file.

Feature request
Status

Fixed

Version

2.0

Component

Miscellaneous

Created by

🇫🇷France Grimreaper France 🇫🇷

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

Merge Requests

Comments & Activities

  • Issue created by @Grimreaper
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    276 pass
  • Issue was unassigned.
  • Status changed to Needs work over 1 year ago
  • 🇫🇷France Grimreaper France 🇫🇷

    Here a first working version.

    Inspired from https://www.drupal.org/project/file_rename , https://git.drupalcode.org/project/file_rename/-/blob/1.0.x/src/Form/Fil....

    Needs tests.

    I have not handled stuff like prepareDirectoy as it currently only allows to rename the file not move it in another directory.

    Also error handling should be done.

    Attaching patch from MR for easier Composer usage.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    This is a nice MR, and it is pretty close to what we need for ECA. It just needs to be developed against the 2.0.x branch of ECA, as no new feature will be going into 1.x. Great coding style too!

    I wonder if there should probably also be a config field for a token name under which the resulting file name will be made available? On the other hand, that could be grabbed from the file entity after the event, so probably not?

    While we're working together on new features like that, I don't think we need the extra overhead of patches for composer usage. You can also patch from the link above, which is https://git.drupalcode.org/project/eca/-/merge_requests/388.diff - yes, I know they shouldn't be used in production environments, but I feel them to be perfectly OK for development purposes.

    I'm going to rebase the MR against the correct branch.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    297 pass
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • Assigned to jurgenhaas
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Looking into this now as part of Add new submodule ECA FileSystem Active

  • Pipeline finished with Success
    8 months ago
    Total: 385s
    #163139
  • Pipeline finished with Failed
    8 months ago
    Total: 450s
    #163140
  • Pipeline finished with Failed
    8 months ago
    Total: 262s
    #163348
  • Pipeline finished with Success
    8 months ago
    Total: 505s
    #163357
  • Pipeline finished with Skipped
    8 months ago
    #163373
  • Status changed to Fixed 8 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • Pipeline finished with Success
    8 months ago
    Total: 474s
    #163372
    • jurgenhaas committed 9cc5dfc0 on 2.0.x
      Issue #3381021 by Grimreaper, jurgenhaas: Being able to rename physical...
    • jurgenhaas committed 94a45b06 on 2.0.x
      Issue #3381021 by Grimreaper, jurgenhaas: Being able to rename physical...
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Success
    about 2 months ago
    Total: 628s
    #329323
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 91s
    #331080
  • Pipeline finished with Success
    about 2 months ago
    Total: 780s
    #331081
  • Pipeline finished with Success
    about 2 months ago
    Total: 533s
    #331145
  • Pipeline finished with Success
    about 2 months ago
    Total: 550s
    #332203
  • Pipeline finished with Success
    about 2 months ago
    Total: 530s
    #332974
  • Pipeline finished with Success
    about 2 months ago
    Total: 622s
    #335112
  • Pipeline finished with Success
    about 1 month ago
    Total: 513s
    #335332
  • Pipeline finished with Failed
    about 1 month ago
    Total: 518s
    #337663
  • Pipeline finished with Failed
    about 1 month ago
    Total: 546s
    #338556
  • Pipeline finished with Failed
    about 1 month ago
    Total: 598s
    #338681
  • Pipeline finished with Success
    about 1 month ago
    Total: 612s
    #338829
  • Pipeline finished with Failed
    about 1 month ago
    Total: 638s
    #340209
  • Pipeline finished with Success
    about 1 month ago
    Total: 569s
    #340406
  • Pipeline finished with Success
    about 1 month ago
    Total: 557s
    #342039
  • Pipeline finished with Failed
    about 1 month ago
    Total: 860s
    #342058
  • Pipeline finished with Success
    about 1 month ago
    Total: 745s
    #342076
  • Pipeline finished with Success
    about 1 month ago
    Total: 544s
    #342457
  • Pipeline finished with Failed
    about 1 month ago
    Total: 620s
    #342468
  • Pipeline finished with Success
    about 1 month ago
    Total: 582s
    #342550
Production build 0.71.5 2024