? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
8 Jun 2017

Pull Request for Issue #16568.

Summary of Changes

The form fields must end with Field in J4.

Testing Instructions

  • Create a new category
  • Edit an article
  • Change the category in the article edit view

Expected result

The select box is filled.

Actual result

A Javascript error is thrown and the select box to change the category is empty.

avatar laoneo laoneo - open - 8 Jun 2017
avatar laoneo laoneo - change - 8 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jun 2017
Category Administration com_categories com_content Libraries
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jun 2017

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.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 8 Jun 2017 - Tested successfully
avatar Bakual
Bakual - comment - 8 Jun 2017

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?

avatar laoneo laoneo - change - 8 Jun 2017
Labels Added: ?
avatar laoneo
laoneo - comment - 8 Jun 2017

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.

avatar laoneo
laoneo - comment - 8 Jun 2017

The change with appending Field to the name came with #16396.

avatar Bakual
Bakual - comment - 8 Jun 2017

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

avatar laoneo
laoneo - comment - 8 Jun 2017

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.

avatar brianteeman
brianteeman - comment - 8 Jun 2017

I have tested this item successfully on 4bc79fb

Confirming that this PR fixed the reported problem - not commenting on the issue raised by @Bakual


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

avatar brianteeman brianteeman - test_item - 8 Jun 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jun 2017

I have tested this item successfully on 4bc79fb


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 8 Jun 2017 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Jun 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jun 2017

RTC after two successful tests.

avatar wilsonge
wilsonge - comment - 8 Jun 2017

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 :)

avatar wilsonge wilsonge - change - 8 Jun 2017
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: ?
avatar wilsonge wilsonge - close - 8 Jun 2017
avatar wilsonge wilsonge - merge - 8 Jun 2017

Add a Comment

Login with GitHub to post a comment