{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/19753","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/19753/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/19753/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/19753/events","html_url":"https://github.com/joomla/joomla-cms/pull/19753","id":299265826,"number":19753,"title":"[com_fields] Normalize the request data to make sure there is a value for every field","user":{"login":"laoneo","id":251072,"avatar_url":"https://avatars3.githubusercontent.com/u/251072?v=4","gravatar_id":"","url":"https://api.github.com/users/laoneo","html_url":"https://github.com/laoneo","followers_url":"https://api.github.com/users/laoneo/followers","following_url":"https://api.github.com/users/laoneo/following{/other_user}","gists_url":"https://api.github.com/users/laoneo/gists{/gist_id}","starred_url":"https://api.github.com/users/laoneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laoneo/subscriptions","organizations_url":"https://api.github.com/users/laoneo/orgs","repos_url":"https://api.github.com/users/laoneo/repos","events_url":"https://api.github.com/users/laoneo/events{/privacy}","received_events_url":"https://api.github.com/users/laoneo/received_events","type":"User","site_admin":false},"labels":[{"id":60721348,"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-22T08:49:45Z","updated_at":"2018-02-22T13:25:25Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/19753","html_url":"https://github.com/joomla/joomla-cms/pull/19753","diff_url":"https://github.com/joomla/joomla-cms/pull/19753.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/19753.patch"},"body":"Pull Request for Issues like #19735 and #17801 and for PRs #18188, #17837, #18207, #19742.\r\n\r\n### Summary of Changes\r\nMakes sure that there is always a value in the array of fields which get passed to the model for saving.\r\n\r\nWhile doing this one, I think it would be safer to target it against 3.9 or even 4 and add a workaround like #18188. What I didn't want to do is to add some special conditions to normalize the request data only for custom fields in the MVC library (yes we are doing that already for associations and tags). @mbabker any thoughts?\r\n\r\n**NOTE:**\r\n_Please test is with a lot of combinations and different components, core and 3rd party. I'm pretty sure there will be side effects._\r\n\r\n### Testing Instructions\r\n- Create custom user fields.\r\n- Edit a user and fill any data in custom fields.\r\n- Add the following code to the file /administrator/components/com_content/content.php after line 16: \r\n`JFactory::getUser($USER_ID)->save();`.\r\nReplace the value $USER_ID with the user you have edited.\r\n\r\n### Expected result\r\nThe user custom field data is still saved on the user.\r\n\r\n### Actual result\r\nThe user custom fields data on the user are deleted."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/367679615","html_url":"https://github.com/joomla/joomla-cms/pull/19753#issuecomment-367679615","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/19753","id":367679615,"user":{"login":"laoneo","id":251072,"avatar_url":"https://avatars3.githubusercontent.com/u/251072?v=4","gravatar_id":"","url":"https://api.github.com/users/laoneo","html_url":"https://github.com/laoneo","followers_url":"https://api.github.com/users/laoneo/followers","following_url":"https://api.github.com/users/laoneo/following{/other_user}","gists_url":"https://api.github.com/users/laoneo/gists{/gist_id}","starred_url":"https://api.github.com/users/laoneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laoneo/subscriptions","organizations_url":"https://api.github.com/users/laoneo/orgs","repos_url":"https://api.github.com/users/laoneo/repos","events_url":"https://api.github.com/users/laoneo/events{/privacy}","received_events_url":"https://api.github.com/users/laoneo/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T13:25:25Z","updated_at":"2018-02-22T13:25:25Z","author_association":"MEMBER","body":"The target of this pr is not to fix that one. It is better to have one pr per problem instead of starting to mix things."}}
{"actor":{"display_login":"laoneo"}}