? Pending

User tests: Successful: Unsuccessful:

avatar korenevskiy
korenevskiy
14 Mar 2021

…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.

img-2021-03-14-23-54-21

avatar korenevskiy korenevskiy - open - 14 Mar 2021
avatar korenevskiy korenevskiy - change - 14 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Mar 2021
Category Libraries
avatar brianteeman
brianteeman - comment - 14 Mar 2021

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.
avatar ceford
ceford - comment - 15 Mar 2021

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.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32693.

avatar brianteeman
brianteeman - comment - 15 Mar 2021

@ceford This PR is plain wrong. The label and name are mandatory fields for very good reasons and therefore it is correct that an error is displayed. This PR seeks to ignore that and to remove the display of the error

avatar korenevskiy
korenevskiy - comment - 15 Mar 2021

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.

avatar rdeutz
rdeutz - comment - 15 Mar 2021

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.

avatar rdeutz rdeutz - change - 15 Mar 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-03-15 15:44:52
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 15 Mar 2021

Add a Comment

Login with GitHub to post a comment