Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.0
-
Fix Version/s: 4.4.2
-
Component/s: None
-
Labels:None
Description
In drupal logs Pradeep found a notice error
Notice: Constant CIVICRM_SETTINGS_PATH already defined in civicrm_initialize() (line 228 of /var/www/html/oursite/sites/all/modules/civicrm/drupal/civicrm.module).
http://oursite/admin/reports/event/26590 for civicrm cron job. We have several scheduled tasks set up with cron and are not sure which one generated the error.
Seems like CIVICRM_SETTINGS_PATH is defined once again in civicrm/drupal/civicrm.module. Its a core bug for 4.4. Pradeep checked on fresh install and could replicate the error. The fix would be very simple like
— a/civicrm.module
+++ b/civicrm.module
@@ -225,7 +225,9 @@ function civicrm_initialize() {
else
- define('CIVICRM_SETTINGS_PATH', $settingsFile);
+ if (!defined('CIVICRM_SETTINGS_PATH')) { + define('CIVICRM_SETTINGS_PATH', $settingsFile); + }
$error = include_once ($settingsFile);
// get ready for problems.
We have applied this fix this on our dev server but are not confident it is the correct approach or a complete solution, since we haven't done much QA on it.