{"action":"created","issue":{"url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1300","labels_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1300/labels{/name}","comments_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1300/comments","events_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1300/events","html_url":"https://github.com/ryancramerdesign/ProcessWire/issues/1300","id":95627365,"number":1300,"title":"Sort order of pages in page field not remembered","user":{"login":"tbba","id":652879,"avatar_url":"https://avatars.githubusercontent.com/u/652879?v=3","gravatar_id":"","url":"https://api.github.com/users/tbba","html_url":"https://github.com/tbba","followers_url":"https://api.github.com/users/tbba/followers","following_url":"https://api.github.com/users/tbba/following{/other_user}","gists_url":"https://api.github.com/users/tbba/gists{/gist_id}","starred_url":"https://api.github.com/users/tbba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbba/subscriptions","organizations_url":"https://api.github.com/users/tbba/orgs","repos_url":"https://api.github.com/users/tbba/repos","events_url":"https://api.github.com/users/tbba/events{/privacy}","received_events_url":"https://api.github.com/users/tbba/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-17T10:06:20Z","updated_at":"2015-07-19T13:47:24Z","closed_at":null,"body":"Something very strange:\r\nI have 2 page fields (one is the clone of the other - so they are unique apart from the name).\r\nBoth are used on a template.\r\nThe first field DOES remember the (dragged) sort order of the pages, the second does NOT.\r\n\r\nHas anyone else have the problem too?\r\nIs this a cache problem, or corrupt indexes?\r\n\r\n---\r\nPW latest dev / php 5.6 fastcgi / Safari+Firefox\r\n"},"comment":{"url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/comments/122662645","html_url":"https://github.com/ryancramerdesign/ProcessWire/issues/1300#issuecomment-122662645","issue_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1300","id":122662645,"user":{"login":"ryancramerdesign","id":328272,"avatar_url":"https://avatars.githubusercontent.com/u/328272?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancramerdesign","html_url":"https://github.com/ryancramerdesign","followers_url":"https://api.github.com/users/ryancramerdesign/followers","following_url":"https://api.github.com/users/ryancramerdesign/following{/other_user}","gists_url":"https://api.github.com/users/ryancramerdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancramerdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancramerdesign/subscriptions","organizations_url":"https://api.github.com/users/ryancramerdesign/orgs","repos_url":"https://api.github.com/users/ryancramerdesign/repos","events_url":"https://api.github.com/users/ryancramerdesign/events{/privacy}","received_events_url":"https://api.github.com/users/ryancramerdesign/received_events","type":"User","site_admin":false},"created_at":"2015-07-19T13:47:24Z","updated_at":"2015-07-19T13:47:24Z","body":"If you need to retain a sort order, you'd only want to autojoin one of the page fields. Autojoin causes everything to be loaded in one query, and there can't be two different sorted result sets included in that query as far as I know. Though it's interesting it works on your localhost and not on the other server. There are some MySQL versions known to have issues with sorting and certain queries, and you may be hitting up against that on one server and not the other. Though I can definitely see how auto joining two Page fields in one query would pose challenges to retaining the sort order. So in either case, I would limit your autojoin to just one Page field, or simply not use Autojoin for page fields at all. There's not a major benefit in doing so. "}}