Details
-
Type:
Bug
-
Status: Done/Fixed
-
Priority:
Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.7, 4.2.8, 4.2.9, 4.3.0, 4.3.1, 4.3.2, 4.3.3
-
Fix Version/s: 4.3.4
-
Component/s: Joomla Integration
-
Labels:
Description
In the administrator/components/com_civicrm/helper/api.php
the following code exists (since 4.2.7 and maybe even since the start):
define('CIVICRM_SETTINGS_PATH', JPATH_BASE . DS . 'administrator' . DS . 'components' . DS . 'com_civicrm' . DS . 'civicrm.settings.php');
require_once CIVICRM_SETTINGS_PATH;
This is wrong, since the Joomla JPATH_BASE contains the administrator portion of the path when invoked from backend and does not contain it when invoked from frontend.
This will cause the require_once statement to fail if the file is loaded from backend (for example from some Joomla system plugin) and if invoked from frontend no failure happens but the wrong civicrm_settings.php file is being picked up.
The define statement should be changed to:
define('CIVICRM_SETTINGS_PATH', JPATH_BASE . DS . 'components' . DS . 'com_civicrm' . DS . 'civicrm.settings.php');