Forum

Thread tagged as: Problem, Addons, Blog

Images disappearing in blog articles

Hi,

It seems that images randomly disappear on blog posts, while my client doesn't have access to delete them via the admin. I'm now on version 5.0 of the blog app. This happened while version 4.6 was running.

Is this a bug that is fixed in this new version? Can you help me avoid this from happening again.

Cheers, Veerle

Veerle Pieters

Veerle Pieters 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are the images uploaded into the body of the post, or via a dedicated image field?

Via a dedicated image field. I'm using blocks for the blog posts so my client can layout his page the way he likes. There are separate block items for different types of images : one that is big and central and one that is flush left or right.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is there any action or trigger that causes it?

Not that I can figure out because it happened with images that are big and central and also with ones that are flushed left. There doesn't seem to be an obvious pattern. The only thing that is noticeable is that there was one image left on the post where 6 others where disappeared. When I looked in Google cache they seemed to have been gone since days after posting the articles. My client uploads the image via the 'Select or upload an image' link.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, I think I might have found the bug - I'm just testing out my fix now.

Sorry about this.

Hi Drew, did you find the bug? Sure do hope so because this wasn't a pleasant experience explaining this to my client. Keep me posted when there is fix please.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Sorry, we had a rather busy day yesterday. I'm back onto testing this out today.

Try to fix asap please and make it a priority. I'm adding the images back right now. I didn't have them, so had to ask for them to my client. I'll back up the folder after I'm done to be safe. I'm also busy but I'm responsible for recommending Perch so I have to do this.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I appreciate it's important. Yesterday's mass security issue had to take priority.

I believe I've fixed the issue and I'm testing it. It's not just a case of reloading a page to see if it worked - the procedure is complex and takes a bit of time. I need to make sure that I don't rush a change out and break tens of thousands of sites in order to fix just one.

But I'm on it! Don't worry, it's what I'm doing today.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok thanks. Glad you found it. Does this one also fix the Markdown link adding bug? I'm running v2-8-16 and the read me of your link only mentions "If updating from less than 2.8.15, copy over the perch/addons/plugins/editors/markitup folder to update the MarkItUp editor". So do I update Markdown too or is that included?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

If you upgraded MarkItUp last time you don't need to do it again, if you have not already copied over MarkItUp please do so now.

Ok thanks. Installed it and it works.

Hi Drew, Rachel,

I'm afraid the bug isn't really gone. I have the same thing happening again: random images disappearing on the blog. Have to replace a lot of images on the blog that are jus gone out of the blue :(

Can you guys have a look again at this please? It seems not be solved yet I'm afraid.

Thank you. Veerle

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can we see the Diagnostic Report for this site now and your Blog post.html template?

Here is the Diagnostic Report:

Perch: 2.8.19
Production mode: Production (100)
Installed apps: content (2.8.19), assets (2.8.19), categories (2.8.19), perch_blog (5.0), 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_blogs, 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: 2
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_forms',
        'perch_blog',
    );
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: markitup, redactor
H1: 170c5fbe3557d34942084ffc0da546fd
L1: f58531479db8e612098ea534d975b4db
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.13: done
latest_version: 2.8.15
on_sale_version: 2.8.20
headerScheme: light
perch_blog_post_url: /blog/{postSlug}
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_comment_notify: 0
logoPath: /perch/resources/1441873362_logo-arriva.png
perch_blog_update: 5.0.1
update_2.8.16: done
update_2.8.18: done
update_2.8.19: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: ID178364_arriva
PERCH_DB_SERVER: mysql038.hosting.combell.com
PERCH_DB_DATABASE: ID178364_arriva
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Europe/Brussels
PERCH_EMAIL_FROM: veerle@duoh.com
PERCH_EMAIL_FROM_NAME: Veerle Pieters
PERCH_LOGINPATH: /perch
PERCH_PATH: /data/sites/web/arrivacc/www/perch
PERCH_CORE: /data/sites/web/arrivacc/www/perch/core
PERCH_RESFILEPATH: /data/sites/web/arrivacc/www/perch/resources
PERCH_RESPATH: /perch/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_RUNWAY_ROUTED:
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /data/sites/web/arrivacc/www/perch/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:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.5.30
Zend: 2.5.0
OS: Linux
SAPI: fpm-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $
MySQL server: 5.5.31-1~dotdeb.0
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, gettext, gmp, SPL, iconv, session, intl, json, mbstring, mcrypt, mssql, standard, mysqlnd, PDO, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, imap, SimpleXML, soap, sockets, mysqli, exif, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, mysql, cgi-fcgi, imagick, mhash, Zend OPcache
GD: Yes
ImageMagick: Yes
PHP max upload size: 8M
PHP max form post size: 8M
PHP memory limit: 64M
Total max uploadable file size: 8M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
USER: arrivacc
HOME: /data/sites/web/arrivacc/
FCGI_ROLE: RESPONDER
UNIQUE_ID: VnwhirA@qHoAAODyResAAAAH
SCRIPT_URL: /perch/core/settings/diagnostics/
SCRIPT_URI: https://arriva.cc/perch/core/settings/diagnostics/
proxy-nokeepalive: 1
HTTP_HOST: arriva.cc
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: _ga=GA1.2.393409283.1450975527; _gat=1; PHPSESSID=cbotjjpdhs8rinti2sja47gos0; cmsa=1
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_REFERER: https://arriva.cc/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate
PATH: /sbin:/usr/sbin:/bin:/usr/bin
LD_LIBRARY_PATH: /data/jail/usr/local/httpd-2.4.16-worker/lib
SERVER_SOFTWARE: Apache
SERVER_NAME: arriva.cc
SERVER_ADDR: 176.62.168.128
SERVER_PORT: 80
REMOTE_ADDR: 141.135.212.155
DOCUMENT_ROOT: /data/sites/web/arrivacc/www
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /data/sites/web/arrivacc/www
SERVER_ADMIN: support@combell.com
SCRIPT_FILENAME: /data/sites/web/arrivacc/www/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 48175
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1450975626.6496
REQUEST_TIME: 1450975626

here is the post.html template :

<article class="blog-article">

  <header class="blog-title">
      <h1><perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" /></h1>
    <h3><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/%m/%Y" /> 
    </time></h3>
  </header>  

  <div class="description e-content">

  <perch:help>
    <p><strong>KLEINE beelden</strong> (kleiner dan 600 pixels breed) worden links of rechts uitgelijnd.<br>
    <b><strong>GROTE beelden</strong> (groter dan 600 pixels breed) worden gecentreerd.<br>
    <p><strong>MAXIMUM breedte</strong> van de beelden: <strong>1180</strong> pixels</p>
  </perch:help>

  <div class="intro-txt">
    <perch:blog id="intro-text" type="textarea" markdown="true" editor="markitup" size="s autowidth" order="1" label="Korte Introtekst" />
  </div>

  <perch:blocks>

    <perch:block type="text" label="Tekst">
      <perch:blog id="text" type="textarea" markdown="true" editor="markitup" size="l autowidth" label="Tekst" />
    </perch:block>

    <perch:block type="quote" label="Citaat">
        <blockquote>
            <perch:blog id="quote" type="textarea" markdown="true" size="xs" label="Citaat" />
              <cite>— <perch:blog id="cite" type="smarttext" label="Door (naam)" /></cite>
        </blockquote>
    </perch:block>

    <perch:block type="pullquote" label="Quote">
        <blockquote class="quote">
            <perch:blog id="pullquote" type="textarea" markdown="true" size="xs" label="Quote" />
        </blockquote>
    </perch:block>

    <perch:block type="streamer" label="Streamer">
        <blockquote>
            <perch:blog id="streamer" type="textarea" markdown="true" size="xs" label="Streamer" />
        </blockquote>
    </perch:block>

    <perch:block type="inlineimage" label="Klein beeld">
            <figure class="inline <perch:blog id="class" type="select" options="Links uitgelijnd|pull-left,Rechts uitgelijnd|pull-right" label="Uitlijning" order="2" />">
                <img src="<perch:blog id="image" type="image" density="2" label="Klein beeld" order="1" />" class="img-responsive" />
            </figure>
        </perch:block>

    <perch:block type="image" label="Groot beeld">
        <figure class="full">
             <img src="<perch:blog id="image" type="image" label="Beeld" />" class="img-responsive" />
             <figcaption><perch:blog id="caption" type="smarttext" label="Ondertiteling" /></figcaption>
        </figure>
    </perch:block>  

  </perch:blocks>
 </div>


<perch:after>
  <div class="share">
    <p>Deel & gebruik hashtag #koffiets, #potvolkoffie of #arriva.</p>
    <div class="social-links">
      <a href="https://www.facebook.com/sharer/sharer.php?u=http%3A//arriva.cc<perch:blog id="postURL" />" class="icon-facebook-active">facebook</a>
      <a href="https://twitter.com/intent/tweet?status=<perch:blog id="postTitle" />+https://arriva.cc<perch:blog id="postURL" />" class="icon-twitter-active">twitter</a>
    </div>
  </div><!-- // share -->   
</perch:after> 

<perch:categories id="blog-category" label="Categorie" set="blog" required="true" /> 
  <perch:before>
    <h3>Gearchiveerd onder</h3>
    <ul class="tags">
  </perch:before>
      <li><a href="archive.php?cat=<perch:category id="catSlug" />"><perch:category id="catTitle" /></a></li>
  <perch:after>
    </ul>
  </perch:after>
</perch:categories>

</article>
Drew McLellan

Drew McLellan 2638 points
Perch Support

The issue is with logging image use - so it's possible you still have old images that weren't logged correctly in the past.

To stop any deleting, add this to your perch/config/config.php file:

define('PERCH_CLEAN_RESOURCES', false);

Hi Drew,

Thank you for the quick help. I've added the line. Hope it'll be solved this way.

Merry Christmas to you both :)

Warm Regards, Veerle