Forum

Thread tagged as: Problem

Asset manager not showing thumbnails

I have a resource bucket named "Images-Blog". When I upload images to it the asset manager shows a dark gray background instead of a thumbnail image. The image title shows just not the image.

I have several buckets setup the same way and the thumbnails display just fine.

The images are usable if selected and display fine in a template.

buckets.php

<?php 
    return array(
        'Images-Course' => array(
            'web_path'  => '/c/image/course',
            'file_path' => '/home/foreverl/public_html/c/image/course'
        ),
        'Images-Blog' => array(
            'web_path'  => '/c/image/blog',
            'file_path' => '/home/foreverl/public_html/c/image/blog'
        ),
        'Images-Blog-Body' => array(
            'web_path'  => '/c/image/blog/body',
            'file_path' => '/home/foreverl/public_html/c/image/blog/body'
        ),
        'Images-Podcast' => array(
            'web_path'  => '/c/image/podcast',
            'file_path' => '/home/foreverl/public_html/c/image/podcast'
        ),
        'Images-Pod-Body' => array(
            'web_path'  => '/c/image/podcast/body',
            'file_path' => '/home/foreverl/public_html/c/image/podcast/body'
        ),
        'Images-Store' => array(
            'web_path'  => '/c/image/store',
            'file_path' => '/home/foreverl/public_html/c/image/store'
        ),
        'audio' => array(
            'web_path'  => '/c/audio',
            'file_path' => '/home/foreverl/public_html/c/audio'
        ),
        'Audio-Podcast' => array(
            'web_path'  => '/c/audio/podcast',
            'file_path' => '/home/foreverl/public_html/c/audio/podcast'
        ),
        'Audio-Store' => array(
            'web_path'  => '/c/audio/store',
            'file_path' => '/home/foreverl/public_html/c/audio/store'
        ),
        'Sec-Course-Audio' => array(
            'web_path'  => '/secure/course/audio',
            'file_path' => '/home/foreverl/secure/course/audio'
        ),
        'Sec-Store-Doc' => array(
            'web_path'  => '/secure/store/document',
            'file_path' => '/home/foreverl/secure/store/document'
        ),
        'Sec-Store-Audio' => array(
            'web_path'  => '/secure/store/audio',
            'file_path' => '/home/foreverl/secure/store/audio'
        ),
        'Sec-Store-Video' => array(
            'web_path'  => '/secure/store/video',
            'file_path' => '/home/foreverl/secure/store/video'
        ),
        'Sec-Scrip-Audio' => array(
            'web_path'  => '/secure/scripture/audio',
            'file_path' => '/home/foreverl/secure/scripture/audio'
        )
    );
?>

Diagnostic

Perch Runway: 3.0.14, PHP: 7.0.27, MySQL: 5.6.23, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.0.14), assets (3.0.14), categories (3.0.14), perch_shop_orders (1.2.3), perch_shop_products (1.2.3), perch_shop (1.2.3), perch_comments (1.2.1), perch_members (1.6.2)
App runtimes: <?php $apps_list = array( 'perch_comments', 'perch_forms', 'perch_members', 'perch_shop' );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/foreverl/public_html/perch
PERCH_CORE: /home/foreverl/public_html/perch/core
PERCH_RESFILEPATH: /home/foreverl/public_html/perch/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 128M, Memory: 768M, Total max file upload: 128M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/foreverl/public_html
HTTP_HOST: foreverlds.com
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Jared Buttars

Jared Buttars 1 points

  • 3 years ago

Also the blog collection

<perch:content id="category" type="select" label="Category" options="General, Promotion" allowempty="false" required="true" />
<perch:content id="date" type="date" label="Date" format="%d %B %Y" required="true" />
<perch:content id="image" type="image" label="Main Image" bucket="Images-Blog" required="true" width="864" height="500" help="864 Wide x 500 Tall" />
<perch:content id="image" type="image" label="Main Image" bucket="Images-Blog" width="276" height="160" quality="70" density="2" />
<perch:related id="author" collection="Authors" label="Author"></perch:related>
<perch:content id="title" type="textarea" label="Title" required="true" title="true" count="chars" size="xs" help="Limit to 50 characters or less" />
<perch:content id="subtitle" type="textarea" label="Tag Line" size="xs" count="chars" required="true" help="Limit to 95 characters or less" />
<perch:related id="tags" collection="Tags" label="Tags"></perch:related>
<perch:content id="slugtitle" type="slug" for="title" label="URL Title" editable="true" indelible="true" help="Part of the published URL. This can't be changed later" />
<perch:content id="blogbody" type="textarea" label="Blog Content" editor="ckeditor" bucket="Images-Blog-Body" html="true" required="true" />
Drew McLellan

Drew McLellan 2638 points
Perch Support

What's different between this bucket and the ones that work?

As far as they are setup and used nothing it seems is different. An image uploaded to the bucket reaches the sever storage where it should be and the asset interface thumbnail is correctly generated and also visible in storage. Inspecting the asset interface HTML in Perch reveals that the thumbnail img tag isn't output to the page, whereas thumbnails in other buckets do have the thumbnail img tag generated, so it doesn't on the surface seem to be a problem with paths or asset location.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What process are you following to upload to this bucket?

While editing a blog post collection item, see above template, picking "Select or upload an image" on the image field. Then sorting By Bucket, selecting Images-Blog then clicking Add an Asset and uploading a jpeg.

In the Perch asset interface in place of the image tag inside

div.asset-selectable.grid-asset.asset-image

I get an svg tag instead

<svg width="64" height="64" class="icon icon-o-photo"><use xmlns:xlink="https://www.w3.org/1999/xlink" xlink:href="/perch/core/assets/svg/assets.svg#o-photo"></use></svg>
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's just our placeholder icon for when there's no thumbnail.

Does the Perch code check the file system or the database for a thumbnail when it determines whether or not a thumbnail exists?

Drew McLellan

Drew McLellan 2638 points
Perch Support

The database. Otherwise it would be thrashing the file system for every page load.

If the thumbnail isn't going into the database then you'll not see a thumbnail displayed on the page. The relevant question is why is the thumbnail not being inserted into the database.

I deleted all assets out of that bucket directly in the db as well as the file system. New uploads to that bucket work now.