User tests: Successful: Unsuccessful:
Currently you can enter nearly everything into the TCP port configuration fields both in the global configuration and the configuration for the LDAP authentication plugin. These fields should accept only valid numbers in the range of 1 through 65535, they should have a reasonable default value if applicable and it should be possible to leave them empty if they are not required.
Initially this PR was an add-on PR for PR #11322 but since that other PR was closed in the meantime and the author suggested that someone else might continue I merged the changes from PR #11322 into this PR and added the configuration for the LDAP authentication plugin since it also contains a TCP port field.
Status Quo
Change
Currently most fields that shall accept only numeric values are defined as follows:
<field
name="..."
type="text"
label="..."
description="..."
default="..."
filter="integer"
size="5"
/>
The "default" attribute might be missing if it is not appropriate for a field, the filter type given is sometimes "string" instead of "integer" and the "size" attribute sometimes has other values, e.g. "8".
When converting such a field into a truly numeric field (a field where the browser knows that it is numeric) one of the two following formats should be used.
Format (a) with a default value:
<field
name="..."
type="number"
label="..."
description="..."
min="1"
max="65535"
default="..."
validate="number"
filter="integer"
size="5"
/>
Format (b) without a default value, instead with a hint:
<field
name="..."
type="number"
label="..."
description="..."
min="1"
max="65535"
hint="..."
validate="number"
filter="integer"
size="5"
/>
Note that the "min" and "max" attributes are set in both formats appropriately for TCP port fields, change them as necessary for other purposes or remove either of them if not needed.
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | Libraries | ⇒ | Libraries Unit Tests |
Labels |
Added:
?
|
Category | Libraries Unit Tests | ⇒ | Layout Libraries Unit Tests |
I have tested this item
Part "Status Quo": #11322: No Matching Results
in Patchtester
With and without Patch Field FTP-Port
is empty in global configuration
and configuration.php
. If Field is filled by 21
it's shown in both Places.
@franz-wohlkoenig @zero-24 I will resolve the merge conflicts asap and then I'll look for another test case since the test instructions given above will no longer work due to PR #11322 having been closed some days ago. My patch should work regardless of #11322 btw. As soon as both tasks (merging and finding a new test case) are complete I'll come back. Hope that's OK.
Category | Libraries Unit Tests Layout | ⇒ | Administration com_config Layout Libraries Front End Plugins Unit Tests |
@franz-wohlkoenig @zero-24 I searched for any other form field where this PR might be tested with but there seems to be none within Joomla.
Due to that and because the intention for PR #11322 is IMO good (help administrators in setting up a Joomla installation and try to prevent human errors as much as possible) I copied @andrepereiradasilva 's changes to my PR (hope that's OK @andrepereiradasilva ?). I also found another configuration form where a TCP port is to be configured (LDAP authentication plugin) and I changed that as well.
In checking and changing both XML files I tried to use the same layout (style) for all field definitions even if that resulted in more changed lines than absolutely necessary. It this is not desired I can undo this and only leave the changed field definitions.
@franz-wohlkoenig I don't think you want to merge my PR with the staging code without any successful human test... due to that I assume that someone or better two or more people should test this PR prior to deciding whether it should be merged with the staging code.
Title |
|
@franz-wohlkoenig yes please test with the latest nightly, and I hope it will work without problems.
I have tested this item
I have tested this item
There is no hint default value for the LDAP Plugin port and SMTP Port if that is fixed. (Should be just the hint
attribute in the XML) this is read to merge.
Great work!
@zero-24 I added the hint attribute both to the LDAP port and the SMTP port fields.
My suggestion was however (see the recipe for defining numeric fields above) to have either the default or the hint attribute with numeric fields. The idea behind this was that the most common value is used as the default value and that the typical values for this field should be described in the field's description visible if you hover the field name. Both for the LDAP and the SMTP port fields there is no single typical value but the value to use depends upon other settings like the secure SMTP setting (ports can be 25, 465 or 587) or secure LDAP communication via TLS (ports can be 389 for unsecure communication and 636 for TLS secured communication).
Maybe the LDAP port field description should be changed accordingly as is already the case for the SMTP port field description. Currently the LDAP port field description only states that the default port is 389.
I have tested this item
Milestone |
Added: |
||
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
RTC as after the successful test just cosmetical changes was made. Thanks!
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-01-22 14:58:57 |
Closed_By | ⇒ | wilsonge | |
Labels |
Merged - thanks!
I have tested this item✅ successfully on e34a81e
Tested this successfully according to the instructions.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/11492.