User tests: Successful: Unsuccessful:
Pull Request for Issue #16568.
The form fields must end with Field
in J4.
The select box is filled.
A Javascript error is thrown and the select box to change the category is empty.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_categories com_content Libraries |
Why is that suddently needed? Afair the fields were working fine about a week ago. What about all the other formfields? Do they need a namechange as well?
And how will this work for extension which are supposed to run in J3.9 and J4?
Labels |
Added:
?
|
We have only this fields here, no other fields are namespaced till now. It affects only the namespaced fields the rest stays as it is. No changes.
Do we really need that suffix? Looks a bit strange to me to require such a suffx when the class is namespaced (namespace already makes clear it's a field).
Rules do also end with Rule
or with Form
. Also it can cause problems with reserved words in PHP 7 and I personally like to have clear class names. But we can now discuss up and down if we should add Field
to the class name or not. At the end it is just personal preferences.
I have tested this item
Confirming that this PR fixed the reported problem - not commenting on the issue raised by @Bakual
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Just to follow up on @laoneo 's comment. For example take the integer form field. With namespacing this will end up having a class of Integer which is reserved in PHP7. Giving it a name of IntegerField (which corresponds to the integer in the XML) by suffixing the classname of namespaced class with the entity type here https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/CMS/Form/FormHelper.php#L185
I'm going to merge this as is. @Bakual if you want to open a discussion about this I'm open to that but let's do that in a fresh issue and get this form field working :)
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-08 09:14:20 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
I have tested this item✅ successfully on 2f1e898
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16580.