Forum

Thread tagged as: Problem, Error

Images disappearing after 24hrs

Hi,

I’m experiencing a problem with image assets disappearing after 24hrs that is similar to a post from around a year back with quite a bit of discussion attached.

I don’t really understand if the problem has been fixed, but the problem I'm experiencing seems to be very similar. (https://forum.grabaperch.com/forum/08-05-2014-assets-disappearing)

I'm uploading an image, (through the blog app specifically, I haven't noticed it elsewhere, and it occurs on both local dev and staging environments) and everything works ok until 24hrs hours later when the image disappears (missing from the resources folder along with thumbnails the blog post, etc…)

Some images don't disappear (even within the same post), but others do, seems to be no specific type of image, or the way they are being added, etc…

I've re-added the images twice, but the same thing is happening after 24hours. They are all images that are being used within a blog post so shouldn't be getting cleaned up? Any ideas?

Thanks!

Mark Heggan

Mark Heggan 1 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you post your diagnostics report?


Perch: 2.8.8 Production mode: Development (10) Installed apps: content (2.8.8), assets (2.8.8), categories (2.8.8), perch_blog (4.6), perch_forms (1.8.3) DB driver: PDO DB tables: perch2_blog_authors, perch2_blog_comments, perch2_blog_index, perch2_blog_posts, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_forms, perch2_forms_responses, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users Users: 3 App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', ); Scheduled tasks for perch_blog: delete_spam_comments (1440 mins) Editor plug-ins: markitup, redactor H1: 7fb1de908d52176c955ddf70ad82dc4d L1: 2de5778bd08390ec2c535d61c34009b2 content_collapseList: 1 content_frontend_edit: 0 content_hideNonEditableRegions: 0 content_singlePageEdit: 1 dashboard: 1 headerColour: #2a95cd headerScheme: dark helpURL: hideBranding: 1 hide_pwd_reset: 0 lang: en-gb latest_version: 2.8.8 logoPath: /admin/resources/admin-logo.png on_sale_version: 2.8.8 perch_blog_akismet_key: d4a4ad5f1132 perch_blog_comment_notify: 0 perch_blog_max_spam_days: 0 perch_blog_post_url: /blog/{postSlug} perch_blog_slug_format: {postTitle} perch_blog_update: 5.0 siteURL: / update_2.8.8: done PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: xx PERCH_DB_SERVER: localhost PERCH_DB_DATABASE: xx PERCH_DB_PREFIX: perch2_ PERCH_TZ: America/Los_Angeles PERCH_EMAIL_FROM: xx@xx.com PERCH_EMAIL_FROM_NAME: RW Elephant PERCH_LOGINPATH: /admin PERCH_PATH: /Users/markheggan/Development/Work/rwelephant/rwelephant.perch/admin PERCH_CORE: /Users/markheggan/Development/Work/rwelephant/rwelephant.perch/admin/core PERCH_RESFILEPATH: /Users/markheggan/Development/Work/rwelephant/rwelephant.perch/admin/resources PERCH_RESPATH: /admin/resources PERCH_HTML5: 1 PERCH_CLEAN_RESOURCES: PERCH_EMAIL_METHOD: smtp PERCH_EMAIL_HOST: xxx PERCH_EMAIL_AUTH: 1 PERCH_EMAIL_SECURE: ssl PERCH_EMAIL_PORT: xxx PERCH_EMAIL_USERNAME: xx@xx.com PERCH_DEBUG: 1 PERCH_PRODUCTION_MODE: 10 PERCH_RUNWAY: PERCH_ERROR_MODE: DIE PERCH_DATE_LONG: %d %B %Y PERCH_DATE_SHORT: %d %b %Y PERCH_TIME_SHORT: %H:%M PERCH_TIME_LONG: %H:%M:%S PERCH_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: /Users/markheggan/Development/Work/rwelephant/rwelephant.perch/admin/templates PERCH_DEFAULT_DOC: index.php PERCH_DEFAULT_EXT: .php PERCH_RWD: PERCH_HTML_ENTITIES: PERCH_SSL: PERCH_STRIPSLASHES: PERCH_PROGRESSIVE_FLUSH: 1 PERCH_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: HOSTING SETTINGS PHP: 5.6.7 Zend: 2.6.0 OS: Darwin SAPI: apache2handler Safe mode: not detected MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 3c688b6bbc30d36af3ac34fdd4b7b5b787fe5555 $ MySQL server: 5.5.42 Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, intl, json, ldap, mbstring, session, standard, mysqlnd, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, Reflection, mysql, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, apache2handler, imap, gettext, mcrypt, yaz, pgsql, pdo_pgsql GD: Yes ImageMagick: No PHP max upload size: 32M PHP max form post size: 32M PHP memory limit: 128M Total max uploadable file size: 32M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes HTTP_HOST: rwelephant.perch:8888 HTTP_CONNECTION: keep-alive HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36 HTTP_DNT: 1 HTTP_REFERER: https://rwelephant.perch:8888/admin/core/settings/diagnostics/ HTTP_ACCEPT_ENCODING: gzip, deflate, sdch HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8 HTTP_COOKIE: __distillery=v20150227_384d6000-f4e7-4d62-a13e-1cb47c599d93; cmsa=1; __utma=66225581.1020462072.1437467900.1437472556.1437477803.3; __utmc=66225581; __utmz=66225581.1437467900.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); PHPSESSID=1b2e752204481f4da399119a61be7cf3 PATH: /usr/bin:/bin:/usr/sbin:/sbin SERVER_SOFTWARE: Apache SERVER_NAME: rwelephant.perch SERVER_ADDR: ::1 SERVER_PORT: 8888 REMOTE_ADDR: ::1 DOCUMENT_ROOT: /Users/markheggan/Development/Work/rwelephant/rwelephant.perch SERVER_ADMIN: you@example.com SCRIPT_FILENAME: /Users/markheggan/Development/Work/rwelephant/rwelephant.perch/admin/core/settings/diagnostics/index.php REMOTE_PORT: 52678 GATEWAY_INTERFACE: CGI/1.1 SERVER_PROTOCOL: HTTP/1.1 REQUEST_METHOD: GET QUERY_STRING: extended REQUEST_URI: /admin/core/settings/diagnostics/?extended SCRIPT_NAME: /admin/core/settings/diagnostics/index.php PHP_SELF: /admin/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1437484737.58 REQUEST_TIME: 1437484737 argc: 1

This is from my local MAMP setup, I'd added:


define('PERCH_CLEAN_RESOURCES', false);

only this morning after I'd read the mentioned post.

Thanks Drew

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does your perch2_resource_log table have rows in it? Do you see any from perch_blog ?

How are you adding images to the blog? Are you using an editor plugin? If so, is it the latest version?

perch_2_resource_log: https://up.kibakoapp.com/w4SCck9Xoa (I think the answer is no!)

Images are added through an image block set up for figures, just a standard block:

that section of the template looks like this:


<perch:block type="figure" label="Figure Image"> <figure> <img src="<perch:blog type="image" id="figureImage" label="Image" imagewidth="820" bucket="blog"" />" alt="<perch:blog type="text" id="alt" label="Description" required="true" help="e.g. Photo of MD John Smith with his best wig on" />" /> <perch:if exists="figureText"> <figcaption> <perch:blog id="figureText" type="text" label="Text" /> </figcaption> </perch:if> </figure> </perch:block>
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's the structure of the table - does it have any data in it?

Sorry, yes there is data in there (and also data from perch_blog) - https://up.kibakoapp.com/ff7Dipica6

It's not affecting all blog posts, only a few, and it seems to only affect some of the blog post images (all added through the same type of repeating block), not all. For example I can add a post, with 5 images in total, come back 24hrs later and 4 of them have disappeared and one image remains.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have they stopped going now that you've made that config change?

I'll be able to confirm that in the morning/afternoon tomorrow. Do you think it could be a bug?

Drew McLellan

Drew McLellan 2638 points
Perch Support

They shouldn't be going, so I can't see how it could be anything other than a bug.

Hi Drew, they do seem to have stopped going now that the config change has been added.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, thanks, that's helpful.