Forum

Thread tagged as: Problem, Runway

Columns In Collection View

I have a collection called Properties which has a realtionship to another collection called Locations. In the collection options for Properties I have specified the following collumn ID's for the collection view:

prop_name,property_location,stars,from_price

But the property_location column is blank, even after selecting a location for the property. Similarly the heading for the stars column is using the ID rather than the label – appearing as 'stars' instead of 'Star Rating'.

Diagnostics, Property Template, and Location Template to follow...

Toby Martin

Toby Martin 1 points

  • 4 years ago

Diagnostics:

Perch Runway: 2.8.32
Production mode: Production (100)
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32), perch_forms (1.8.3), collection_2 (2.8.32), collection_1 (2.8.32)
DB driver: PDO
DB tables: perch2_backup_plans (0), perch2_backup_resources (0), perch2_backup_runs (0), perch2_categories (0), perch2_category_counts (0), perch2_category_sets (0), perch2_collection_index (1209), perch2_collection_items (112), perch2_collection_revisions (21), perch2_collections (2), perch2_content_index (273), perch2_content_items (20), perch2_content_regions (4), perch2_forms (0), perch2_forms_responses (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_routes (3), perch2_page_templates (10), perch2_pages (8), perch2_resource_log (628), perch2_resource_tags (1), perch2_resources (123), perch2_resources_to_tags (2), perch2_settings (17), perch2_user_passwords (0), perch2_user_privileges (31), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (1)
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content',
        'categories',
        'perch_forms',
    );
Editor plug-ins: markitup
H1: 146b52be2f3f20d5f5ddc5e9dcbc5d7e
L1: b8e0f7cd814dce17db4311d25a624608
F1: 2edba60ed1f613d6dd804feb202456a2
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 0
lang: en-gb
update_2.8.29: done
headerColour: #e92d59
headerScheme: dark
update_runway_2.8.29: done
latest_version: 2.8.15
on_sale_version: 2.8.32
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
update_runway_2.8.32: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /Users/Toby/Sites/a4l
PERCH_SCHEDULE_SECRET: tLmVJ32udQTyEysj
PERCH_DB_SERVER: localhost
PERCH_DB_PREFIX: perch2_
PERCH_DB_USERNAME: root
PERCH_DB_DATABASE: perch_a4l
PERCH_EMAIL_FROM: toby@creativemonster.net
PERCH_EMAIL_FROM_NAME: Toby Martin
PERCH_LOGINPATH: /admin
PERCH_PATH: /Users/Toby/Sites/a4l/admin
PERCH_CORE: /Users/Toby/Sites/a4l/admin/core
PERCH_RESFILEPATH: /Users/Toby/Sites/a4l/admin/resources
PERCH_RESPATH: /admin/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: /Users/Toby/Sites/a4l/admin/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: 7.0.12
Zend: 3.0.0
OS: Darwin
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $
MySQL server: 5.6.33
Free disk space: 51.18 GB
Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, intl, json, ldap, mbstring, session, standard, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, readline, Reflection, mysqli, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, cgi-fcgi, imap, gettext, mcrypt, pgsql, pdo_pgsql
GD: Yes
ImageMagick: No
PHP max upload size: 32M
PHP max form post size: 32M
PHP memory limit: 128M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PHP_FCGI_CHILDREN: 4
PWD: /Applications/MAMP/fcgi-bin
PHP_FCGI_MAX_REQUESTS: 200
__CF_USER_TEXT_ENCODING: 0x1F5:0x0:0x2
ORIG_SCRIPT_NAME: /fcgi-bin/php7.0.12.fcgi
ORIG_PATH_TRANSLATED: /Users/Toby/Sites/a4l/admin/core/settings/diagnostics/index.php
ORIG_PATH_INFO: /admin/core/settings/diagnostics/index.php
ORIG_SCRIPT_FILENAME: /Applications/MAMP/fcgi-bin/php7.0.12.fcgi
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
REQUEST_URI: /admin/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REDIRECT_URL: /admin/core/settings/diagnostics/index.php
REDIRECT_QUERY_STRING: extended
REMOTE_PORT: 62462
SCRIPT_FILENAME: /Users/Toby/Sites/a4l/admin/core/settings/diagnostics/index.php
SERVER_ADMIN: you@example.com
DOCUMENT_ROOT: /Users/Toby/Sites/a4l
REMOTE_ADDR: ::1
SERVER_PORT: 8888
SERVER_ADDR: ::1
SERVER_NAME: loc.a4l
SERVER_SOFTWARE: Apache
PATH: /usr/bin:/bin:/usr/sbin:/sbin
HTTP_COOKIE: cmssb=0; cmsa=1; PHPSESSID=1ce11b58299e6f3d27084016b6ce7089
HTTP_ACCEPT_LANGUAGE: en-GB,en-US;q=0.8,en;q=0.6
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_REFERER: https://loc.a4l:8888/admin/core/settings/diagnostics/
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2936.0 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: keep-alive
HTTP_HOST: loc.a4l:8888
REDIRECT_STATUS: 200
REDIRECT_HANDLER: php-fastcgi
FCGI_ROLE: RESPONDER
PHP_SELF: /admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1480429865.55
REQUEST_TIME: 1480429865
argc: 1

Property Template:

<div class="property">
  <div class="property-header">
    <perch:content id="prop_name" type="text" label="Property Name" required="true" title="true" suppress="true" />

    <perch:related id="prop_location" collection="Locations" label="Location">
      <h3><perch:content id="property_location" type="text" label="Location" required="true" title="true" /></h3>
      <perch:content id="slug" type="slug" for="property_location" suppress="true" />
    </perch:related>

    <perch:template path="content/_stars.html" />

    <perch:if exists="from_price">
      <span>From: £<perch:content id="from_price" type="text" label="'From' Price (£)" /> /night</span>
    </perch:if>
  </div>

  <div class="main-image-wrapper">
    <perch:if exists="mainImage">
      <img src="<perch:content type="image" id="mainImage" label="Main Image" width="1200" height="800" crop="true" required="true" />" alt="<perch:content id="prop_name" type="text" label="Property Name" />" />
    </perch:if>

    <perch:if exists="extraImage1 OR (extraImage2 OR extraImage3 OR extraImage4)" >
      <img src="/img/gallery-icon.svg" alt="gallery icon" class="gallery-icon">
    </perch:if>

    <perch:content id="stars" type="radio" label="Star Rating" options="1 Star, 2 Star, 3 Star, 4 Star, 5 Star" suppress="true" />

    <perch:content id="featured" type="checkbox" label="Featured" help="Feature on the homepage?" suppress="true" />
  </div>

  <perch:content id="mainImage" type="image" width="600" height="400" suppress="true" crop="true" />

  <div class="property-desc">
    <perch:content id="prop_desc" type="textarea" label="Description" markdown="true" required="true" divider-after="Further Info" size="l"/>

    <perch:blocks>
      <perch:block type="desc" label="Text">
        <perch:content id="extra_desc" type="textarea" label="Further Description" markdown="true" required="true" size="m" />
      </perch:block>

      <perch:block type="bullet_title" label="Bullet List Title">
        <strong class="bullet-list-title"><perch:content id="bullet_list_title" type="text" label="List Title" /></strong>
      </perch:block>

      <perch:block type="list" label="Bullet List">
        <ul>
          <perch:repeater id="bullet_list" label="Bullet List">
            <li>
              <perch:content id="list" type="text" label="List Item" size="xxl"/>
            </li>
          </perch:repeater>
        </ul>
      </perch:block>
    </perch:blocks>

    <div class="tandcs">
      <hr>

      <h4>Terms and Conditions</h4>

      <p>All apartments differ from 48 hours notice to 14 days, a copy of the terms and conditions will be sent to you on enquiry of individual apartments</p>
    </div>
  </div>

  <perch:content id="slug" type="slug" for="prop_name" suppress="true" />
</div>

<section class="property-types">
  <div class="container">
    <h4>Apartments Available</h4>

    <perch:if exists="studio">
      <perch:content id="studio" type="checkbox" label="Studio" value="studio" suppress="true" divider-before="Types Available" />

      <div class="property-type">
        <img src="/img/1-bed.svg" alt="studio apartment icon" class="bed-icon">
        <h5>Studio</h5>
      </div>
    </perch:if>

    <perch:if exists="1bed">
      <perch:content id="1bed" type="checkbox" label="1 Bed" value="1bed" suppress="true" />

      <div class="property-type">
        <img src="/img/1-bed.svg" alt="1 bed apartment icon" class="bed-icon">
        <h5>1 Bed</h5>
      </div>
    </perch:if>

    <perch:if exists="2bed">
      <perch:content id="2bed" type="checkbox" label="2 Bed" value="2bed" suppress="true" />

      <div class="property-type">
        <img src="/img/2-bed.svg" alt="2 bed apartment icon" class="bed-icon">
        <h5>2 Bed</h5>
      </div>
    </perch:if>

    <perch:if exists="3bed">
      <perch:content id="3bed" type="checkbox" label="3 Bed" value="3bed" suppress="true" divider-after="Additional Images" />

      <div class="property-type">
        <img src="/img/3-bed.svg" alt="3 bed apartment icon" class="bed-icon">
        <h5>3 Bed</h5>
      </div>
    </perch:if>
  </div>
</section>

<section class="pricing">
  <div class="container">
    <p>A guideline to costings for <br> serviced apartments...</p>

    <div class="price-modules">
      <div class="price-module">
        <h5>Studios</h5>

        <h6>Long Term (90 days+)</h6>
        <hr>
        <div class="price">
          <div class="money-amount">
            <span class="money-symbol">£</span>
            <span>500</span>
            <span class="per-week">p/w</span>
          </div>
        </div>

        <h6>Short Term</h6>
        <hr>
        <div class="price">
          <div class="money-amount">
            <span class="money-symbol">£</span>
            700
            <span class="per-week">p/w</span>
          </div>
        </div>
      </div>

      <div class="price-module">
        <h5>One Bedroom</h5>

        <h6>Long Term (90 days+)</h6>
        <hr>
        <div class="price">
          <div class="money-amount">
            <span class="money-symbol">£</span>
            <span>750</span>
            <span class="per-week">p/w</span>
          </div>
        </div>

        <h6>Short Term</h6>
        <hr>
        <div class="price">
          <div class="money-amount">
            <span class="money-symbol">£</span>
            850
            <span class="per-week">p/w</span>
          </div>
        </div>
      </div>

      <div class="price-module">
        <h5>Two Bedroom</h5>

        <h6>Long Term (90 days+)</h6>
        <hr>
        <div class="price">
          <div class="money-amount">
            <span class="money-symbol">£</span>
            <span>1,100</span>
            <span class="per-week">p/w</span>
          </div>
        </div>

        <h6>Short Term</h6>
        <hr>
        <div class="price">
          <div class="money-amount">
            <span class="money-symbol">£</span>
            1,350
            <span class="per-week">p/w</span>
          </div>
        </div>
      </div>

      <div class="clearfix"></div>
    </div>
  </div>
</section>

<section class="enquire">
  <h3>Fancy staying here?</h3>
  <button class="btn" id="js-enquire-btn">Enquire Now</button>
  <perch:template path="forms/enquire.html" />
</section>

<section class="additional-images" id="js-property-images">
  <perch:if exists="extraImage1">
    <img src="<perch:content type="image" id="extraImage1" label="Extra Image" width="1000" height="650" crop="true" help="Image needs to be at least 1000px wide and 700px tall" />" alt="<perch:content id="prop_name" type="text" label="Property Name" />" class="extra-image" />
  </perch:if>

  <perch:if exists="extraImage2">
    <img src="<perch:content type="image" id="extraImage2" label="Extra Image" width="1000" height="650" crop="true" help="Image needs to be at least 1000px wide and 700px tall" />" alt="<perch:content id="prop_name" type="text" label="Property Name" />" class="extra-image" />
  </perch:if>

  <perch:if exists="extraImage3">
    <img src="<perch:content type="image" id="extraImage3" label="Extra Image" width="1000" height="650" crop="true" help="Image needs to be at least 1000px wide and 700px tall" />" alt="<perch:content id="prop_name" type="text" label="Property Name" />" class="extra-image" />
  </perch:if>

  <perch:if exists="extraImage4">
    <img src="<perch:content type="image" id="extraImage4" label="Extra Image" width="1000" height="650" crop="true" help="Image needs to be at least 1000px wide and 700px tall" />" alt="<perch:content id="prop_name" type="text" label="Property Name" />" class="extra-image" />
  </perch:if>
</section>

Location Template:

<perch:before>
    <perch:template path="content/_filter.html" />
    <div class="container filter">    
</perch:before>

    <a href="?location=<perch:content id="slug" type="slug" for="property_location" />" class="btn-solid btn">
      <perch:content id="property_location" type="text" label="Location" required="true" title="true" />
    </a>

<perch:after>
  </div>
</perch:after>
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can't use related columns in the listing, as there could be multiple related items.

Right okay. I was actually going to suggest making it possible to restrict related items to 1. As in the example above, you wouldn't have an apartment in multiple locations.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That would certainly be a good enhancement.