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

Assets being removed when in use

I recently updated to the latest version of perch from a version which didn't have assets available and when my client logged in and saved a page most of the assets which were there previously have now been deleted meaning that images are not showing up on most of the pages they should be. When you go to assets you can see the asset name but no thumbnail image beside it and when you click download the original it takes you to a 404 not found page.

The assets used to be in the resources folder but now are gone. Gallery images which were saved in gallery folders are still there.

Any ideas why this might be happening? They didn't manually delete any of the files.

Thanks

Peter Meenagh

Peter Meenagh 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which version did you update from?

In the first instance, pop your backup from before the update in place. Once you've done that, can you show us the diagnostics?

I'm not sure what it was. I updated it 2 weeks ago, everything seemed fine and then today assets disappearing.

I had noticed in some of the template files which were cropping the image I had width="960px" instead of width="960" would that matter? Literally all the images were there until my client who has an editor role went in and saved one page from there the images on the site had disappeared.

Also she didn't have the ability to upload assets. I now have allowed that for the editor role.

    Perch: 2.8.34
    Production mode: Production (100)
    Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_blog (5.0), perch_forms (1.7), perch_gallery (2.8.6)
    DB driver: MySQLi
    DB tables: perch2_blog_authors (2), perch2_blog_categories (3), perch2_blog_comments (0), perch2_blog_index (1780), perch2_blog_posts (79), perch2_blog_posts_to_categories (79), perch2_blog_posts_to_tags (7), perch2_blog_sections (1), perch2_blog_tags (7), perch2_blogs (1), perch2_categories (3), perch2_category_counts (3), perch2_category_sets (1), perch2_content_index (5414), perch2_content_items (4709), perch2_content_regions (379), perch2_forms (13), perch2_forms_responses (453), perch2_gallery_albums (42), perch2_gallery_image_versions (8160), perch2_gallery_images (1635), perch2_navigation (4), perch2_navigation_pages (18), perch2_page_templates (2), perch2_pages (112), perch2_resource_log (1785), perch2_resource_tags (2), perch2_resources (1367), perch2_resources_to_tags (2), perch2_settings (29), perch2_user_passwords (0), perch2_user_privileges (43), perch2_user_role_privileges (39), perch2_user_roles (2), perch2_users (2)
    Users: 2
    PHPMailer: 5.2.21
    App runtimes:

    <?php
        $apps_list = array(
            'content', 
            'categories',
            'perch_gallery',
            'perch_blog',
            'perch_forms',
        );

    Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
    Editor plug-ins: ckeditor, markitup
    H1: 06834d7b4992ebcb74d47928964e8db4
    L1: bcdb37178d9e33901dfa409dea0be10f
    F1: 6a33f95eca3667f9e0c39bf5ca2980fe
    headerColour: #ffffff
    content_singlePageEdit: 1
    helpURL:
    siteURL: /
    hideBranding: 1
    content_collapseList: 1
    lang: en-gb
    update_2.2.3: done
    latest_version: 2.8.15
    headerScheme: light
    dashboard: 0
    content_hideNonEditableRegions: 1
    logoPath: /perch/resources/choral.png
    perch_blog_post_url: /blog/post.php?s={postSlug}
    perch_blog_update: 5.0.1
    update_2.3.2: done
    perch_gallery_update: 2.8.5
    perch_blog_slug_format: %Y-%m-%d-{postTitle}
    perch_blog_akismet_key:
    perch_gallery_bucket_mode: dynamic
    perch_gallery_bucket: default
    perch_blog_comment_notify: 0
    perch_gallery_basicUpload: 0
    update_2.4.9: done
    on_sale_version: 2.8.34
    update_2.5: done
    hide_pwd_reset: 1
    content_frontend_edit: 0
    update_2.8.34: done
    PERCH_DEVELOPMENT: 10
    PERCH_STAGING: 50
    PERCH_PRODUCTION: 100
    PERCH_DB_USERNAME: dbusername
    PERCH_DB_SERVER: localhost
    PERCH_DB_DATABASE: databasename
    PERCH_DB_PREFIX: perch2_
    PERCH_TZ: UTC
    PERCH_EMAIL_FROM: 
    PERCH_EMAIL_FROM_NAME: Pete
    PERCH_LOGINPATH: /perch
    PERCH_PATH: /home/codi/public_html/perch
    PERCH_CORE: /home/codi/public_html/perch/core
    PERCH_RESFILEPATH: /home/codi/public_html/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_STRONG_PASSWORDS:
    PERCH_DEBUG:
    PERCH_PREVIEW_ARG: preview
    PERCH_TEMPLATE_PATH: /home/codi/public_html/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_PARANOID:
    PERCH_FORCE_SECURE_COOKIES:
    PERCH_PASSWORD_MIN_LENGTH: 6
    PERCH_MAX_FAILED_LOGINS: 10
    PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
    PERCH_VERIFY_UPLOADS:
    PERCH_AUTH_PLUGIN:
    PERCH_DB_CHARSET:
    PERCH_DB_PORT:
    PERCH_DB_SOCKET:
    PERCH_SESSION_TIMEOUT_MINS: 20

Hosting settings

    PHP: 5.5.32
    Zend: 2.5.0
    OS: Linux
    SAPI: cgi-fcgi
    Safe mode: not detected
    MySQL client: 5.5.48
    MySQL server: 5.5.52-cll
    Free disk space: 11.04 GB
    Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, json, mbstring, mcrypt, standard, mysql, mysqli, mysqlnd, Phar, posix, Reflection, imap, SimpleXML, soap, sockets, exif, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi
    GD: Yes
    ImageMagick: No
    PHP max upload size: 128M
    PHP max form post size: 8M
    PHP memory limit: 512M
    Total max uploadable file size: 8M
    Resource folder writeable: Yes
    Session timeout: 24 minutes
    Native JSON: Yes
    Filter functions: Yes
    Transliteration functions: No
    CONTEXT_DOCUMENT_ROOT: /home/codi/public_html
    DOCUMENT_ROOT: /home/codi/public_html
    GATEWAY_INTERFACE: CGI/1.1
    HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    HTTP_ACCEPT_ENCODING: gzip, deflate
    HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.5
    HTTP_CONNECTION: keep-alive
    HTTP_DNT: 1
    HTTP_HOST: sitenamereplaced.com
    HTTP_REFERER: http://sitenamereplaced.com/perch/core/settings/diagnostics/
    HTTP_UPGRADE_INSECURE_REQUESTS: 1
    HTTP_USER_AGENT: agent
    PATH: /bin:/usr/bin
    PHPRC: /home/codi/public_html
    QUERY_STRING: extended
    REDIRECT_STATUS: 200
    REMOTE_ADDR: 
    REMOTE_PORT: 59377
    REQUEST_METHOD: GET
    REQUEST_SCHEME: http
    REQUEST_URI: /perch/core/settings/diagnostics/?extended
    SCRIPT_FILENAME: /home/codi/public_html/perch/core/settings/diagnostics/index.php
    SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
    SERVER_ADDR: IP
    SERVER_ADMIN: webmaster@sitenamereplaced.com
    SERVER_NAME: sitename.com
    SERVER_PORT: 80
    SERVER_PROTOCOL: HTTP/1.1
    SERVER_SOFTWARE: Apache
    UNIQUE_ID:
    PHP_SELF: /perch/core/settings/diagnostics/index.php
    REQUEST_TIME_FLOAT:
    REQUEST_TIME:
    argc: 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. Are you not able to get the backup?

I'm not. Don't suppose you know why this might be happening though?

Would using define('PERCH_CLEAN_RESOURCES', false); maybe stop this from happening?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that's what I'd recommend.

Without knowing anything about the state of the data before you updated it, I couldn't say why it's happening.