Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Craft CMS does not track volume folders in project config #7742

Closed
mildlygeeky opened this issue Mar 29, 2021 · 3 comments
Closed

Craft CMS does not track volume folders in project config #7742

mildlygeeky opened this issue Mar 29, 2021 · 3 comments
Labels

Comments

@mildlygeeky
Copy link
Contributor

Description

Craft does not seem to track volume folders in project config. If a plugin (we ran into this with @khalwat's Image Optimize) wants to map to a volume folder with a field mapping that gets kept in the field's project config, mapping via UID is not a dependable way to do so, as that UID will change when a project moves from one environment to another.

Steps to reproduce

  1. Create an asset folder on something like S3 in one environment.
  2. Index assets on another environment.
  3. See that the environments now have different UIDs for the volume folders, rendering a plugin's ability to map them via project config basically impossible.
@mildlygeeky
Copy link
Contributor Author

@khalwat made a good point (weird) which is that maybe these are not part of project config because content authors can create/delete them outside of the Settings / admin screen. Which might call for plugins such as Image Optimize to not map them via UID, but rather by path name.

Folders can even be created on-the-fly as users upload assets that use a {slug}, so even more I think it makes sense that they not be managed in project config, and this might be something for Image Optimize to change rather than Craft.

@andris-sevcenko
Copy link
Contributor

Seems like you have it all figured out! :)

@khalwat
Copy link
Contributor

khalwat commented Mar 30, 2021

@mildlygeeky File an issue for me and I'll get it fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants