0

I use Google storage for photos. The Google storage volume is mapped to a bucket's subfolder.

google storage bucket subfolder as a volume

Unfortunately these appear as subfolders in assets, along with a set of repeated folder structure. I did not create these.

undesirable folders auto-created by craft

Any way to prevent CraftCMS from creating them? What is the cause they get created?

P.S. Is it possible that they are the remainder of subfolders which I created on the filesystem before setting up the assets to use google storage? I did delete the local storage assets volume between creating the google storage one. But, the local storage did have the ahtletes/photos in the local assets folder.

At this time, the local assets folder does not have the athletes/photos subfolder.

I am trying to understand what action or process creates these folders?

  • 1
    Several questions... you only have one Google storage volume setup? What happens if you update your Asset indexes in the Craft Control Panel. If you connect to Google storage outside of Craft, do you see the same structure? Why is @webroot showing up as a root level folder in the volume? – Brad Bell Nov 12 '18 at 22:37
  • 1. I have three volumes based on the same bucket, with different root folders. Only one of them creates the additional subfolders. 2. I just updated asset indexes -- I saw a list of folders which could not be found and approved their deletion. 3. I do see the folder structure exactly as entered in the "Subfolder" field -- in the google storage bucket. 4. No idea but it may be a reminder of an old volume. I think updating the indexes may have resolved the issue. – aaandre Nov 12 '18 at 23:40
  • Awesome... if that solved it for you, be sure and add it as an official answer. Might end up helping someone in the future. :) – Brad Bell Nov 12 '18 at 23:57
  • Could you please create an answer based on your comment so I can accept it? – aaandre Nov 13 '18 at 0:16
  • No problem... done! – Brad Bell Nov 13 '18 at 1:04
1

My guess would be your Asset Indexes are out of sync.

If you go to Settings->Utilities in the Control Panel, there is one that says "Update Asset Indexes". Click it, let it run and you might be prompted to resolve some out-of-sync indexes. Once you do that, it should work normally.

  • I did this a number of times but the folders keep coming back. Any advice? – aaandre Jan 30 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.