Forum

Thread tagged as: Problem, Runway

Case sensitive directories

I originally started the site on a WAMP server and didn't really think about how I named my buckets. When I move it to a Unix staging server the case starts to matter and my problems begin.

I've gone around and changed all the existing HTML code to have lower case bucket names, but for existing assets I need to get them to change to lowercase. I've tried deleting the image and uploading a new one, but if its 'Backgrounds' for example, even after I change the html code to 'backgrounds' it still goes up with an uppercase B if it previously had one.

I've tried looking into the database but there are so many places to change it and none of them seem to work. Any ideas please?

Love, Chris.

Chris Comben

Chris Comben 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you should always stick to lowercase file names for consistency and portability.

What problem are you seeing? Where does the case become an issue? Once I know that I can point you to where you should look.

You're right, rule 1 really! I didn't think about the buckets being directories until later on.

As an example:

Input:

body { background-image: url('<perch:content id="background_image" type="image" label="Background Image" bucket="background"/>'); }

Output:

body { background-image: url('/perch/resources/Background/bkingwatch-1.jpg'); }

When I originally uploaded the asset it was 'Background', so I deleted the asset, changed the bucket name to what it is now with a lowercase b and then uploaded the asset again. However it just won't kick the uppercase B.

I've a similar problem with Collection based assets too.

Output:

<img src="/perch/resources/Brands/logo.png" alt="Breitling">

Input:

<p><perch:content id="brand_logo" type="image" label="Brand Logo" width="700" height="700" bucket="brands" /></p>
Drew McLellan

Drew McLellan 2638 points
Perch Support

You should be able to leave the bucket name the same (and avoid updating all the references) if you then define it with the correct lowercase path in the bucket list.

Remember content regions are compiled and cached at edit time, so use the Republish option to recompile them once you've changed your templates or settings.

I've changed the bucket names in the html, but where do I access the bucket list?

Even when I republish it still doesn't seem to update it.

Drew McLellan

Drew McLellan 2638 points
Perch Support