Forum

Thread tagged as: Problem

Assets being cleaned up when they are in use?

Hi Drew/Rachel,

I have a site where I am using a pages/attributes template. The template has some image uploads on it see below:

<perch:pages id="thumbnail" type="image" label="Centre Thumbnail Image" width="750" height="450" crop="true" help="Image should be 750 x 450px" />
<perch:pages id="logo" type="image" label="Centre Logo" width="750" height="450" crop="true" help="Image should be 750 x 450px" />

These assets seem to be disappearing, so when the client goes back to the site the image links are broken and the assets are gone.

Site is in dev at the moment but looking to go live next week - any ideas why this could be happening?

Andy Knight

Andy Knight 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show me your diagnostics report?

Hi Drew,

Here you go:

Perch: 2.8.7, PHP: 5.3.10-1ubuntu3.15, MySQL: 5.5.40, with PDO
Server OS: Linux, apache2handler
Installed apps: content (2.8.7), assets (2.8.7), categories (2.8.7), perch_forms (1.8.3)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', );
PERCH_LOGINPATH: /admin
PERCH_PATH: /var/www/vhosts/site.rifledesign.co.uk/public_html/admin
PERCH_CORE: /var/www/vhosts/site.rifledesign.co.uk/public_html/admin/core
PERCH_RESFILEPATH: /var/www/vhosts/site.rifledesign.co.uk/public_html/admin/resources
Image manipulation: GD
PHP limits: Max upload 10M, Max POST 10M, Memory: 64M, Total max file upload: 10M
Resource folder writeable: Yes
HTTP_HOST: site.rifledesign.co.uk
DOCUMENT_ROOT: /var/www/vhosts/site.rifledesign.co.uk/public_html
REQUEST_URI: /admin/core/settings/diagnostics/
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php

I found this thread - https://forum.grabaperch.com/forum/11-20-2014-assets-buckets-disappearing wher you suggested adding:

define('PERCH_CLEAN_RESOURCES', false);

so I have done that for the time being.

Drew McLellan

Drew McLellan 2638 points
Perch Support

The first thing to do is update to the current version to see if that helps.

Hi Drew,

I have upgraded Perch to 2.8.8.

I will remove the

define('PERCH_CLEAN_RESOURCES', false);

and see what happens over the next 24 hours.

Hi Drew,

Just looking over the site and I noticed that a couple of the assets have been deleted again even after the update.

FYI - The assets that disappear are only ever ones added via the pages/attributes template that I posted above. I am not having issues with any other templates on the site (and there are quite a few).

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think this may be specific to those attribute templates. We're looking into it.

Ok, thanks Drew,

I take it I can drop back in the following of the time being?

define('PERCH_CLEAN_RESOURCES', false);
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that's the best thing to do in the meantime.