bwakad Posted September 8, 2014 Share Posted September 8, 2014 That was funny, I took quite some time to debug this, but finally I knew what was wrong... On two pages I got an error like the text below. Specifically telling me the sort order... Error: Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'pages.children' in 'order clause' (in C:\xampp\htdocs\mysite\wire\core\DatabaseQuery.php line 91) First I thought, must be because because I did not have pages containing this value. But it was never like that with PW. It would simply not let me see it if not found - it's the ease of PW! So then I deleted those pages, added new ones, no solution. Looked in the DB - nothing strange there... Looked at my selectors - nothing is wrong... What was the trouble??? Answer: reserved words! I had a parent page named "household", with you can guess it: a child named "children" and "parents". stupid stupid stupid. lol I guess I have to check my page names carefully: because a pages->find "parents" or "children" works as string, just not on the sort... in a DB action... - edit - so this was the problem : 1. goal: I want to sort on field value 2. goal: looking for template = member-profile 3. goal: using browse template for this 4. I am actually on the pages (using browse) which are used as a field value for member-profile pages... 5. assuming I am on /browse/household/children/ THIS $pages->find = " template=member-profile, {$page->parent->name} = {$page->name} " READ $pages->find = " template=member-profile, household = children " sort = "{$page->name}" // gives error - apparantly translates to sort on children(). I can't sort on children() pages I did not request. but here's the thing .... 5b. assuming I am on /browse/household/roomies/ sort = "{$page->name}" // gives no error - it translates to sort on roomies. And will work ... ????? 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now