{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/11322","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11322/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11322/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11322/events","html_url":"https://github.com/joomla/joomla-cms/pull/11322","id":167980486,"number":11322,"title":"[com_config] Use type=\"number\" fields for com_config servers port fields","user":{"login":"andrepereiradasilva","id":9630530,"avatar_url":"https://avatars.githubusercontent.com/u/9630530?v=3","gravatar_id":"","url":"https://api.github.com/users/andrepereiradasilva","html_url":"https://github.com/andrepereiradasilva","followers_url":"https://api.github.com/users/andrepereiradasilva/followers","following_url":"https://api.github.com/users/andrepereiradasilva/following{/other_user}","gists_url":"https://api.github.com/users/andrepereiradasilva/gists{/gist_id}","starred_url":"https://api.github.com/users/andrepereiradasilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrepereiradasilva/subscriptions","organizations_url":"https://api.github.com/users/andrepereiradasilva/orgs","repos_url":"https://api.github.com/users/andrepereiradasilva/repos","events_url":"https://api.github.com/users/andrepereiradasilva/events{/privacy}","received_events_url":"https://api.github.com/users/andrepereiradasilva/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":23,"created_at":"2016-07-27T23:30:49Z","updated_at":"2016-11-08T14:47:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11322","html_url":"https://github.com/joomla/joomla-cms/pull/11322","diff_url":"https://github.com/joomla/joomla-cms/pull/11322.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/11322.patch"},"body":"#### Summary of Changes\n\nUse type=\"number\" for com_config servers port fields.\nAlso add default values, hints and a range from 1 to 65536.\n\nBefore\n![image](https://cloud.githubusercontent.com/assets/9630530/17196083/ee455374-5459-11e6-8b21-2b7d055c6d08.png)\n\nAfter\n![image](https://cloud.githubusercontent.com/assets/9630530/17196116/269a26d2-545a-11e6-9b11-45a9f2fd11cd.png)\n#### Testing Instructions\n1. Apply patch\n2. Check all the port fields in global config\n3. Save config\n4. Repeat step 2 and check all is fine\n5. Code review. \n\nNote: I added some default values for ftp_port and proxy_port port fields (didn't have default), please check also if that causes no trouble. Also now when removing the port and saving it goes back to the default port.\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/259155483","html_url":"https://github.com/joomla/joomla-cms/pull/11322#issuecomment-259155483","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11322","id":259155483,"user":{"login":"jo-sf","id":8342125,"avatar_url":"https://avatars.githubusercontent.com/u/8342125?v=3","gravatar_id":"","url":"https://api.github.com/users/jo-sf","html_url":"https://github.com/jo-sf","followers_url":"https://api.github.com/users/jo-sf/followers","following_url":"https://api.github.com/users/jo-sf/following{/other_user}","gists_url":"https://api.github.com/users/jo-sf/gists{/gist_id}","starred_url":"https://api.github.com/users/jo-sf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jo-sf/subscriptions","organizations_url":"https://api.github.com/users/jo-sf/orgs","repos_url":"https://api.github.com/users/jo-sf/repos","events_url":"https://api.github.com/users/jo-sf/events{/privacy}","received_events_url":"https://api.github.com/users/jo-sf/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T14:47:29Z","updated_at":"2016-11-08T14:47:29Z","body":"@Luchen6 \nRegarding the difference you encountered in the behaviour of the fields ftp_port and smtpport: if you fill in e.g. the default value \"25\" in the smtpport field and leave the ftp_port field empty the latter will nevertheless be filled with the default value \"21\" (please check in the configuration.php file). This is a change in behaviour compared to the previous implementation, and if you want to have the ftp_port field empty in the configuration file if you didn't enter a number in that field then please check PR #11492.\n\nWhen testing both this PR (#11322) and then the PR #11492 must be applied, moreover it's necessary to modify the file ```administrator/components/com_config/model/form/application.xml``` (remove the line ```default=21``` from the ftp_port field definition). For more details please see the testing instructions for #11492.\n\nIn general it should be decided I think whether numeric fields that are not required should have a default value (they should however have a hint with the usual default value if that value is unambiguous). In cases where more than one such value is possible or well-known (as is the case with the proxy_port field) the information about typical values should be given in the field description and neither a default value nor a hint value should be set.\n\nAnd even for the smtpport field I suggest that it should be discussed whether this field is really required. The default value for the SMTP port depends upon the SMTP security method chosen (the default ports are given in the field description). So maybe even this field should stay empty if the default SMTP port shall be used, and the method ```useSmtp``` (in ```libraries/joomla/mail/mail.php```) should evaluate the port to be used depending upon the SMTP security method given if no port ist given.<hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"https://issues.joomla.org/tracker/joomla-cms/11322\">issues.joomla.org/tracker/joomla-cms/11322</a>.</sub>"}}
{"actor":{"display_login":"jo-sf"}}