Forum
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>
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.
Also top part of diagnostics
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:
author template
Still receiving the error as follows in the debug message
The SQL at the end of the debug message executes fine when run as SQL in the DB
Also find below diagnostics report. I've been able to recreate this issue every time now, both locally and on my server.
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!!!