Forum

Thread tagged as: Question

Automatic deletion of assets

Hi,

I created a page, and using the File button on the text editor, uploaded an asset (a simple text file). I viewed the published page and clicked on the link to view the file -all good.

I then deleted the page. I see in the docs for Assets that unused assets get automatically deleted under certain circumstances, and thought this file would qualify. (No other page references it). But a few days on the file remains. Is this as it should be?

Apologies if this is a dunce question!

Dave C

Dave C 0 points

  • 4 years ago
Dave C

Dave C 0 points

PS I don't have PERCH_DONT_DELETE_FILES set but is this the cause?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Which version are you running? Which text editor did you upload the file using?

Dave C

Dave C 0 points

Oops sorry Perch Runway: 3.0.4

The text editor I created the file with is Pluma on Ubuntu MATE. I tried one file with no extension and one with .txt.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Sorry, I meant when you said "File button on the text editor" which editor? SimpleMDE? MarkItUp? Another?

Dave C

Dave C 0 points

Crikey I'll forget my own face next. I've got editor="markitup".

Drew McLellan

Drew McLellan 2638 points
Perch Support

Which version of Perch are you using?

If they get inserted as [cms:asset] tags, they should be tracked. If it's older and they get inserted as paths, we can't track them.

Dave C

Dave C 0 points

Perch Runway: 3.0.4 Planning to upgrade to 3.0.9 tonight.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'd expect them to get cleaned up then.

Dave C

Dave C 0 points

Oh right.

I upgraded to Runway: 3.0.9. I went to try the same thing experiment as above, but when I pulled up the Select an Asset window (using either Picture and File buttons in Markitup), it now says "No matching assets found", even though there are many files (which display in the Assets app).

I also clicked on By Type, and then Images, and again "No matching assets found" is displayed. However if I do this in the Assets app I get the expected list of images.

By Bucket does seem to work though.

Drew McLellan

Drew McLellan 2638 points
Perch Support

3.0.10 was released yesterday, so you may want to try that.

Dave C

Dave C 0 points

Updated to 3.0.10. I went to see if the same thing would occur, but when I click on the Picture and File buttons in Markitup they don't respond. (On my dev machine)

<perch:content id="body_content" type="textarea" size="l" editor="markitup" textile="true" html="true" label="Text block" help="Paste regular body content here." />
    Perch Runway: 3.0.10, PHP: 7.1.4, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b396954eeb2d1d9ed7902b8bae237b287f21ad9e $, with PDO
    Server OS: Linux, apache2handler
    Installed apps: content (3.0.10), assets (3.0.10), categories (3.0.10), perch_blog (5.5.1), perch_forms (1.9), perch_members (1.6.1)
    App runtimes: <?php $apps_list = [ 'perch_forms', 'perch_blog', 'perch_members', ];
    PERCH_LOGINPATH: /perch
    PERCH_PATH: /home/dave/****/httpdocs/perch
    PERCH_CORE: /home/dave/****/httpdocs/perch/core
    PERCH_RESFILEPATH: /home/dave/****/httpdocs/perch/resources
    Image manipulation: GD
    PHP limits: Max upload 128M, Max POST 128M, Memory: 128M, Total max file upload: 128M
    F1: 3b606135b33e6a102526838f4152a807
    Resource folder writeable: Yes
    HTTP_HOST: dev.****
    DOCUMENT_ROOT: /home/dave/****/httpdocs
    REQUEST_URI: /perch/core/settings/diagnostics/
    SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Drew McLellan

Drew McLellan 2638 points
Perch Support

If the clean up didn't occur, it probably now won't.

Dave C

Dave C 0 points

Sorry what I mean is, since I updated to 3.0.10, the Picture and File buttons in Markitup no longer work. (Probably should have started a new thread)

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes please.