Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: 3.4.8
-
Fix Version/s: 3.4.8
-
Component/s: None
-
Labels:None
Description
(This affects 3.4 but not 4.1, as 4.1 uses the new CRM_Core_BAO_Setting.)
CRM_Admin_Form_Setting_Smtp::setDefaultValues does this...
$mailingDomain = new CRM_Core_DAO_Preferences();
$mailingDomain->find(true);
...which retrieves any old row from civicrm_preferences. So if the first row retrieved relates to another domain_id, that's what will be used to set the form defaults. Changing the above to...
$mailingDomain = new CRM_Core_DAO_Preferences();
$mailingDomain->domain_id = CRM_Core_Config::domainID( );
$mailingDomain->is_domain = true;
$mailingDomain->find(true);
...fixes it. Patch attached.