We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Problem

Images from Blog going missing

The client just rang me to ask what has happened to there blog... All the blog cover images have gone and they are not in the asset list any more either. never had this before so not even sure where to start ?

Stephen Wild

Stephen Wild 3 points

  • 4 years ago

I've just downloaded the resources file and there are a load of perch_blog.perch_blog_author_for_post0f13586bedfcfa6d2bb352523880e4d0.cache

Not sure what these are

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your Diagnostics Report.

Perch: 2.8.10
Production mode: Production (100)
Installed apps: content (2.8.10), assets (2.8.10), categories (2.8.10), perch_blog (4.6), perch_forms (1.8.3), perch_gallery (2.8.6)
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_gallery_albums, perch2_gallery_image_versions, perch2_gallery_images, 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: 2
App runtimes: 
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_forms',
        'perch_blog',
        'perch_gallery',
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup
H1: a496108ec93a57ef5aee890b0e752fb3
L1: 9f4b3fab28cb0826df4e845e286d4af4
headerColour: #ffffff
content_singlePageEdit: 1
helpURL: 
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.6: done
on_sale_version: 2.8.10
headerScheme: light
dashboard: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
logoPath: /admin/resources/music-and-the-deaf_logo.png
perch_blog_post_url: /news/{postSlug}
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key: 
perch_blog_max_spam_days: 0
perch_gallery_bucket_mode: single
perch_gallery_bucket: default
perch_blog_comment_notify: 0
perch_gallery_basicUpload: 0
perch_blog_update: 5.0
update_2.8.7: done
perch_gallery_update: 2.8.5
latest_version: 2.8.8
update_2.8.10: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: XXXX
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: XXXX
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: XXXX
PERCH_EMAIL_FROM_NAME:XXXX
PERCH_LOGINPATH: /admin
PERCH_PATH: /customers/b/2/0/XXXX/httpd.www/admin
PERCH_CORE: /customers/b/2/0/XXXX/httpd.www/admin/core
PERCH_RESFILEPATH: /customers/b/2/0/XXXX/httpd.www/admin/resources
PERCH_RESPATH: /admin/resources
PERCH_HTML5: 1
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_DEBUG: 
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /customers/b/2/0/XXXX/httpd.www/admin/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
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:
Drew McLellan

Drew McLellan 2638 points
Perch Support

Those are just cache files - used to speed up the performance of your pages.

How are you adding the images?

Well as we all know you can't trust a client not to be deleting something, and then saying "I didn't" like some sort of 10 year old. I added the images myself by... Select or upload an image > Add Asset > drag image > Select image > Save

I'm not using the excerpt (blog thumbnail) image in the main post, which i have never done before. could have be the issue?

See code in Post and Post in list files

Post File


<article class="h-entry"> <h1> <a href="<perch:blog id="postURL" type="hidden" />" rel="bookmark" class="p-name"> <perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" /> </a> </h1> <p class="meta"> <time class="dt-published" datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Meta information" />"> <perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y" /> </time> <perch:if exists="authorGivenName"> by <span class="p-author h-card"><perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" /></span> </perch:if> <perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes"> <a href="archive.php?cat=<perch:category id="catSlug" type="slug" />" class="p-category"> <perch:category id="catTitle" type="text" /> </a> </perch:categories> </p> <div class="description e-content"> <perch:blocks> <perch:block label="Text Block" type="textonly"> <perch:blog id="textonly" type="textarea" label="Text" markdown="true" editor="markitup" size="s" /> </perch:block> <perch:block label="Text with Image Right" type="imagesright"> <img class="imageright" src="<perch:blog type="image" id="imageright" label="Image Right" crop="true" width="500" />" alt="<perch:blog type="text" id="alt1" label="Description" required="true" />" /> <perch:blog id="textleft" type="textarea" label="Text" markdown="true" editor="markitup" size="s" /> <div class="clear"></div> </perch:block> <perch:block label="Text with Image Left" type="imagesleft"> <img class="imageleft" src="<perch:blog type="image" id="imageleft" label="Image Left" crop="true" width="500" />" alt="<perch:blog type="text" id="alt2" label="Description" required="true" />" /> <perch:blog id="textleft" type="textarea" label="Text" markdown="true" editor="markitup" size="s" /> <div class="clear"></div> </perch:block> <perch:block label="Image left and right" type="imagesleftright"> <img class="imageleft" src="<perch:blog type="image" id="imageleft" label="Image Left" crop="true" width="500" />" alt="<perch:blog type="text" id="alt2" label="Description" required="true" />" /> <img class="imageright" src="<perch:blog type="image" id="imageright" label="Image Right" crop="true" width="500" />" alt="<perch:blog type="text" id="alt3" label="Description" required="true" />" /> <div class="clear"></div> </perch:block> <perch:block label="Image Full Width" type="imagesfull"> <img class="imagefull" src="<perch:blog type="image" id="imagefull" label="Image Full Width" crop="true" width="1000" />" alt="<perch:blog type="text" id="altfull" label="Description" required="true" />" /> </perch:block> </perch:blocks> </div> </article> <perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="3" suppress="true" size="s" /> <perch:blog id="image" type="image" width="300" height="200" crop="true" order="2" suppress="true" /> <perch:blog id="image" type="image" width="300" height="168" crop="true" suppress="true" />

Post in List File


<perch:before> <ul class="hfeed listing"></perch:before> <li class="hentry <perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes"><perch:category id="catSlug" type="slug" /></perch:categories>"> <a href="<perch:blog id="postURL" />" rel="bookmark" class="entry-title"> <perch:if exists="image"> <img src="<perch:blog id="image" type="image" width="300" height="200" crop="true" />" alt="<perch:blog id="postTitle" />" /> </perch:if> <h2><perch:blog id="postTitle" /></h2> <perch:blog id="excerpt" type="textarea" textile="true" words="20" /> <div class="listfoot"> <span class="comment">Comments: <perch:blog id="postCommentCount"/></span> <span class="listdate"><perch:blog id="postDateTime" format="%d %B %Y" /></span> </div> </a> </li> <perch:after> </ul> <perch:if exists="paging"> <div class="paging"> Page <perch:blog id="current_page" /> of <perch:blog id="number_of_pages" /> <perch:blog id="page_links" encode="false" /> <perch:if exists="not_first_page"> <a href="<perch:blog id="prev_url" encode="false" />">Previous</a> </perch:if> <perch:if exists="not_last_page"> <a href="<perch:blog id="next_url" encode="false" />">Next</a> </perch:if> </div> </perch:if> </perch:after>
Drew McLellan

Drew McLellan 2638 points
Perch Support

That shouldn't be an issue. Are you apple to reproduce this? How long after adding the images do they disappear?

To be completely truthful I'm not sure how long it takes before they're removed... i'd say a week? Is it the assets removing what it thinks are unused links?

If so can you turn that feature off and make all added images 'library assets'

Drew McLellan

Drew McLellan 2638 points
Perch Support

I can't turn it off, but you can:

define('PERCH_CLEAN_RESOURCES', false);

https://docs.grabaperch.com/docs/installing-perch/configuration/file/

I didn't mean literally can you do it, lol. I've added it and i'll see if it fixes the glitch...

On the same site I have that old gallery issue where a blank image is being shown on the front-end but there isn't one on the admin.

I thought this had been fixed as i've not had it come up for a while, is there a way of removing these blank images because you can't delete it in the admin because you can't see it

Thanks for the replies

Drew McLellan

Drew McLellan 2638 points
Perch Support

The only way I'm aware of is to remove the corrupt row from the database table.