{"action":"created","issue":{"url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/1055","repository_url":"https://api.github.com/repos/anchorcms/anchor-cms","labels_url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/1055/labels{/name}","comments_url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/1055/comments","events_url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/1055/events","html_url":"https://github.com/anchorcms/anchor-cms/issues/1055","id":144583815,"number":1055,"title":"On change Page type loaded fields is empty, loosing data.","user":{"login":"Trysystems","id":12799052,"avatar_url":"https://avatars.githubusercontent.com/u/12799052?v=3","gravatar_id":"","url":"https://api.github.com/users/Trysystems","html_url":"https://github.com/Trysystems","followers_url":"https://api.github.com/users/Trysystems/followers","following_url":"https://api.github.com/users/Trysystems/following{/other_user}","gists_url":"https://api.github.com/users/Trysystems/gists{/gist_id}","starred_url":"https://api.github.com/users/Trysystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trysystems/subscriptions","organizations_url":"https://api.github.com/users/Trysystems/orgs","repos_url":"https://api.github.com/users/Trysystems/repos","events_url":"https://api.github.com/users/Trysystems/events{/privacy}","received_events_url":"https://api.github.com/users/Trysystems/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-30T13:11:07Z","updated_at":"2016-03-31T03:26:06Z","closed_at":"2016-03-31T03:26:05Z","body":"### Summary\r\n\r\nAdded selector Page type on page edit reload fields according to type. And it load empty fields. If your fields have data - its loose. \r\n\r\nSolution - change file anchor/admin/routes/admin.php on line 218 to:\r\n$vars['fields'] = Extend::fields('page', $input['id'], $input['pagetype']);\r\n\r\n### Context details (if applicable)\r\n\r\n- Anchor version: 0.12.1\r\n"},"comment":{"url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/comments/203734964","html_url":"https://github.com/anchorcms/anchor-cms/issues/1055#issuecomment-203734964","issue_url":"https://api.github.com/repos/anchorcms/anchor-cms/issues/1055","id":203734964,"user":{"login":"daviddarnes","id":1177460,"avatar_url":"https://avatars.githubusercontent.com/u/1177460?v=3","gravatar_id":"","url":"https://api.github.com/users/daviddarnes","html_url":"https://github.com/daviddarnes","followers_url":"https://api.github.com/users/daviddarnes/followers","following_url":"https://api.github.com/users/daviddarnes/following{/other_user}","gists_url":"https://api.github.com/users/daviddarnes/gists{/gist_id}","starred_url":"https://api.github.com/users/daviddarnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviddarnes/subscriptions","organizations_url":"https://api.github.com/users/daviddarnes/orgs","repos_url":"https://api.github.com/users/daviddarnes/repos","events_url":"https://api.github.com/users/daviddarnes/events{/privacy}","received_events_url":"https://api.github.com/users/daviddarnes/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T03:26:05Z","updated_at":"2016-03-31T03:26:05Z","body":"Thanks for the solution @Trysystems. Could you copy it into issue #1050 please? We're trying to stop duplicate issues."}}