Forum

Thread tagged as: Problem, Error

Problem selecting images

Hi,

I'm finding that when I add images to a particular region, that they're correctly added to the database and showing on the front end, but they don't show up as thumbnails in the admin. I'm pretty sure this used to be OK. A couple of things to note that might help:

  • The site is based on a duplicate of another for the same company, being cut down, new content and branding added. So the database isn't a fresh start. Would perhaps trashing the assets and re-uploading them help?
  • The region contains a repeater, inside which I've got a field for a SVG and one for a fallback image.

Here's the diagnostic report, thanks for your help!


Perch: 2.8.29 Production mode: Production (100) Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_forms (1.8.3), perch_backup (1.2), perch_twitter (3.5.1) DB driver: PDO DB tables: perch2_blog_authors (10), perch2_blog_comments (0), perch2_blog_index (1082), perch2_blog_posts (27), perch2_blog_posts_to_tags (3), perch2_blog_sections (9), perch2_blog_tags (3), perch2_blogs (1), perch2_categories (20), perch2_category_counts (9), perch2_category_sets (2), perch2_content_index (6260), perch2_content_items (497), perch2_content_regions (79), perch2_forms (1), perch2_forms_responses (1), perch2_navigation (1), perch2_navigation_pages (5), perch2_page_templates (2), perch2_pages (17), perch2_resource_log (1088), perch2_resource_tags (455), perch2_resources (846), perch2_resources_to_tags (1202), perch2_scheduled_tasks (30), perch2_settings (29), perch2_twitter_scheduled_tweets (0), perch2_twitter_settings (1), perch2_twitter_tweets (665), perch2_user_passwords (0), perch2_user_privileges (41), perch2_user_role_privileges (21), perch2_user_roles (3), perch2_users (3) Users: 3 App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_twitter' ); Scheduled tasks for perch_twitter: post_tweets (1 mins), update_tweets (15 mins) Editor plug-ins: ckeditor, markitup H1: 52e9532b10e77da9875d0c5fc9177083 L1: 1c9da8245c70225fbd8003688aec6314 F1: 2edba60ed1f613d6dd804feb202456a2 headerColour: #ffffff content_singlePageEdit: 1 helpURL: siteURL: / hideBranding: 1 content_collapseList: 1 lang: en-gb update_2.8.13: done latest_version: 2.8.15 on_sale_version: 2.8.29 headerScheme: light dashboard: 1 hide_pwd_reset: 0 content_hideNonEditableRegions: 0 content_frontend_edit: 0 perch_twitter_update: 3.5 perch_blog_post_url: /lift-blog/entry/{postSlug} perch_blog_slug_format: {postTitle} perch_blog_akismet_key: perch_blog_max_spam_days: 0 perch_backup_mysqldump_path: perch_blog_comment_notify: 0 perch_blog_update: 5.0.1 update_2.8.15: done update_2.8.16: done update_2.8.29: done PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: madewith_ladvstg PERCH_DB_SERVER: localhost PERCH_DB_DATABASE: madewith_liftadvice_stg PERCH_DB_PREFIX: perch2_ PERCH_TZ: UTC PERCH_EMAIL_FROM: stephen.whitby@lift-advice.com PERCH_EMAIL_FROM_NAME: Stephen Whitby PERCH_LOGINPATH: /perch PERCH_PATH: /home/madewith/public_html/subdomains/lift-advice/perch PERCH_CORE: /home/madewith/public_html/subdomains/lift-advice/perch/core PERCH_RESFILEPATH: /home/madewith/public_html/subdomains/lift-advice/perch/resources PERCH_RESPATH: /perch/resources PERCH_CLEAN_RESOURCES: PERCH_HTML5: 1 PERCH_SCHEDULE_SECRET: pinecone PERCH_EMAIL_METHOD: smtp PERCH_EMAIL_HOST: smtp.postmarkapp.com PERCH_EMAIL_AUTH: 1 PERCH_EMAIL_SECURE: PERCH_EMAIL_PORT: 587 PERCH_EMAIL_USERNAME: 71d29bb3-d4e2-47d0-a55c-f2688b800397 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/madewith/public_html/subdomains/lift-advice/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 PERCH_APPS_EDITOR_PLUGIN: markitup PERCH_APPS_EDITOR_MARKUP_LANGUAGE: textile HOSTING SETTINGS PHP: 7.0.7 Zend: 3.0.0 OS: Linux SAPI: litespeed Safe mode: not detected MySQL client: 10.0.20-MariaDB MySQL server: 10.0.20-MariaDB-cll-lve Free disk space: 1.03 TB Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, litespeed, bcmath, dom, gd, imap, intl, json, exif, mcrypt, mysqli, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, sockets, xmlreader, xmlwriter, Zend OPcache GD: Yes ImageMagick: No PHP max upload size: 100M PHP max form post size: 100M PHP memory limit: 128M Total max uploadable file size: 100M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes PATH: /usr/local/bin:/usr/bin:/bin TEMP: /tmp TMP: /tmp TMPDIR: /tmp 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 HTTP_CONNECTION: close HTTP_COOKIE: PHPSESSID=vh6o160j12i8m936emc0b3aai3; cmsa=1; cookies_accepted=yes; visited=1; _ga=GA1.3.2127271205.1461850733 HTTP_HOST: lift-advice.madewithmanners.co.uk HTTP_REFERER: https://lift-advice.madewithmanners.co.uk/perch/core/settings/diagnostics/ HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17 HTTP_X_FORWARDED_FOR: 82.3.109.165 UNIQUE_ID: V17HU01IAWIACZoByVUAAAKi SERVER_SOFTWARE: Apache SERVER_NAME: lift-advice.madewithmanners.co.uk SERVER_ADDR: 77.72.1.98 SERVER_PORT: 80 REMOTE_ADDR: 82.3.109.165 DOCUMENT_ROOT: /home/madewith/public_html/subdomains/lift-advice REQUEST_SCHEME: http CONTEXT_DOCUMENT_ROOT: /home/madewith/public_html/subdomains/lift-advice SERVER_ADMIN: webmaster@lift-advice.madewithmanners.co.uk SCRIPT_FILENAME: /home/madewith/public_html/subdomains/lift-advice/perch/core/settings/diagnostics/index.php REMOTE_PORT: 58198 SERVER_PROTOCOL: HTTP/1.0 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: 1465829203.9531 REQUEST_TIME: 1465829203
Alex Hardy

Alex Hardy 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you be any more specific about what you're seeing? Does the thumbnail get generated?

There are *-thumb@2x.png files on the server, but they were already there as this site is based on another. The SVGs however also don't show up and they don't have thumbnails – which I wouldn't expect them to have of course.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Did you move both the files and the database to create the new site?

Yes, that's true. Since the content of the new site is similar to the original, it seemed sensible to copy things over then start cutting away what I didn't want.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think that should be ok then. Is it any different for completely new uploads?

I just deleted a couple of assets and re-uploaded their files. It's still not showing in the admin, although they are there on the front end. I don't suppose creating a new bucket might help?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I meant completely new uploads, not re-uploads of things that did exist.

I just tried it with a new asset upload, still the same.

Drew McLellan

Drew McLellan 2638 points
Perch Support

No new errors in the server log or the browser console?

Is the resource directory writable?

I'm getting this error in the JavaScript console:


Error: TypeError: e is undefined Source File: https://lift-advice.madewithmanners.co.uk/perch/core/assets/js/perch.min.js?v=2.8.29 Line: 2

Yes, the resources folder is writable.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show us your template?

Sure thing.


<perch:if exists="heading"> <div class="icongrid"> <div class="l-container"> <div class="l-content l-content-inner"> <h2><perch:content id="heading" type="text" label="Heading" title="true" order="1" /></h2> </div> <!-- l-content --> <perch:repeater id="icons" label="Icons" order="5"> <perch:before> <div class="l-content l-group l-group6-l"> </perch:before> <div class="l-group-content l-content-inner"> <div class="icongrid-icon"> <div class="icongrid-icon-visual generalcontent"> <a href="<perch:content id="icon_link" type="pagelist" label="Links To Page" required="true" order="4" />" title="<perch:content id="icon_title" type="text" label="Title" required="true" order="3" />"> <perch:if exists="icon_image_svg"> <img src="<perch:content type="image" id="icon_image_svg" label="SVG Image" bucket="icongrid" order="1" />" data-nosvg="<perch:content type="image" id="icon_image" label="Image" bucket="icongrid" required="true" order="2" />" alt="<perch:content id="icon_title" type="text" label="Title" required="true" order="3" />" /> <perch:else /> <img src="<perch:content type="image" id="icon_image" label="Image" bucket="icongrid" required="true" order="2" />" alt="<perch:content id="icon_title" type="text" label="Title" required="true" order="3" />" /> </perch:if> </a> </div> <div class="icongrid-icon-info generalcontent generalcontent-alt"><a href="<perch:content id="icon_link" type="pagelist" label="Links To Page" required="true" order="4" />"><perch:content id="icon_title" type="text" label="Title" required="true" order="3" /></a></div> </div> <!-- icongrid-icon --> </div> <!-- l-group-content --> <perch:after> </div> <!-- l-group6-l --> </perch:after> </perch:repeater> </div> <!-- l-container --> </div> <!-- icongrid --> </perch:if>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the bucket icongrid exist?

Yes, and the assets are successfully uploaded into it.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is it only SVG images you are unable to select?

It does seem to be the SVGs that are the problem.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is you server configured to correctly serve SVG files?

Yes, they do display on the front end.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is it online anywhere I can see?