? ? Success
Pull Request for # 9523

User tests: Successful: Unsuccessful:

avatar vistiyos
vistiyos
23 Mar 2016

Pull Request for Issue #9523

Summary of Changes

Before this pull request, if the class that Joomla was trying to load only contains a capital word except the prefix, the autoloader method duplicates that word, so it forces to have a folder on the root of the path where the prefix is pointing to. Now it tries to search on the root the path a PHP file called the same as the capital word on lowercase, if it does not find it, it works as before, making this patch backwards compatible.

Testing Instructions

In order to test this patch, you need to use a component that has a class on the root of the folder and register a prefix on that folder, for example, com_test and the class would be called TestClass and it will be implemented on class.php. In order to test backwards compatibility, you can put that class on a folder call class inside of com_test folder.

Votes

# of Users Experiencing Issue
0/1
Average Importance Score
5.00

avatar vistiyos vistiyos - open - 23 Mar 2016
avatar vistiyos vistiyos - change - 23 Mar 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 23 Mar 2016

It would really help people to test this if you could provide a sample component thy can test with

avatar brianteeman
brianteeman - comment - 23 Mar 2016

Can you take a look at fixing the code style error please

FILE: /home/travis/build/joomla/joomla-cms/libraries/loader.php

FOUND 1 ERROR(S) AFFECTING 1 LINE(S)

605 | ERROR | Expected "if (...)\n"; found "if(...)"

avatar vistiyos
vistiyos - comment - 23 Mar 2016

@brianteeman Thanks for point that out. I have solved that issue

avatar vistiyos
vistiyos - comment - 23 Mar 2016

I have created this component using Component Creator.

http://www.filedropper.com/comtest-100_2

You just need to go to the front-end of your Joomla installation and trying to execute a controller task called test (/index.php?option=com_test&task=classes.test). If you see a message, it means the patch is working as intended. Try other component to detect the patch is backwards compatible.

Thank you

avatar brianteeman brianteeman - change - 23 Mar 2016
Category Libraries
avatar brianteeman brianteeman - change - 23 Mar 2016
Rel_Number 0 9523
Relation Type Pull Request for
avatar mbabker
mbabker - comment - 23 Mar 2016

@vistiyos Please merge vistiyos#1 as it adds unit test coverage for the new behavior and validates the current behavior does not break.

With that PR applied, testing also becomes much easier. Without this patch, JFactory has to be explicitly loaded in the libraries bootstrap because it doesn't meet the folder/file structure required right now. With this patch applied, it is autoloaded.

avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2016
Labels Added: ?
avatar vistiyos
vistiyos - comment - 23 Mar 2016

@mbabker Merged. Thanks for those tests.

avatar jsanchezgr
jsanchezgr - comment - 28 Mar 2016

I have tested this item :white_check_mark: successfully

avatar vistiyos
vistiyos - comment - 4 Apr 2016

Any news about this? The patch passes unit tests, so I don't know if it can be merged.

avatar brianteeman brianteeman - alter_testresult - 20 Apr 2016 - jsanchezgr: Tested successfully
avatar zero-24 zero-24 - test_item - 7 May 2016 - Tested successfully
avatar zero-24
zero-24 - comment - 7 May 2016

I have tested this item :white_check_mark: successfully on 07dd724

Thanks.


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

avatar zero-24 zero-24 - change - 7 May 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 7 May 2016

RTC. Thanks


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

avatar joomla-cms-bot joomla-cms-bot - change - 7 May 2016
Labels Added: ?
avatar wilsonge wilsonge - change - 7 May 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-05-07 14:25:33
Closed_By wilsonge
avatar brianteeman brianteeman - change - 11 May 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment