Image popup empty after renaming folder [4.x]:
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
What happened?
After renaming the asset folder the asset popup to select is empty.
Description
This is happening when the folder/subfolder it leads to is changed. I have included three photos; one showing the empty asset picker, one showing that there are in fact assets, and the last showing the assets in the folder structure.
Steps to reproduce
- Create an assets field with one location and assign it a subfolder. Example: header-images
- Add field to section
- Create an example page and fill in the asset field created in step one
- Go to the Assets section of the admin, right-click the subfolder header-images and choose rename
- Rename said subfolder to Header Images
- Return to created example page and try to select a new image for the asset field (you will notice it is empty now too)
Expected behavior
Be able to rename folders without this anomaly
Actual behavior
I have included three images to hopefully help better illustrate the problem. Please let me know if you need more information from me.
Craft CMS version
4.2.1.1 Pro Trial
PHP version
8.0.8
Operating system and version
macOS BigSlur | Local MAMP Pro
Database type and version
MySQL 5.7.34
Image driver and version
No response
Installed plugins and versions
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the listed steps in Craft CMS 4.2.1.1, focusing on an asset field restricted to the renamed subfolder. Inspect the asset picker and folder-renaming flow to determine why the renamed folder appears empty; done means existing assets remain selectable after the rename and the behavior is covered by a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100