Setup a component with two instances of the category. For example:
a. component com_mycomponent has two types of items type1 and type2
b. type1 uses Joomla category system with extension name as com_mycomponent
c. type2 uses Joomla category system with extension name as com_mycomponent.type2
Now, I can add first type countItems method in administrator/components/com_mycomponent/helpers/mycomponent.php with class name as MycomponentHelper
However in second case, I cannot create another class for second type because of the below code in components/com_categories/models/categories.php line 307
$classname = ucfirst(substr($extension, 4)) . 'Helper';
this results the name as Mycomponent.type2Helper. So I cannot create the class name because of the dot in between the name.
It should show category counts by checking the countItems function class name Mycomponenttype2Helper (without dot)
Does not work
Joomla 3.5 beta 2
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-07 21:57:21 |
Closed_By | ⇒ | brianteeman |
Closed as we have a PR for testing - see #9315
The fix is simple.
$classname = ucfirst(substr($extension, 4)) . 'Helper';
should be changed to
$classname = ucfirst(str_replace('.', '', substr($extension, 4))) . 'Helper';
If this is okay, I will send the pull request.