Forum

Thread tagged as: Question, Problem, Configuration

Buckets not working

I am running the latest version of Runway and I have a few buckets to hold images. Below is my buckets.php details normal images work when uploading but when using a bucket they never go into the folders at all. Is this a bug or is there a different configuration for runway vs regular perch?

<?php 
    return array(
        'flooring' => array(
            'web_path'  => '/uploads/flooring',
            'file_path' => '/home/webclient/public_html/oldewoodltd/uploads/flooring'
        ),
        'siding' => array(
            'web_path'  => '/uploads/siding',
            'file_path' => '/home/webclient/public_html/oldewoodltd/uploads/siding'
        ),
        'beams' => array(
            'web_path'  => '/uploads/beams',
            'file_path' => '/home/webclient/public_html/oldewoodltd/uploads/beams'
        ),
        'accessories' => array(
            'web_path'  => '/uploads/accessories',
            'file_path' => '/home/webclient/public_html/oldewoodltd/uploads/accessories'
        )
    );
?>
Brandon Livengood

Brandon Livengood 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you uploading?

Clicking on assets then selecting the bucket then trying to upload to the dropzone. The image looks like it uploads but never shows up.

If I try to upload from a template when giving the image tag bucket="flooring" it just shows the default bucket not the flooring bucket.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can I see your diagnostics?

Diagnostics report
Perch information

    Perch: 2.7.10
    Production mode: Production (100)
    Installed apps: content (2.7.10), assets (2.7.10), categories (2.7.10), perch_blog (4.5.4)
    DB driver: PDO
    DB tables: perch2_backup_plans, perch2_backup_resources, perch2_backup_runs, perch2_blog_authors, perch2_blog_comments, perch2_blog_index, perch2_blog_posts, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_categories, perch2_category_counts, perch2_category_sets, perch2_collection_index, perch2_collection_items, perch2_collection_revisions, perch2_collections, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_navigation, perch2_navigation_pages, perch2_page_routes, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
    Users: 4
    App runtimes:

    <?php
        $apps_list = array(
            'content', 
            'categories',
            'perch_blog',
        );

    Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
    Editor plug-ins: markitup, redactor
    H1: 53d6acbb85660221214348a09fd56d9a
    L1: f78ed03cd6e74728ff001333e9f1b3ca
    headerColour: #00814d
    content_singlePageEdit: 1
    hideBranding: 1
    content_collapseList: 1
    lang: en-gb
    update_2.7.5: done
    logoPath: /uploads/OWL_LOGO_Banner__web_.png
    headerScheme: dark
    latest_version: 2.7.10
    on_sale_version: 2.7.10
    helpURL: mailto:info@unleashedideas.com
    siteURL: https://oldewoodltd.webclient.biz
    content_hideNonEditableRegions: 1
    content_frontend_edit: 1
    dashboard: 0
    hide_pwd_reset: 0
    perch_blog_update: 5.0
    perch_blog_post_url: /blog/post.php?s={postSlug}
    update_2.7.8: done
    perch_blog_slug_format: %Y-%m-%d-{postTitle}
    perch_blog_akismet_key:
    perch_blog_max_spam_days: 0
    perch_blog_comment_notify: 0
    update_2.7.10: done
    PERCH_DEVELOPMENT: 10
    PERCH_STAGING: 50
    PERCH_PRODUCTION: 100
    PERCH_SITEPATH: /home/webclient/public_html/oldewoodltd
    PERCH_SCHEDULE_SECRET: viipYToNe5P6hjKD
    PERCH_DB_USERNAME: oldewood_owluser
    PERCH_DB_SERVER: localhost
    PERCH_DB_DATABASE: oldewood_perch
    PERCH_DB_PREFIX: perch2_
    PERCH_EMAIL_FROM: info@unleashedideas.com
    PERCH_EMAIL_FROM_NAME: Unleashed Ideas
    PERCH_LOGINPATH: /admin
    PERCH_PATH: /home/webclient/public_html/oldewoodltd/admin
    PERCH_CORE: /home/webclient/public_html/oldewoodltd/admin/core
    PERCH_RESFILEPATH: /home/webclient/public_html/oldewoodltd/uploads
    PERCH_RESPATH: /uploads
    PERCH_HTML_ENTITIES: 1
    PERCH_HTML5: 1
    PERCH_TZ: America/New_York
    PERCH_RUNWAY: 1
    PERCH_ERROR_MODE: DIE
    PERCH_DATE_LONG: %d %B %Y
    PERCH_DATE_SHORT: %d %b %Y
    PERCH_TIME_SHORT: %H:%M
    PERCH_TIME_LONG: %H:%M:%S
    PERCH_DEBUG:
    PERCH_PREVIEW_ARG: preview
    PERCH_TEMPLATE_PATH: /home/webclient/public_html/oldewoodltd/admin/templates
    PERCH_DEFAULT_DOC: index.php
    PERCH_DEFAULT_EXT: .php
    PERCH_PRODUCTION_MODE: 100
    PERCH_RWD:
    PERCH_SSL:
    PERCH_STRIPSLASHES:
    PERCH_PROGRESSIVE_FLUSH: 1
    PERCH_AUTH_PLUGIN:
    PERCH_DB_CHARSET: utf8
    PERCH_DB_PORT:
    PERCH_DB_SOCKET:

Hosting settings

    PHP: 5.4.23
    Zend: 2.4.0
    OS: Linux
    SAPI: apache2handler
    Safe mode: not detected
    MySQL client: mysqlnd 5.0.10 - 20111026 - $Id: e707c415db32080b3752b232487a435ee0372157 $
    MySQL server: 5.5.40-cll
    Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, calendar, ctype, curl, dom, filter, ftp, gd, hash, iconv, SPL, json, mbstring, mcrypt, session, mysql, standard, Phar, posix, Reflection, mysqlnd, SimpleXML, sockets, imap, tokenizer, xml, xmlreader, xmlwriter, zip, apache2handler, PDO, pdo_sqlite, pdo_mysql, Zend Guard Loader
    GD: Yes
    ImageMagick: No
    PHP max upload size: 8M
    PHP max form post size: 8M
    PHP memory limit: 64M
    Total max uploadable file size: 8M
    Resource folder writeable: Yes
    Session timeout: 24 minutes
    Native JSON: Yes
    Filter functions: Yes
    Transliteration functions: No
    HTTP_HOST: oldewoodltd.webclient.biz
    HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko/20100101 Firefox/35.0
    HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.5
    HTTP_ACCEPT_ENCODING: gzip, deflate
    HTTP_REFERER: https://oldewoodltd.webclient.biz/admin/core/settings/diagnostics/
    HTTP_COOKIE: PHPSESSID=f3ec63d966ee76ed68e1fd8396b9a546; cmsa=1; cmssb=0
    HTTP_CONNECTION: keep-alive
    PATH: /sbin:/usr/sbin:/bin:/usr/bin
    SERVER_SIGNATURE: <address>Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 PHP/5.4.23 Server at oldewoodltd.webclient.biz Port 80</address>
    SERVER_SOFTWARE: Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 PHP/5.4.23
    SERVER_NAME: oldewoodltd.webclient.biz
    SERVER_ADDR: 64.131.68.127
    SERVER_PORT: 80
    REMOTE_ADDR: 65.25.124.185
    DOCUMENT_ROOT: /home/webclient/public_html/oldewoodltd
    SERVER_ADMIN: webmaster@oldewoodltd.webclient.biz
    SCRIPT_FILENAME: /home/webclient/public_html/oldewoodltd/admin/core/settings/diagnostics/index.php
    REMOTE_PORT: 48325
    GATEWAY_INTERFACE: CGI/1.1
    SERVER_PROTOCOL: HTTP/1.1
    REQUEST_METHOD: GET
    QUERY_STRING: extended
    REQUEST_URI: /admin/core/settings/diagnostics/?extended
    SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
    PHP_SELF: /admin/core/settings/diagnostics/index.php
    REQUEST_TIME_FLOAT: 1422967483.13
    REQUEST_TIME: 1422967483
    argc: 1

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the uploads folder exist?

Yes, I can upload files to the uploads folder there is about 50 images in there already. It when I try to use buckets it doesn't seem to want to work.

Drew McLellan

Drew McLellan 2638 points
Perch Support

And the subfolders exist within it?

I first had them in there, then I deleted them to see if they would be created - which they didn't so I put them back in there.

This is my template that has buckets on the images and when I try to upload them it says default?

<perch:content id="slug" for="title" type="slug" suppress="true" />
<perch:content type="radio" id="status" label="Status" options="Active, Inactive" suppress="true" />
<perch:content type="image" id="image" label="Listing Image" suppress="true" help="498 x 400" bucket="flooring" divider-before="Images" />

<div class="description">
    <div class="description-wrapper">
        <div class="description-image">
            <div class="product-image-wrapper">
                <img class="view-gallery" src="<perch:content type="image" id="slide" label="Details Image" bucket="flooring" help="540 x 700" />" alt="">
                <div><p class="view-gallery">View <perch:content id="title" /> Gallery</p></div>
            </div>

            <script>
                var swipeboxData = [
                    <perch:repeater id="swipebox" label="Gallery Images">
                        {'href':'<perch:content type="image" id="gallery" label="Gallery Image" bucket="flooring" help="540 x 700 or 700 x 540" />', 'title': '<perch:content id="gallerytitle" type="text" label="Image Title" />'},
                    </perch:repeater>
                ]
            </script>


            <perch:content type="checkbox" id="options" label="Finishing Options" value="true" suppress="true" />

            <perch:if exists="options">
                <h3>Finish Options:</h3>
                <ul>
                    <perch:repeater id="finishes" label="Finishes" divider-before="Finishes">
                        <li><img src="<perch:content type="image" id="finishimage" label="Finish Image" bucket="flooring" help="255 x 400" />"><a href="#"><perch:content type="text" id="finishname" label="Finish Name" /></a></li>
                    </perch:repeater>
                </ul>
            </perch:if>
        </div>
        <div class="description-content">
            <h2><perch:content id="floor_type" type="hidden" /></h2>
            <h1><perch:content id="title" type="text" label="Product Name" required="true" title="true" order="1" /></h1>

            <perch:content id="text" type="textarea" label="Description" editor="redactor" html="true" divider-before="Content" />

            <ul class="accordion-tabs">
                <li class="tab-header-and-content">
                    <a href="javascript:void(0)" class="is-active tab-link">Specifications</a>
                    <div class="tab-content">
                        <perch:content id="specs" type="textarea" label="Specifications" editor="redactor" html="true" divider-before="Tabs" />
                    </div>
                </li>
                <li class="tab-header-and-content">
                    <a href="javascript:void(0)" class="tab-link">Accessories</a>
                    <div class="tab-content accessories">
                        <perch:content id="accessories" type="textarea" label="Accessories" editor="redactor" html="true" />                        
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>

Ok I am now able to upload the specific buckets in assets if i go to the assets section, choose the bucket then upload into it. I ended up deleting the folders again, re-connecting to the server then adding them and setting permission on them.

But I still am unable to upload to the correct bucket from a content region using the template above. Any ideas on that part?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'll see if I can reproduce it.

Were you able to reproduce it?

I am also experiencing the same issue with photos not uploading to buckets.

buckets.php config:

<?php 
    return array(
        'photos 2015' => array(
            'web_path'  => '/photos/2015',
            'file_path' => '/var/public_html/photos/2015'
        ),
        'photos 2014' => array(
            'web_path'  => '/photos/2014',
            'file_path' => '/var/public_html/photos/2014'
        )
    );
?>

What is the status of this? Were you able to reproduce it, or is this a bug?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's still on my list to investigate.

Drew, any chance of bumping this up the priority list? We're in the same boat here. The upload to the bucket does seem to work ok if the field already contains an image from that bucket (i.e. we're changing the image for a different one) but if this is a new item (so no existing image) then the image apears to get uploaded to the default bucket, rather than the one specified in the tag and shown (correctly) in the dropzone.