User tests: Successful: Unsuccessful:
…al for fields.
Operation of Joomla in the configuration mode "Error messages: Maximum".
Displays error messages about missing XML attributes for fields.
But the absence of these fields is acceptable for Joomla fields to work.
No error message should be displayed for optional attributes for Joomla in the "Error Messages: Maximum" mode, because the attributes are additional.
On the other hand, these error messages do not inform the administrator about the error, from these messages it is not at all clear what field we are talking about, what attribute we are talking about, and what the error is in general.
Messages appear when there is no Label attribute, or there is no Name attribute.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
It would be helpful to have a specific example of where this error appears - better test instructions. Just reading the diff leaves too much to do for a tester.
The error messages can always be improved but it is not correct to change the code because a manadatory field is missing and you dont want to see an error message
From the documentation
- name (mandatory) is the unique name of the parameter.
- type (mandatory) must be field type.
- label (mandatory) (translatable) is the descriptive title of the field.
@ceford
For the SPACER
field type, the LABEL
attribute is optional. And the Form Field class in question is the base inherited class. This means that there is no error in my corrections.
What you are doing here is to make name in some way an optional parameter. I agree that the error message can be better, but your way is wrong. What could be usefull is a checkField function, that checks is all necessary values are set. But this is a big task, because of the flexibility of the form class. Closing this.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-15 15:44:52 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
The error messages can always be improved but it is not correct to change the code because a manadatory field is missing and you dont want to see an error message
From the documentation