Forum
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
Also the blog collection
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.
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
I get an svg tag instead
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?
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.