Forum

Thread tagged as: Problem

Bucket value ignored

The bucket is coming up as "Default" even though I've set up "Carousel" for the image here. I expect I've made an error setting up the srcset options but I can't find it...

Here is the template:

<perch:before><div class="owl-carousel clear"></perch:before>
    <div>
        <div class="carousel">

            <perch:if exists="link"><a class="carousel__link" href="<perch:content id="link" type="text" label="Link" required="false" order="4" help="Optional" />"></perch:if>

                <img alt="" class="carousel__image" src="<perch:content id="image" type="image" label="Image" width="1440" height="710" crop="true" order="1" bucket="carousel" required="true" help="Make sure this image is big" />" 
                srcset="<perch:content type="image" id="image" label="Image" width="400" /> 400w, 
                <perch:content type="image" id="image" label="Image" width="800" /> 800w,
                <perch:content type="image" id="image" label="Image" width="1440" height="710" crop="true" /> 1440w">

                <div class="carousel__text">
                    <h2 class="carousel__heading" data-aos="fade-left">
                        <perch:content id="heading" title="true" type="text" label="Heading" order="2" />
                    </h2>
                    <p class="carousel__description" data-aos="fade-right" data-aos-offset="0">
                        <perch:content id="description" type="text" label="Description" order="3" />
                    </p>
                </div>

            <perch:if exists="link"></a></perch:if>
        </div>
    </div>
<perch:after></div></perch:after>
Stephen Turvey

Stephen Turvey 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Coming up where? What happens when you upload?

Is the bucket defined in your bucket list, or is a just a subfolder?

Can we see your diagnostics report?

When I click "Select or upload an image" then "Add asset" it says Bucket: Default in the space where I upload/drag-drop.

I can see in admin/resources the "carousel" folder is there but nothing inside. The image gets uploaded along with all the versions to admin/resources and not admin/resources/carousel.

I've not done anything with bucket lists - didn't know they existed!

I'm on localhost.

Diagnostics:

Perch: 2.8.32, PHP: 5.5.10, MySQL: 5.5.34, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32), perch_blog (5.0), perch_forms (1.8.3), perch_gallery (2.8.6), perch_shop_orders (1.0.9), perch_shop_products (1.0.9), perch_shop (1.0.9), perch_members (1.5), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_members', 'perch_forms', 'perch_gallery', 'perch_shop', );
PERCH_LOGINPATH: /admin
PERCH_PATH: /Users/turveyair/Google Drive/htdocs/test1/admin
PERCH_CORE: /Users/turveyair/Google Drive/htdocs/test1/admin/core
PERCH_RESFILEPATH: /Users/turveyair/Google Drive/htdocs/test1/admin/resources
Image manipulation: GD (image sharpening disabled, #66714)
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: esl
DOCUMENT_ROOT: /Users/turveyair/Google Drive/htdocs/test1
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is that your entire template, or a part of the template?

Entire template

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are buckets working elsewhere on the site?

Yes. In fact I have another template virtually identical and that one works fine.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you compare them, what's different?

The HTML is a bit different but (as far as I can see) the image part is the same other than a different height setting and bucket name:

<div class="carousel">

    <img alt="" class="carousel__image" src="<perch:content id="image" type="image" label="Image" width="1440" height="600" crop="true" bucket="program-pics" required="true" help="This will be the main feature image for this program" />" 
                srcset="<perch:content type="image" id="image" label="Image" width="400" /> 400w, 
                <perch:content type="image" id="image" label="Image" width="800" /> 800w,
                <perch:content type="image" id="image" label="Image" width="1440" height="600" crop="true" /> 1440w">

    <div class="carousel__text">

        <h1 class="carousel__heading" data-aos="fade-left">
            <perch:content id="page_title" type="hidden" />
        </h1>

        <p class="carousel__description" data-aos="fade-right" data-aos-offset="0">
            <perch:content id="overview_description" type="textarea" label="Short description" required="true" html="false" size="xs" markdown="false" editor="markitup" chars="200" help="200 character limit" count="chars" />
        </p>

    </div>

</div>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is anything different in the way you're filling out the form?