Forum

Thread tagged as: Error, Runway

Related fields not relating

Hi Drew,

Sorry to restart a thread again, but I have created a fresh install of Runway (2.8.25) to test this and I am still experiencing the previous issue of related fields not pulling through. I even followed the example on the Perch blog and used the out of the box article template and created an author template, that is the same as yours.

The debug message is also showing the same error as before: Form not posted or did not validate I am getting no console errors and the Appreciate any help you can provide on this as it is proving a real road block at the moment, it seems to me there is a bug in the relationship field code?
I can add my diagnostics although these won't differ much from when I previously posted about this issue a week ago.

It's not ideal but could I workaround this using a dataselect and pulling in from a region as you would in Perch?

Many thanks


Debug Message [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='df5e9efa4f271d7ae9bca38899776166' LIMIT 1 UPDATE perch2_users SET userHash='7b4eaf9ad91730330889821d7ac95db9' WHERE userID='1' [26] SELECT p.privKey FROM perch2_user_privileges p [12] SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID [nil] SELECT collectionID, collectionKey, collectionEditRoles FROM perch2_collections WHERE collectionInAppMenu=1 ORDER BY collectionOrder ASC [1] SELECT * FROM perch2_collections WHERE collectionID=1 LIMIT 1 [1] SELECT ci.*, r.itemOrder, IF(r.itemLatestRev>r.itemRev,1,0) AS _has_draft FROM perch2_collection_items ci, perch2_collection_revisions r WHERE r.itemID=ci.itemID AND ci.collectionID='1' AND ci.itemRev=r.itemLatestRev AND ci.itemID=1 ORDER BY r.itemOrder ASC [1] SELECT * FROM perch2_collection_items ci, perch2_collection_revisions r WHERE r.itemID=ci.itemID AND ci.collectionID='1' AND ci.itemRev=r.itemRev AND ci.itemID=1 [1] SELECT * FROM perch2_collection_items ci, perch2_collection_revisions r WHERE r.itemID=ci.itemID AND ci.collectionID='1' AND ci.itemRev=r.itemRev AND r.itemOrder > '1000' ORDER BY r.itemOrder LIMIT 1 [1] SELECT * FROM perch2_collection_items ci, perch2_collection_revisions r WHERE r.itemID=ci.itemID AND ci.collectionID='1' AND ci.itemRev=r.itemRev AND r.itemOrder < '1000' ORDER BY r.itemOrder DESC LIMIT 1 Using template: \templates\content\article.html Form not posted or did not validate [1] SELECT itemRev, itemLatestRev FROM perch2_collection_revisions WHERE collectionID=1 AND itemID=1 LIMIT 1 [1] SELECT * FROM perch2_collections WHERE collectionKey='Authors' LIMIT 1 [2] SELECT * FROM perch2_collection_items ci, perch2_collection_revisions r WHERE r.itemID=ci.itemID AND ci.collectionID='2' AND ci.itemRev=r.itemRev ORDER BY r.itemOrder ASC Queries: 14 Memory: 5.6506

as you can see the output of the field in the admin area is empty:

<div class="field "><div class="fieldtbl"><div class="fieldlbl"><label for="perch_1_author" class="">Author</label></div><div class="field-wrap"><select id="perch_1_author[]" name="perch_1_author[]" class="categories" multiple="multiple" style="display: none;"><option value="2"></option><option value="3"></option></select><div class="chosen-container chosen-container-multi" style="width: 290px;" title="" id="perch_1_author___chosen"><ul class="chosen-choices"><li class="search-field"><input type="text" value="Select Some Options" class="default" autocomplete="off" style="width: 149px;"></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div></div></div></div></div>

Lee Goodman

Lee Goodman 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please add your Diagnostics and your template code (even if you believe it to be the same as an example). You should always post these for the fastest response even if you believe we have already seen them.

Otherwise you are asking us to go hunting for them which is likely to put your request behind others where we can just see the information in front of us :)

Hi Rachel,

Please find diagnostics output below. This is a fresh install of Runway ( I have a Runway developer license, that I use as a test ground). I am yet to get the related fields functionality working. I am running Windows with a WAMP environment, although as per my previous post I experienced the same issue on an Ubuntu server, however in that scenario it did start off life on my local windows environment.

Diagnostics report
PERCH INFORMATION

Perch Runway: 2.8.25
Production mode: Production (100)
Installed apps: content (2.8.25), assets (2.8.25), categories (2.8.25)
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 (20), perch2_collection_items (6), perch2_collection_revisions (3), perch2_collections (2), perch2_content_index (0), perch2_content_items (0), perch2_content_regions (2), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_routes (0), perch2_page_templates (4), perch2_pages (3), perch2_resource_log (0), perch2_resource_tags (0), perch2_resources (0), perch2_resources_to_tags (0), perch2_settings (12), perch2_user_passwords (0), perch2_user_privileges (26), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (1)
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
    );
Editor plug-ins: markitup
H1: dc8c63cb7052b650fbce08886034e3b2
L1: 2b7bc4553ad524ae2e673a88102dd77e
F1: dc1fef2ad0fcd9f943c02ebb43d85dbc
headerColour: rgb(54,54,54)
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.25: done
headerScheme: dark
update_runway_2.8.25: done
latest_version: 2.8.15
on_sale_version: 2.8.25
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: C:\wamp\www\prototype.runway\perch\setup\runway\modes
PERCH_SCHEDULE_SECRET: spym5NI4hy4XgF1V
PERCH_DB_USERNAME: runwayadmin
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: runway
PERCH_DB_PREFIX: perch2_
PERCH_EMAIL_FROM: lee@getunified.co.uk
PERCH_EMAIL_FROM_NAME: Lee Goodman
PERCH_LOGINPATH: /perch
PERCH_PATH: C:\wamp\www\prototype.runway\perch
PERCH_CORE: C:\wamp\www\prototype.runway\perch\core
PERCH_RESFILEPATH: C:\wamp\www\prototype.runway\perch\resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_DEBUG: 1
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_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: C:\wamp\www\prototype.runway\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_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.4.12
Zend: 2.4.0
OS: WINNT
SAPI: apache2handler
Safe mode: not detected
MySQL client: mysqlnd 5.0.10 - 20111026 - $Id: e707c415db32080b3752b232487a435ee0372157 $
MySQL server: 5.6.12-log
Free disk space: 546.77 GB
Extensions: Core, bcmath, calendar, com_dotnet, ctype, date, ereg, filter, ftp, hash, iconv, json, mcrypt, SPL, odbc, pcre, Reflection, session, standard, mysqlnd, tokenizer, zip, zlib, libxml, dom, PDO, openssl, SimpleXML, wddx, xml, xmlreader, xmlwriter, apache2handler, curl, fileinfo, gd, intl, mbstring, mysql, mysqli, Phar, pdo_mysql, pdo_sqlite, mhash, xdebug
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
HTTP_HOST: prototype.runway
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36
HTTP_REFERER: https://prototype.runway/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-GB,en-US;q=0.8,en;q=0.6
HTTP_COOKIE: cmsa=1; PHPSESSID=2m11258i4k859o6co2qh3uoaf2
PATH: C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files (x86)\Skype\Phone\;
SystemRoot: C:\WINDOWS
COMSPEC: C:\WINDOWS\system32\cmd.exe
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR: C:\WINDOWS
SERVER_SOFTWARE: Apache/2.4.4 (Win64) PHP/5.4.12
SERVER_NAME: prototype.runway
SERVER_ADDR: 127.0.0.1
SERVER_PORT: 80
REMOTE_ADDR: 127.0.0.1
DOCUMENT_ROOT: c:/wamp/www/prototype.runway
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: c:/wamp/www/prototype.runway
SERVER_ADMIN: admin@example.com
SCRIPT_FILENAME: C:/wamp/www/prototype.runway/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 2890
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: 1454923682.256
REQUEST_TIME: 1454923682


Also top part of diagnostics


HEALTH CHECK Setup folder is present and should be deleted Perch Runway is up to date PHP 5.4.12 version is okay, but a little out of date. Consider updating soon. MySQL 5.6.12-log is up to date Image processing available Temp folder is not writable. Check the path to your temp folder in your runway.php file and check permissions are set for PHP to write to it.

Hi Rachael / Drew,

Just to let you know I have tried this by creating a new install directly on the server (i.e not on a Windows WAMP environment), as I just wanted to rule out any pathing issue in Windows. Exactly the same issue occurs, again this is a clean install with only two collections created (articles and authors)

article template:


<h2><perch:content id="heading" type="text" label="Heading" required="true" title="true" /></h2> <p class="date"><perch:content id="date" type="date" label="Date" format="%d %B %Y" required="true" /></p> <perch:content id="body" type="textarea" label="Body" markdown="true" editor="markitup" required="true" /> <p class="vcard"> &copy; <perch:content id="date" type="date" label="Date" format="Y" /> </p> <perch:related id="author" collection="Authors" label="Author"> <p> <a href="/authors/<perch:content id="slug" type="slug" />"> <perch:content id="firstname" /> <perch:content id="lastname" /> </a> </p> </perch:related> <perch:after> <perch:if exists="paging"> <div class="paging"> Page <perch:content id="current_page" type="hidden" /> of <perch:content id="number_of_pages" type="hidden" /> <perch:if exists="not_first_page"> <a href="<perch:content id="prev_url" type="hidden" encode="false" />">Previous</a> </perch:if> <perch:if exists="not_last_page"> <a href="<perch:content id="next_url" type="hidden" encode="false" />">Next</a> </perch:if> </div> </perch:if> </perch:after>

author template


<perch:content id="firstname" type="text" label="First Name" /> <perch:content id="lastname" type="text" label="Last Name"/> <perch:content id="slug" type="slug" for="firstname lastname" editable="true" indelible="true" label="slug" />

Still receiving the error as follows in the debug message

Using template: /templates/content/article.html
Form not posted or did not validate

The SQL at the end of the debug message executes fine when run as SQL in the DB

SELECT * FROM perch2_collection_items ci, perch2_collection_revisions r WHERE r.itemID=ci.itemID AND ci.collectionID='2' AND ci.itemRev=r.itemRev ORDER BY r.itemOrder ASC

Also find below diagnostics report. I've been able to recreate this issue every time now, both locally and on my server.

PERCH INFORMATION

Perch Runway: 2.8.25
Production mode: Production (100)
Installed apps: content (2.8.25), assets (2.8.25), categories (2.8.25)
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 (24), perch2_collection_items (7), perch2_collection_revisions (3), perch2_collections (2), perch2_content_index (0), perch2_content_items (0), perch2_content_regions (0), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_routes (0), perch2_page_templates (4), perch2_pages (3), perch2_resource_log (0), perch2_resource_tags (0), perch2_resources (0), perch2_resources_to_tags (0), perch2_settings (12), perch2_user_passwords (0), perch2_user_privileges (26), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (1)
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
    );
Editor plug-ins: markitup
H1: 2e6ba254ce2dc2b62d87fe88b79a3013
L1: 2b7bc4553ad524ae2e673a88102dd77e
F1: dc1fef2ad0fcd9f943c02ebb43d85dbc
headerColour: rgb(54,54,54)
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.8.25: done
headerScheme: dark
update_runway_2.8.25: done
latest_version: 2.8.15
on_sale_version: 2.8.25
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /var/www/runway
PERCH_SCHEDULE_SECRET: x1qdUHVU6yZdbpbf
PERCH_DB_USERNAME: runwayadmin
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: runway
PERCH_DB_PREFIX: perch2_
PERCH_EMAIL_FROM: lee@getunified.co.uk
PERCH_EMAIL_FROM_NAME: Lee Goodman
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/runway/perch
PERCH_CORE: /var/www/runway/perch/core
PERCH_RESFILEPATH: /var/www/runway/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_DEBUG: 1
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_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/runway/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_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.5.9-1ubuntu4.9
Zend: 2.5.0
OS: Linux
SAPI: apache2handler
Safe mode: not detected
MySQL client: 5.5.43
MySQL server: 5.5.37-0ubuntu0.14.04.1
Free disk space: 23.80 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, SPL, iconv, mbstring, session, posix, Reflection, standard, shmop, SimpleXML, soap, sockets, Phar, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, apache2handler, PDO, curl, gd, json, mysql, mysqli, pdo_mysql, readline, ssh2, mhash, Zend OPcache
GD: Yes
ImageMagick: No
PHP max upload size: 20M
PHP max form post size: 8M
PHP memory limit: 128M
Total max uploadable file size: 8M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
HTTP_HOST: runway.getunified.co.uk
HTTP_CONNECTION: keep-alive
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36
HTTP_REFERER: https://runway.getunified.co.uk/perch/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-GB,en-US;q=0.8,en;q=0.6
HTTP_COOKIE: _ga=GA1.3.1147874007.1452591784; cmsa=1; PHPSESSID=ljrk6h81vo8gh7oo0em3e4a1a1
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE: <address>Apache/2.4.7 (Ubuntu) Server at runway.getunified.co.uk Port 80</address>
SERVER_SOFTWARE: Apache/2.4.7 (Ubuntu)
SERVER_NAME: runway.getunified.co.uk
SERVER_ADDR: 146.185.150.252
SERVER_PORT: 80
REMOTE_ADDR: 94.3.150.6
DOCUMENT_ROOT: /var/www/runway
REQUEST_SCHEME: http
CONTEXT_DOCUMENT_ROOT: /var/www/runway
SERVER_ADMIN: [no address given]
SCRIPT_FILENAME: /var/www/runway/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 5828
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: 1454929158.284
REQUEST_TIME: 1454929158

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think you need to set title="true" on one or more fields in your Author template. If the items don't have a title they can't be displayed. Once you've set that, click save on an item to assign its title and see if it then shows up.

Face plant in desk!! :-)

even says it on the documentation:

Note: When displaying the edit field, Perch uses the title of the related item. Make sure that the collection uses title="true" on one or more fields.

Thanks Drew

Bloody users!!!