{"action":"closed","issue":{"url":"https://api.github.com/repos/laravel-enso/Enso/issues/50","repository_url":"https://api.github.com/repos/laravel-enso/Enso","labels_url":"https://api.github.com/repos/laravel-enso/Enso/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/laravel-enso/Enso/issues/50/comments","events_url":"https://api.github.com/repos/laravel-enso/Enso/issues/50/events","html_url":"https://github.com/laravel-enso/Enso/issues/50","id":299510963,"number":50,"title":"Updating JSON field in Postgresql, user's preferences","user":{"login":"pongraczi","id":5891983,"avatar_url":"https://avatars2.githubusercontent.com/u/5891983?v=4","gravatar_id":"","url":"https://api.github.com/users/pongraczi","html_url":"https://github.com/pongraczi","followers_url":"https://api.github.com/users/pongraczi/followers","following_url":"https://api.github.com/users/pongraczi/following{/other_user}","gists_url":"https://api.github.com/users/pongraczi/gists{/gist_id}","starred_url":"https://api.github.com/users/pongraczi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pongraczi/subscriptions","organizations_url":"https://api.github.com/users/pongraczi/orgs","repos_url":"https://api.github.com/users/pongraczi/repos","events_url":"https://api.github.com/users/pongraczi/events{/privacy}","received_events_url":"https://api.github.com/users/pongraczi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-02-22T21:16:13Z","updated_at":"2018-05-08T13:14:16Z","closed_at":"2018-05-08T13:14:16Z","author_association":"NONE","body":"#### Problem\r\nCannot update json field due to syntax error. Specifically when user wants to change the language. Details below.\r\n\r\n#### Tools\r\n* Enso 2.1.30  \r\n* PGSql 9.6  \r\n* PHP 7.2\r\n\r\n#### Steps to reproduce:  \r\n* Updating language settings to a new one (English -> whatever)\r\n* Check the debug console\r\n\r\n#### Problematic sql query:  \r\nupdate \"preferences\" set \"value\"->'global'->>'lang' = hu, \"updated_at\" = 2018-02-22 21:54:50  where \"preferences\".\"user_id\" = 1  and \"preferences\".\"user_id\" is not null\r\n\r\n![kijeloles_657](https://user-images.githubusercontent.com/5891983/36564460-aca2401a-181d-11e8-8e79-9ce2a81a2873.png)\r\n"}}
{"actor":{"display_login":"aocneanu"}}