? Success

User tests: Successful: Unsuccessful:

avatar itbra
itbra
7 Mar 2015

When trying to fetch component information like its parameters passing in the component name in uppercase format then that component won't be found and an error JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND will be thrown, where as when passing the name in lower case format everything will works properly.
I think case sensitivity should play absolutely not a role at this important place to ensure the component information will be fetched no matter in what case the option value is formatted.

Thus i added to every related method in this class receiving the component name as a function parameter a case fix.

avatar itbra itbra - open - 7 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 7 Mar 2015
Labels Added: ?
avatar itbra itbra - change - 7 Mar 2015
The description was changed
avatar bertmert
bertmert - comment - 7 Mar 2015

All my comments mean is that you could optimize your PR.

avatar bertmert
bertmert - comment - 7 Mar 2015

@test
Joomla3.4, XAMPP 1.8.1
Tested successfully with

$test1 = JComponentHelper::getComponent('COM_CONTENT', true);
echo 'DEBUG: getComponent '.print_r($test1,true);
echo "\n
";

$test2 = JComponentHelper::isEnabled('COM_CONTENT');
echo 'DEBUG: isEnabled '.print_r($test2,true);
echo "\n
";

$test3 = JComponentHelper::isInstalled('COM_CONTENT');
echo 'DEBUG: isInstalled '.print_r($test3,true);
echo "\n
";

$test4 = JComponentHelper::getParams('COM_CONTENT');
echo 'DEBUG: getParams '.print_r($test4,true);
echo "\n
";

Before patch. Fatal error or "empty" return values.
After patch: Correct return values.
isInstalled() is true before and after because MySQL-WHERE works case insensitive.
Additional tests with Joomla3.4 and testing content. Several components.

avatar zero-24 zero-24 - alter_testresult - 7 Mar 2015 - bertmert: Tested successfully
avatar zero-24 zero-24 - change - 7 Mar 2015
Category Libraries
avatar itbra
itbra - comment - 7 Mar 2015

Thanks for testing, @bertmert !

avatar itbra itbra - change - 8 Mar 2015
Title
Fix option name must not be case sensitive
Fix option value must not be case sensitive
avatar compojoom
compojoom - comment - 14 Mar 2015

Hi! Thanks for contributing!

However I think that this is not necessary & too much.
If we are not testing for Uppercase, why not do a trim as well, to ensure that we don't have whitespace in the name? Or test for the presence of com_? The option name is always written in small letters -> in the url, in the folder name, in the database etc.
I would consider this a coding standard and not something that we should take care of in our code.

With that said - I've tested your patch and it works, but I'm against adding this into the code.


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

avatar compojoom compojoom - test_item - 14 Mar 2015 - Tested successfully
avatar brianteeman
brianteeman - comment - 14 Mar 2015

Setting to NEEDS REVIEW for a CMS maintainer to make a decision


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

avatar brianteeman brianteeman - change - 14 Mar 2015
Status Pending Needs Review
avatar yvesh yvesh - test_item - 14 Mar 2015 - Tested successfully
avatar chrisdavenport
chrisdavenport - comment - 7 May 2016

Thanks for reporting this "issue", but it's well-known that component names are lower case throughout our codebase. I don't see any particular value in adding more code to cover someone not using that "standard". On that basis, I'm closing this issue.


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

avatar zero-24 zero-24 - change - 7 May 2016
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2016-05-07 09:38:24
Closed_By zero-24
avatar zero-24
zero-24 - comment - 7 May 2016

Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/6359

avatar joomla-cms-bot joomla-cms-bot - close - 7 May 2016
avatar joomla-cms-bot joomla-cms-bot - close - 7 May 2016
avatar zero-24
zero-24 - comment - 7 May 2016

Closing based on the comment by @chrisdavenport Thanks.


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

Add a Comment

Login with GitHub to post a comment