Rename folder needs clear cache to render updated file link

Created on 19 October 2023, 8 months ago
Updated 17 November 2023, 7 months ago

Problem/Motivation

Renaming folder via IMCE needs clear cache to render updated file link.

Steps to reproduce:

  1. create a folder via IMCE and upload a file in it (eg. /sites/default/files/news_attachments/test.pdf)
  2. create a node and select that file in a file field (eg. "attachments")
  3. via IMCE rename the folder of the file (eg. /sites/default/files/news_files/test.pdf)
  4. visit the node.

After renaming folder I continue to see the link of the file with the old path.
Clearing drupal cache solves the problem.

Proposed resolution

Maybe in src/Plugin/ImcePlugin/Rename.php@renameFolder() clear a specific cache table.

Thank you!

💬 Support request
Status

Needs work

Version

2.0

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024