Forum
Files not appearing in asset list after upload
I'm trying to create a slideshow section for the homepage of a responsive, Perch-powered site. On the homepage I have the following code:
<?php perch_content('Homepage Slideshow'); ?>
I've set that content type up in Perch using the following repeater template:
<perch:repeater id="homepageSlideshow" label="Images for Homepage slideshow">
<perch:before><ul class="list-plain list-slideshow cycle-slideshow" data-cycle-slides="> li" data-cycle-swipe="true"></perch:before>
<li class="slideshow-item">
<img src="<perch:content id="image" type="image" width="1044" height="450" label="Image" bucket="homepage_slideshow" />" alt="<perch:content type="text" id="alt" label="Description" required="true" help="Description of this image" title="true" />" srcset="<perch:content id="image" type="image" width="1044" height="450" label="Image" density="2" /> 2x, <perch:content id="image" type="image" width="1044" height="450" label="Image" density="3" /> 3x">
</li>
<perch:after></ul></perch:after>
</perch:repeater>
I've enabled Perch's debug mode, and I'm seeing this when the edit page is loaded:
Using template: /templates/content/homepage_slideshow.html
Form not posted or did not validate
I can see that the files are being uploaded - they're appearing in the resources > homepage_slideshow folder - but the larger versions aren't being generated, and nothing's appearing in the Assets panel.
Any ideas what's wrong?
Can we see your Diagnostics Report?
I've just noticed that ImageMagick wasn't enabled; I've turned it on, but still no joy...
I'm not sure what's happened to that as it's all run together, but the short version would be fine then you don't need to edit it.
Here's the short version:
Perch: 2.7.10, PHP: 5.6.2, MySQL: 5.5.38, with PDO
Server OS: Darwin, apache2handler
Installed apps: content (2.7.10), assets (2.7.10), categories (2.7.10)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /manage
PERCH_PATH: <REDACTED>/webroot/manage
PERCH_CORE: <REDACTED>/webroot/manage/core
PERCH_RESFILEPATH: <REDACTED>/webroot/manage/resources
Image manipulation: GD Imagick
PHP limits: Max upload 32M, Max POST 32M, Memory: 128M, Total max file upload: 32M
Resource folder writeable: Yes
HTTP_HOST: <REDACTED>
DOCUMENT_ROOT: <REDACTED>/webroot
REQUEST_URI: /manage/core/settings/diagnostics/
SCRIPT_NAME: /manage/core/settings/diagnostics/index.php
How large are the images you're uploading? I can see your 3x images will end up >3000px wide - are you just running out of memory?
The original uploaded asset is 1044 x 450px, at under 40kb; I've doubled the amount of memory available to PHP scripts to 256MB, but still no joy. The image appears briefly in the asset window when upload is complete, but then disappears.
Interestingly, I've tried removing the
bucket="homepage_slideshow"
section of my code, and the images seem to work. I've checked the permissions on the homepage_bucket folder and everything seems in order (though only the original image is being saved, not the higher-density ones); the images just aren't showing up in the Assets window.Have I declared the bucket incorrectly? I tried putting the bucket on all three image inputs but that didn't make a difference. It appears that the automatic higher-density script doesn't play nicely with buckets, at least not the way that I've invoked it...
Your bucket name is greater than the 16 characters maximum - that'll be the cause.