I have upgraded site to latest Joomla3.8.10 successfully. But custom components are throwing blank page on Helper function call. componentNameHelperhelperName::functionName() method is not supporting i guess.
An error has occurred.
0 Class 'DirectoryHelpersDirectory' not found
I am getting a response (return value) from helper function, but page is blank. Is there any changes in helper or helper call on latest upgrade ?
Labels |
Added:
?
|
Status | New | ⇒ | Discussion |
Category | ⇒ | Code style |
Labels |
Added:
J3 Issue
|
Hi Michael,
I found the root cause of this issue and fixed it now. This front end issue is due to declaring same class name in both front-end and admin component (same component). This was working fine in our previous version Joomla3.6.5.
PHP Fatal error: Cannot declare class DirectoryHelpersDirectory, because the name is already in use in /administrator/components/com_directory/helpers/directory.php on line 18
I think Joomla loads both admin and front end helper files on latest upgraded version. If yes, Will it affect performance of site loading with both admin and front-end helpers together ?
Joomla does not arbitrarily load any files out of a component. Again, without seeing some of your code, there isn't much that we can troubleshoot here to determine if it's an issue in the core code or your implementation.
Remember, none of the component extension code is mapped to an autoloader. For files to be loaded, they must follow convention. That generally covers the files used for MVC (controllers, models, tables, and views directories, as well as the base controller.php file), the component's router (router.php), the main component entry point file, and depending on what integrations you support potentially a helper for associations (helpers/associations.php) and categories (helpers/category.php). com_fields also has some code which can look for a component helper file (in your case helpers/directory.php) in the administrator component for certain tasks, but IIRC this is mostly related to save processes.
This could be related to the b/c issue that was found in component creator when J3.7 was released.
https://www.component-creator.com/en/blog/80-joomla-3-7-backwards-compatibility-issue
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-23 18:35:07 |
Closed_By | ⇒ | brianteeman |
closed as not core joomla bug
Component code isn't autoloaded. Without seeing your code, we can't diagnose your issue. As long as you are correctly loading your helper class it should be working.