? Success

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
19 Dec 2014

Issue

The installation app contains a JFormFieldLanguage class which has demonstrated previously why we cannot make the core JFormField classes autoloadable (see #3116).

Solution

JForm supports namespacing of classes by a dotted notation in the type attribute of a field's XML declaration. In this case, type="language" expects to load an instance of JFormFieldLanguage (which is a duplicated class). Using namespacing, we can use type="installation.language" to ask JForm to load a class named InstallationFormFieldLanguage.

Additional Changes

Instead of only moving the problem class in the install app, I've instead moved all of the custom JFormField and JFormRule classes in the install app to use the Installation class prefix versus J. This allows us to demonstrate within core this feature of JForm (which truthfully isn't presented very well) and demonstrate that custom field elements can be loaded without the use of addfieldpath and addrulepath attributes in the form XMLs, which should be a preferred behavior in code that is autoloadable (such as the installation application).

Testing Instructions

As this requires testing the installer, the patch tester can't be used (feasibly anyway) to apply this patch. So you'll need to apply the patch using a git client or you can download a full Joomla package via GitHub at https://github.com/mbabker/joomla-cms/archive/InstallLanguageField.zip. Once applied, simply test installing a new Joomla instance; everything should work as before.

Backward Compatibility

Typically, the installation application has been excluded from backward compatibility concerns as the app is only used for new Joomla installations and the code immediately removed from a site. Therefore, class proxies or other practices used in the libraries or components are not applied here.

avatar mbabker mbabker - open - 19 Dec 2014
avatar jissues-bot jissues-bot - change - 19 Dec 2014
Labels Added: ?
avatar brianteeman brianteeman - change - 19 Dec 2014
Category Installation Libraries
avatar richard67
richard67 - comment - 20 Dec 2014

Tested with success fresh installation with staging plus this PR applied all installation steps including the (optional) multilingual installation at the end and full example data for testing. Everything works as before.


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

avatar richard67 richard67 - test_item - 20 Dec 2014 - Tested successfully
avatar zero-24
zero-24 - comment - 22 Dec 2014

@test successful

Installing Joomla Core and multilingual (en-GB + de-DE)


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

avatar zero-24 zero-24 - test_item - 22 Dec 2014 - Tested successfully
avatar zero-24 zero-24 - change - 22 Dec 2014
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 22 Dec 2014

moving to RTC


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

avatar brianteeman brianteeman - change - 22 Dec 2014
Labels Added: ?
avatar wilsonge
wilsonge - comment - 22 Dec 2014

Thanks both! Merged

avatar wilsonge wilsonge - close - 22 Dec 2014
avatar zero-24 zero-24 - close - 22 Dec 2014
avatar wilsonge wilsonge - change - 22 Dec 2014
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2014-12-22 22:56:01
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment