Forum

Thread tagged as: Problem

That's what I think too.

It has (surely?) to be related to the purge process because of the frequency of disappearance. Hopefully Drew/Rachel can sort this now you've got a repeatable explanation for what is happening.

Thanks for your involvement.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's certainly on the radar.

Thanks Drew

define('PERCH_CLEAN_RESOURCES', false);

I can report that having added this to my config file in the hope that it would solve the problem of my Asset thumbnails disappearing after 24 hours, the behaviour myself and Montgomery Lewis report has not changed. Assets added yesterday with thumbnails showing are now being displayed without thumbnails.

This is consistent behaviour.

If I use the asset-without thumbnail to make a page, after selecting the Asset and adding a Description, the moment I hit Save Changes the Asset thumbnail appears in the editing window, and subsequently on the page itself AND it's now visible in the Assets window, at least for the following 24 hours.

Drew McLellan

Drew McLellan 2638 points
Perch Support

As I say, I'm keeping an eye on it.

Thanks. Just wanted to let you know that suppressing the purge didn't fix the problem

I don't suppose anyone has found a solution to this have they? I've tried the last 2 versions of perch on three different server and the thumbnails always dissapear if an asset isn't used. Interestingly the asset is still available for use. If you click on it in the asset view it shows as no file, but if you edit a page and add and image the asset is available with no thumbnail. Once you use an asset on a page it's thumbnail re-appears in the asset manager. In the database the thumbnail entry vanishes.

No, there's been no progress that I know of.

I had a couple of image assets disappear yesterday that were originally added through events app. The crazy thing was on my live website it showed an <img> tag with the path to the image file in the Perch resource folder, but the actual image wasn't showing up because this was one that disappeared. I did attempt to edit the event, when I opened template in perch the image option appeared to be blank. I click on the "Select or upload an image," to select a new image, but when I select the "Use Asset" option on the new image it doesn't load into the template. The only way I was able to add a new image to these events was by deleting the entire event and recreating it.

I uploaded a screen shot of the missing image that appears in the slide out assets manager, but you're not able to select it. Note that this image was working fine for the past week.

https://tinypic.com/view.php?pic=2h6ezys&s=8

After a bit of fiddling I've managed to re-create the problem.

1) Add an asset in the asset manager and click on it to be a library asset and don't use it 2) Leave it 24 hrs - or change the date if you are using WAMP 3) Now it's thumbnail will dissapear if you add another asset any time after 24hrs via a page edit, so not directly in the asset manager.

The reason appears to be that when you add an asset and click on 'Library asset' it stores the record in the database with resourceInLibrary = 1 but stores the thumbnail as resourceInLibrary = 0. Then when you add another asset via the page manager it runs a clean up that deletes non used assets that have resourceInLibrary = 0 - this deletes the thumbnail record in the database, but not the main asset image.

Well done you! I would say you can make the thumb rise from the dead by selecting a 'ghost' for inclusion on your page. The moment you type in a description, the thumb reappears on the dialog page AND back on the Assets page.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Thanks Ed - that was what I was suspecting.

I'm experiencing the same issue as described in this thread (ie, the library assets "disappearing" because of the resourceInLibrary = 0 on the thumbs) and wanted to confirm that the fix is on the radar for 2.6.4 as it isn't clear if it was being considered a bug or not.

Also, is there any other way to get around this for now? Stefan Youngs mentioned:

I would say you can make the thumb rise from the dead by selecting a 'ghost' for inclusion on your page. The moment you type in a description, the thumb reappears on the dialog page AND back on the Assets page.

Which is a great way to temporarily return the image & thumbnail to the asset chooser, but ultimately this trick needs to be performed too regularly for it to be a proper fix on a live site. Does anyone know if manually changing resourceInLibrary = 0 to resourceInLibrary = 1 on the thumbnails fixes the issue for good, or if they are still "cleaned-up" and disappear again?

Thanks!

Hi Richard. To get the thumbnail records back in the database I just used the resources one by one on a dummy page, saved, changed to the next one and so on. That restores the thumbnails. Then I manually changed resourceInLibrary = 1 in the database for all the thumbnails. This was 1 week ago and they are all still there :o)

Thanks Ed – I really appreciate your help on this matter. I'll go ahead as you've described to get the issue fixed for now. Cheers!

Looks like our wish has been granted Richard. New shiny version of Perch is out with a fix.

I confirm that Assets are no longer disappearing after 24 hours. Very good result. Thanks.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Thanks for confirming.