[6.x] Ensure set preview images are updated when assets are renamed/replaced/deleted#13013
Open
duncanmcclean wants to merge 21 commits into6.xfrom
Open
[6.x] Ensure set preview images are updated when assets are renamed/replaced/deleted#13013duncanmcclean wants to merge 21 commits into6.xfrom
duncanmcclean wants to merge 21 commits into6.xfrom
Conversation
Because the facade calls cause issues with mocks in existing tests. Doing it this way avoids (as many) facade calls.
jasonvarga
requested changes
Nov 14, 2025
Member
jasonvarga
left a comment
There was a problem hiding this comment.
Unless I've done something silly, this doesn't seem to work at all. I can't get it to rename anything.
Plus, I think it might not work on a second level if you've defined statamic.assets.set_preview_images.folder as the path won't get saved in the blueprint - just the filename. We might need to change that.
When assets are deleted, the reference updater is called, which subsequently attempts to find the configured container for set preview images. However, the default container, `assets` doesn't exist, but if we don't mock it, the tests fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request ensures that Set Preview Images on Bard & Replicator fields are updated when assets are renamed/replaced/deleted, like we do with content.
I've also added
Blueprint::all()which returns blueprints from all collections, taxonomies, etc.Closes #12680