{"action":"created","issue":{"url":"https://api.github.com/repos/thirtybees/thirtybees/issues/786","repository_url":"https://api.github.com/repos/thirtybees/thirtybees","labels_url":"https://api.github.com/repos/thirtybees/thirtybees/issues/786/labels{/name}","comments_url":"https://api.github.com/repos/thirtybees/thirtybees/issues/786/comments","events_url":"https://api.github.com/repos/thirtybees/thirtybees/issues/786/events","html_url":"https://github.com/thirtybees/thirtybees/issues/786","id":384373820,"node_id":"MDU6SXNzdWUzODQzNzM4MjA=","number":786,"title":"id_lang field in ObjectModel contains array value","user":{"login":"getdatakick","id":34651851,"node_id":"MDQ6VXNlcjM0NjUxODUx","avatar_url":"https://avatars0.githubusercontent.com/u/34651851?v=4","gravatar_id":"","url":"https://api.github.com/users/getdatakick","html_url":"https://github.com/getdatakick","followers_url":"https://api.github.com/users/getdatakick/followers","following_url":"https://api.github.com/users/getdatakick/following{/other_user}","gists_url":"https://api.github.com/users/getdatakick/gists{/gist_id}","starred_url":"https://api.github.com/users/getdatakick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getdatakick/subscriptions","organizations_url":"https://api.github.com/users/getdatakick/orgs","repos_url":"https://api.github.com/users/getdatakick/repos","events_url":"https://api.github.com/users/getdatakick/events{/privacy}","received_events_url":"https://api.github.com/users/getdatakick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-26T15:10:59Z","updated_at":"2018-11-26T17:31:20Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"ObjectModel class contains `id_lang` field that should either be set to **null**, or to numerical value for specific language id. That's how it always was in ps16. \r\n\r\nCommit a01052733016a11f28c8f20279f87e65fee18909 changed visibility of this field from protected to public. This had unfortunate side effect - when loading translatable fields from database, id_lang field now passes [property_exists condition](https://github.com/thirtybees/thirtybees/blob/13fe22712bf43d0a912cb16fb2625e80740a8f5e/Adapter/Adapter_EntityMapper.php#L89), and therefore is loaded and treated as a translatable field. It can now be array map from number -> number.\r\n\r\nFor example\r\n```\r\n$idLang = (new Country(1))->id_lang; \r\n``` \r\nresolves to `null` on ps16. In thirtybees, the same code resolves to ```array(1 => 1, 2 => 2)```\r\n\r\nThis issue was discovered later, but it was not fixed properly -- see commit 5ef997fa9cebcb9570e17c527d192ba442250924. That fix only masked the problem, but the issue is still there and causes errors elsewhere. \r\n\r\nNote: this problem is a root cause for a compatibility issue raised in this [forum thread](https://forum.thirtybees.com/topic/2289/think-we-will-have-to-leave-thirty-bees-no-avanced-seach-4-compatability)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/thirtybees/thirtybees/issues/comments/441726568","html_url":"https://github.com/thirtybees/thirtybees/issues/786#issuecomment-441726568","issue_url":"https://api.github.com/repos/thirtybees/thirtybees/issues/786","id":441726568,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTcyNjU2OA==","user":{"login":"Traumflug","id":318581,"node_id":"MDQ6VXNlcjMxODU4MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/318581?v=4","gravatar_id":"","url":"https://api.github.com/users/Traumflug","html_url":"https://github.com/Traumflug","followers_url":"https://api.github.com/users/Traumflug/followers","following_url":"https://api.github.com/users/Traumflug/following{/other_user}","gists_url":"https://api.github.com/users/Traumflug/gists{/gist_id}","starred_url":"https://api.github.com/users/Traumflug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Traumflug/subscriptions","organizations_url":"https://api.github.com/users/Traumflug/orgs","repos_url":"https://api.github.com/users/Traumflug/repos","events_url":"https://api.github.com/users/Traumflug/events{/privacy}","received_events_url":"https://api.github.com/users/Traumflug/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T17:31:20Z","updated_at":"2018-11-26T17:31:20Z","author_association":"COLLABORATOR","body":"Thanks for the explanation. Picture gets clearer now."}}
{"actor":{"display_login":"Traumflug"}}