{"action":"created","issue":{"url":"https://api.github.com/repos/rainlab/translate-plugin/issues/182","repository_url":"https://api.github.com/repos/rainlab/translate-plugin","labels_url":"https://api.github.com/repos/rainlab/translate-plugin/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/rainlab/translate-plugin/issues/182/comments","events_url":"https://api.github.com/repos/rainlab/translate-plugin/issues/182/events","html_url":"https://github.com/rainlab/translate-plugin/issues/182","id":186498313,"number":182,"title":" ML Repeater throws error @edit view (might be local cache)","user":{"login":"CptMeatball","id":1681727,"avatar_url":"https://avatars.githubusercontent.com/u/1681727?v=3","gravatar_id":"","url":"https://api.github.com/users/CptMeatball","html_url":"https://github.com/CptMeatball","followers_url":"https://api.github.com/users/CptMeatball/followers","following_url":"https://api.github.com/users/CptMeatball/following{/other_user}","gists_url":"https://api.github.com/users/CptMeatball/gists{/gist_id}","starred_url":"https://api.github.com/users/CptMeatball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CptMeatball/subscriptions","organizations_url":"https://api.github.com/users/CptMeatball/orgs","repos_url":"https://api.github.com/users/CptMeatball/repos","events_url":"https://api.github.com/users/CptMeatball/events{/privacy}","received_events_url":"https://api.github.com/users/CptMeatball/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-01T10:05:47Z","updated_at":"2016-11-05T22:27:12Z","closed_at":"2016-11-05T22:27:12Z","body":"## Update: Looks to be a local cache error concerning the `$jsonable` array inside the model. If I encounter this problem again I'll update this thread.\r\n\r\nTranslate Version: 1.2.5\r\nCMS Build: 377\r\n\r\nWhen developing a custom plugin which uses the multi language implementation of the Repeater form-widget,  I ran into the following error when *updating* a record through the controller:\r\n\r\n\r\n\r\n![screen shot 2016-11-01 at 10 52 53](https://cloud.githubusercontent.com/assets/1681727/19885919/852bdc00-a021-11e6-9994-9a45d76743fc.png)\r\n\r\nModel:\r\n![screen shot 2016-11-01 at 10 54 50](https://cloud.githubusercontent.com/assets/1681727/19885943/ad7ae0f2-a021-11e6-8778-c7e9f5d3213c.png)\r\n\r\nfields.yaml:\r\n![screen shot 2016-11-01 at 10 56 29](https://cloud.githubusercontent.com/assets/1681727/19885983/e16ece50-a021-11e6-8143-2c0f8b38ab16.png)\r\n\r\nDatabase record plugin-model for `details` repeater field:\r\n```\r\n{\"1\":{\"detail\":\"Detail Language 1\"},\"2\":{\"detail\":\"Detail Language 1 #2\"}}\r\n\r\n```\r\n\r\nDatabase record rainlab_translate_attributes for corresponding plugin model:\r\n```\r\n{\"title\":\"\",\"slug\":\"\",\"details\":{\"1\":{\"detail\":\"Detail Language 2\"},\"2\":{\"detail\":\"Detail Language 2 #2\"}},\"eyecatchers\":null,\"description\":\"\",\"layout\":\"\",\"location\":\"\"}\r\n\r\n```\r\n\r\n\r\n**Notes:**\r\n- When removing the two repeater fields from `$translatable` the interface works as intended. But without ML functionality.\r\n- The data is included in the component-model-view. So it is successfully saved."},"comment":{"url":"https://api.github.com/repos/rainlab/translate-plugin/issues/comments/258646554","html_url":"https://github.com/rainlab/translate-plugin/issues/182#issuecomment-258646554","issue_url":"https://api.github.com/repos/rainlab/translate-plugin/issues/182","id":258646554,"user":{"login":"daftspunk","id":1392869,"avatar_url":"https://avatars.githubusercontent.com/u/1392869?v=3","gravatar_id":"","url":"https://api.github.com/users/daftspunk","html_url":"https://github.com/daftspunk","followers_url":"https://api.github.com/users/daftspunk/followers","following_url":"https://api.github.com/users/daftspunk/following{/other_user}","gists_url":"https://api.github.com/users/daftspunk/gists{/gist_id}","starred_url":"https://api.github.com/users/daftspunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daftspunk/subscriptions","organizations_url":"https://api.github.com/users/daftspunk/orgs","repos_url":"https://api.github.com/users/daftspunk/repos","events_url":"https://api.github.com/users/daftspunk/events{/privacy}","received_events_url":"https://api.github.com/users/daftspunk/received_events","type":"User","site_admin":false},"created_at":"2016-11-05T22:27:12Z","updated_at":"2016-11-05T22:27:12Z","body":"This error is caused by an array value being passed to the translator without being declared as jsonable. There was a recent change made to force all `repeater` based fields in to this behavior.\r\n\r\nI am confident this will fix it: https://github.com/rainlab/translate-plugin/commit/735a1b1ce0a1851094ea5f2c95fa4fe9b79cc4ce#diff-b38721aefb76699ef28a2f1abf7b5207R195\r\n\r\nOtherwise please comment saying so and we will re-open this issue."}}
{"actor":{"display_login":"daftspunk"}}