Forum

Thread tagged as: Problem, Error, Gallery

Gallery images missing after upload

I have a number of clients using Perch Gallery App with a similar gallery template. I now have a regular complaint whereby, on bulk upload to the gallery, the album misses out some images but creates an empty div on the album page. Since there is no reference in the gallery app itself, they cannot delete the missing image. The solution is for me to delete the album and start again. Occasionally this works but more often errors keep happening.

The latest is on this site which is in development and almost every time the customer uploads to the gallery (5 at a time), a random image is missing each time from the display, this leaves a gap in the page which cannot be removed in the admin.

You can see this on https://joltfinal.jolt-web.co.uk/album?s=schools-primary At the moment, we can't seem to complete this gallery because each time we try again, an error occurs with a different image.

The image template is just:

<perch:gallery id="image" type="image" key="small" width="480" height="480" crop="true" />
<perch:gallery id="image" type="image" key="main"  width="1200" height="1200" crop="false"/>
<perch:gallery id="image" type="image" key="thumb" width="300" height="300" crop="true" />
<perch:gallery id="desc" type="textarea" label="Description" size="s" html="true" editor="tinymce" />

Diagnostics report:

Perch Runway: 2.8.31
Production mode: Production (100)
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_blog (5.0), perch_events (1.9.2), perch_forms (1.8.3), perch_gallery (2.8.6), perch_members (1.5), perch_backup (1.2)
DB driver: PDO
DB tables: perch2_backup_plans (0), perch2_backup_resources (0), perch2_backup_runs (0), perch2_blog_authors (2), perch2_blog_comments (0), perch2_blog_index (73), perch2_blog_posts (0), perch2_blog_posts_to_tags (0), perch2_blog_sections (1), perch2_blog_tags (0), perch2_blogs (1), perch2_categories (1), perch2_category_counts (0), perch2_category_sets (2), perch2_collection_index (0), perch2_collection_items (0), perch2_collection_revisions (0), perch2_collections (0), perch2_content_index (6093), perch2_content_items (451), perch2_content_regions (84), perch2_events (0), perch2_events_categories (0), perch2_events_to_categories (0), perch2_forms (1), perch2_forms_responses (3), perch2_gallery_albums (7), perch2_gallery_image_versions (474), perch2_gallery_images (80), perch2_members (2), perch2_members_forms (0), perch2_members_member_tags (2), perch2_members_sessions (0), perch2_members_tags (4), perch2_navigation (2), perch2_navigation_pages (11), perch2_page_routes (3), perch2_page_templates (33), perch2_pages (38), perch2_resource_log (4884), perch2_resource_tags (0), perch2_resources (997), perch2_resources_to_tags (0), perch2_settings (33), perch2_user_passwords (0), perch2_user_privileges (44), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (2)
Users: 2
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_events',
        'perch_members',
        'perch_gallery',
        'perch_forms',
    );
Scheduled tasks for perch_events: update_category_counts (60 mins)
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: tinymce, ckeditor, markitup
H1: 226fb5472a43a72d55ed025c83cfb5b2
L1: 74619fd9acb4c13fa306dffcfdcd4a1f
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #000000
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.31: done
perch_members_update: 1.4
headerScheme: dark
update_runway_2.8.31: done
latest_version: 2.8.15
on_sale_version: 2.8.32
perch_blog_update: 5.0.1
perch_blog_post_url: /blog/post?s={postSlug}
perch_gallery_bucket_mode: dynamic
perch_gallery_bucket: default
perch_events_detail_url: /events/event?s={eventSlug}
perch_blog_site_name:
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_backup_mysqldump_path:
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_gallery_basicUpload: 0
perch_blog_comment_notify: 0
perch_events_update: 1.8
perch_members_login_page: /members/login?r={returnURL}
perch_gallery_update: 2.8.5
logoPath: /perch/resources/joltmedialogotrans.png
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /home/sites/jolt-web.co.uk/public_html/joltperch
PERCH_SCHEDULE_SECRET: ##############
PERCH_DB_USERNAME:##############
PERCH_DB_SERVER: ##############
PERCH_DB_DATABASE: ##############
PERCH_DB_PREFIX: ##############_
PERCH_YOUTUBE_API_KEY: ##############
PERCH_EMAIL_FROM: ##############
PERCH_EMAIL_FROM_NAME: ##############
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/sites/jolt-web.co.uk/public_html/joltperch/perch
PERCH_CORE: /home/sites/jolt-web.co.uk/public_html/joltperch/perch/core
PERCH_RESFILEPATH: /home/sites/jolt-web.co.uk/public_html/joltperch/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_RUNWAY: 1
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/sites/jolt-web.co.uk/public_html/joltperch/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: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.5.38
Zend: 2.5.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $
MySQL server: 5.5.47
Free disk space: 14.53 TB
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, sockets, mbstring, tokenizer, xml, cgi-fcgi, bcmath, curl, dom, enchant, fileinfo, gd, imap, intl, json, ldap, exif, mcrypt, mssql, mysqlnd, mysql, mysqli, odbc, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, recode, soap, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, mhash, ionCube Loader, Zend Guard Loader
GD: Yes
ImageMagick: No
PHP max upload size: 120M
PHP max form post size: 120M
PHP memory limit: 128M
Total max uploadable file size: 120M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PATH: /usr/local/bin:/usr/bin:/bin
UNIQUE_ID: WCGu-n8AAAEAAlAO0ioAAAAm
SCRIPT_URL: /perch/core/settings/diagnostics/
SCRIPT_URI: https://joltfinal.jolt-web.co.uk/perch/core/settings/diagnostics/
HTTP_HOST: joltfinal.jolt-web.co.uk
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.87 Safari/537.36
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_REFERER: https://joltfinal.jolt-web.co.uk/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: cmsa=1; PHPSESSID=a8aiucspevdkdrjg614a07sah3
HTTP_CONNECTION: close
SERVER_SIGNATURE: <address>Apache/2.4.23 (Unix) Server at joltfinal.jolt-web.co.uk Port 80</address>
SERVER_SOFTWARE: Apache/2.4.23 (Unix)
SERVER_NAME: joltfinal.jolt-web.co.uk
SERVER_ADDR: 10.0.230.50
SERVER_PORT: 80
REMOTE_ADDR: 80.192.170.194
DOCUMENT_ROOT: /home/sites/jolt-web.co.uk/public_html/joltperch/
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /home/sites/jolt-web.co.uk/public_html/joltperch/
SERVER_ADMIN: webmaster@joltfinal.jolt-web.co.uk
SCRIPT_FILENAME: /home/sites/jolt-web.co.uk/public_html/joltperch/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 45143
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: 1478602494.7121
REQUEST_TIME: 1478602494

This has been happening on both Perch and Runway, so not sure what to suggest to client.

Richard Lowe

Richard Lowe 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

It sounds like an error processing the images - usually to hitting a limit such as memory or script timeout. Does it happen in dev?

Richard Lowe

Richard Lowe 0 points
Registered Developer

I haven't been able to replicate problem locally or even from my own network. The main problem is that most clients don't mind a failed upload, it's the fact that they can't remove the offending 'placeholder' on the page. Hmm.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, I can see how that would be a bother. I'll take a look at it!

Drew McLellan

Drew McLellan 2638 points
Perch Support

Oh - could you show me an example of a database row for one of the failed uploads? That would help tremendously.

Richard Lowe

Richard Lowe 0 points
Registered Developer

Not sure if this is what you want, but this is from the 'perch2_gallery_images' table

imageID Ascending imageAlt imageSlug albumID imageOrder imageDynamicFields imageStatus imageBucket
300 colstons19of157 colstons19of157 15 15 NULL active schools-primary

I can't see anything for that image in the 'perch2_gallery_image_versions'.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ah, ok that makes sense. If there's a record for it in images but not in image_versions. We should be able to detect and clean those up.

Richard Lowe

Richard Lowe 0 points
Registered Developer

Thanks!

Richard Lowe

Richard Lowe 0 points
Registered Developer

Sorry to open this up again, but I've had 2 more clients reporting these missing uploads in their galleries which they can't delete. Is this something that will likely be resolved within a gallery app update. Not sure what to suggest to them.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, it's something that would be resolved in a Gallery update.

Richard Lowe

Richard Lowe 0 points
Registered Developer

Thanks Drew, I can live with it for now!