Forum
Blog assets disappearing
Hello.
I'm having some issues with one Perch installation. It has been updated several times.
For reasons unknown, after some time blog assets disappear.
First gets deleted the Perch generated something-w720.xxx and something-w100h100.xxx the something@x2.xxx and the original file are not deleted. But ofcourse Perch cannot show the assets on page since those are gone. They still are shown in the admin side, so when I open the blog post and save it, then different sizes gets re-generated and are back online.
In some cases also the originals are deleted. Haven't been able to conclude when.
I posted a while back on the forum that I get empty email from cron with scheduled task. That's also pretty strange, cause I don't get it when I run the task from a browser or from terminal with php -command. So only when it's run via. crontab. Could this have something to do with it?
In database perch2_blog_index the deleted images show, but not in the perch2_resources table.
It's also good to note that this started to happen around middle of march. I don't remember what version upgrade was at hand then. This problem only concerns new posts - before march 10th.
Can you figure out what's wrong?
Here's the diagnostics:
Perch is up to date
PHP 5.5.9-1ubuntu4.9 is up to date
MySQL 5.5.5-10.0.15-MariaDB-1~trusty is up to date
Image processing available
SUMMARY INFORMATION
Perch: 2.8.5, PHP: 5.5.9-1ubuntu4.9, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: bf9ad53b11c9a57efdb1057292d73b928b8c5c77 $, with PDO
Server OS: Linux, apache2handler
Installed apps: content (2.8.5), assets (2.8.5), categories (2.8.5), perch_blog (4.6), perch_forms (1.8.3), perch_mailchimp (2.0.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', 'perch_mailchimp', ); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /data/www/www.xxxxxx.fi/perch
PERCH_CORE: /data/www/www.xxxxxx.fi/perch/core
PERCH_RESFILEPATH: /data/www/www.xxxxxx.fi/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 20M, Max POST 8M, Memory: 512M, Total max file upload: 8M
Resource folder writeable: Yes
HTTP_HOST: www.xxxxxx.fi
DOCUMENT_ROOT: /data/www/www.xxxxxx.fi
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Can you show me your extended diagnostics report?
Sure thing, Drew.
Here it is:
You're missing the resource log table, somehow. Can you try running the update again?
Well, that is odd. It did have in the beginning perch2_resource_log, but I guess that's not that then?
Here's after the force update:
Ok, looks like it's now in place. Let me know if the problem continues after 24 hours.
Hello, Drew. The Blog assets just dissappeared again. And once again it's only for the posts posted after march 10th.
This is very odd, since not all the assets dissappear. Just some of them. Also in the backend some are visible, some not. The ones that are visible in the backend reappear after saving also to the frontend.
Any other ideas?
How are the assets being added in the blog?
They are added first via. assets manager and then selected from assets in the blog app.
Also I can't see any pattern here. So that it would always be certain images that are gone. The way I see it it's just random. Images uploaded at the same time, same format, same naming logic dissappear at different times from different fields.
So the information stays in the blog database, but images are removed from assets and server.
I'm not sure what's causing that, so let's just shut it off.
In your
config.php
file, add the following:Ok, that's nice that you can do it so easily!
Thanks again, this is quite odd and no other Perch installation of mine does this.
Hope this helps. We'll see in a week or so. If you find the bug at some point then it's good to remember that it first appeard for me after march 10th update.
Just upgraded to 2.8.6 from 2.8.3 and I'm having the same problems within the Blog app. (Although I had one image randomly missing on the frontend for about a month now.)
Fatal error: Class 'PerchAssetFile' not found in /public/perch/core/lib/PerchImage.class.php on line 269
perch_blog (4.6)
**Update***
I had a .gitignore for my core folder which did it's job apparently. When I copied over the new core folder it didn't get fully pushed. Checked the production server and it was missing lots of files.
Everything seems to working as expected 2.8.6 for blog assets & uploading.
I've also just seen this problem on a new installation of Perch. Five out of six blog assets (images) disappearing in one go.
Perch version: 2.8.8 Perch Blog version: 4.6
It's not a huge problem - I've implemented the PERCH_CLEAN_RESOURCES workaround which I think is fine for now. I just wanted to bring it to your attention. If you need any further info, let me know.