Thread tagged as: Question, Problem

Uploading a File Link Issue

I'm attempting to add a file link to a body paragraph, but when I click the file icon it goes straight to assets without providing the regular pop-up box to add the file link text. After I click an asset it applies the following code, e.g. [cms:asset 323]. How do I update this to add text to this file link so it is visible on the site and clickable?

Note I attempted to configure the like like this: "Test Link Text":[cms:asset 328], but on the website it shows the following: Test Link Text href=”/perch/resources/9902015.pdf”>. "Test Link Text" is clickable on the site but the link is only https:WEBSITE/<a

Ryan McGuire

Ryan McGuire 0 points

  • 3 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your diagnostics report and template.

Perch: 3.0.14 Production mode: Production (100) Installed apps: content (3.0.14), assets (3.0.14), categories (3.0.14), perch_forms (1.8.3), perch_mailchimp (3.1) DB driver: PDO DB tables: perch2_categories (0), perch2_category_counts (0), perch2_category_sets (0), perch2_content_index (5784), perch2_content_items (834), perch2_content_regions (68), perch2_forms (1), perch2_forms_responses (495), perch2_menu_items (10), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (0), perch2_pages (15), perch2_resource_log (1304), perch2_resource_tags (0), perch2_resources (315), perch2_resources_to_tags (0), perch2_settings (23), perch2_user_passwords (0), perch2_user_privileges (31), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (2) Users: 2 App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', ); Scheduled tasks for perch_mailchimp: import_data (1 mins) Editor plug-ins: markitup H1: 3b15393b44c229cd6d0cfb4b52205908 L1: 86142a4eea6389ab5dae9e059c03252f F1: 3b606135b33e6a102526838f4152a807 headerColour: #ffffff content_singlePageEdit: 1 hideBranding: 1 content_collapseList: 1 lang: en-gb update_2.8.2: done latest_version: on_sale_version: headerScheme: light helpURL: HIDDEN siteURL: HIDDEN content_hideNonEditableRegions: 1 perch_mailchimp_api_key: HIDDEN perch_mailchimp_list_id: perch_mailchimp_campaign_url: /mailchimp/campaign.php?s={campaignSlug} dashboard: 0 hide_pwd_reset: 0 content_frontend_edit: 0 logoPath: /perch/resources/perch_2015.png update_2.8.17: done update_3.0.5: done content_skip_region_list: 0 update_3.0.14: done PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: HIDDEN PERCH_DB_SERVER: localhost PERCH_DB_DATABASE: HIDDEN PERCH_DB_PREFIX: perch2_ PERCH_TZ: UTC PERCH_EMAIL_FROM: HIDDEN PERCH_EMAIL_FROM_NAME:HIDDEN PERCH_LOGINPATH: /perch PERCH_PATH: HIDDEN/perch PERCH_CORE: HIDDEN/perch/core PERCH_RESFILEPATH: HIDDEN/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_ASSET_VERSION: f704e7442d11292c99b5 PERCH_DEBUG: PERCH_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: HIDDEN/perch/templates PERCH_TEMPLATE_FILTERS: PERCH_DEFAULT_DOC: index.php PERCH_DEFAULT_EXT: .php PERCH_PRODUCTION_MODE: 100 PERCH_XHTML_MARKUP: PERCH_RWD: 1 PERCH_HTML_ENTITIES: PERCH_SSL: PERCH_STRIPSLASHES: PERCH_PROGRESSIVE_FLUSH: 1 PERCH_PARANOID: PERCH_FORCE_SECURE_COOKIES: PERCH_DEFAULT_BUCKET: default PERCH_TRANSLATION_ASSIST: PERCH_PASSWORD_MIN_LENGTH: 6 PERCH_MAX_FAILED_LOGINS: 10 PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR PERCH_VERIFY_UPLOADS: PERCH_PRIV_ASSIST: PERCH_CUSTOM_EDITOR_CONFIGS: PERCH_ENABLE_EXIF: 1 PERCH_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: PERCH_APPS_EDITOR_PLUGIN: markitup PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown Hosting settings PHP: 5.4.45 Zend: 2.4.0 OS: Linux SAPI: cgi-fcgi Safe mode: not detected MySQL client: 5.5.51-38.2 MySQL server: 5.5.51-38.2 Free disk space: 365.93 GB Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, gettext, gmp, SPL, iconv, session, intl, json, mbstring, mcrypt, mssql, mysql, mysqli, odbc, standard, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, Reflection, imap, SimpleXML, soap, sockets, exif, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, imagick, SourceGuardian, mhash, ionCube Loader, Zend Guard Loader GD: Yes ImageMagick: Yes PHP max upload size: 64M PHP max form post size: 64M PHP memory limit: 256M Total max uploadable file size: 64M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes DOCUMENT_ROOT: HIDDEN GATEWAY_INTERFACE: CGI/1.1 HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8 HTTP_ACCEPT_ENCODING: gzip, deflate HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.9,pt;q=0.8 HTTP_CONNECTION: close HTTP_COOKIE: HIDDEN HTTP_DNT: 1 HTTP_HOST: HIDDEN HTTP_REFERER: HIDDEN/perch/core/settings/diagnostics/ HTTP_UPGRADE_INSECURE_REQUESTS: 1 HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 HTTP_X_HTTP_PROTO: HTTP/1.1 HTTP_X_LOG_7520: HIDDEN HTTP_X_REAL_IP: HIDDEN PATH: /bin:/usr/bin QUERY_STRING: extended REDIRECT_STATUS: 200 REMOTE_ADDR: HIDDEN REMOTE_PORT: 44475 REQUEST_METHOD: GET REQUEST_URI: /perch/core/settings/diagnostics/?extended SCRIPT_FILENAME: WEBSITE HIDDEN/perch/core/settings/diagnostics/index.php SCRIPT_NAME: /perch/core/settings/diagnostics/index.php SERVER_ADDR: WEBSITE HIDDEN SERVER_ADMIN: WEBSITE HIDDEN SERVER_NAME: WEBSITE HIDDEN SERVER_PORT: 80 SERVER_PROTOCOL: HTTP/1.1 SERVER_SIGNATURE: <address>Apache Server at WEBSITE HIDDEN Port 80</address> SERVER_SOFTWARE: Apache UNIQUE_ID: HIDDEN PHP_SELF: /perch/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1517669628.01 REQUEST_TIME: 1517669628 argc: 1

Here is the template:

<div class="support-info"> <perch:content id="body" type="textarea" label="Support Overview" textile="true" editor="markitup" required="true" html="true" title="false" /> </div> <div class="support-button"> <a href="<perch:content id="donatelink" type="text" label="Donation URL" required="true" title="false" />" target="_blank"><perch:content id="button" type="text" label="Donate Button Text" required="true" title="false" /></a> </div>

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think you'd do this:

[cms:asset 328 title="My nice file"]

That did the trick! Thank you.