Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.1.3
-
Fix Version/s: 4.1.3
-
Component/s: Core CiviCRM
-
Labels:None
Description
My profiles suddenly became unusable, displaying the message from line 429 of CRM/Profile/Form.php: "This profile is configured for contact type '%1'. It cannot be used to edit contacts of other types."
Debugging revealed that the contactSubType being returned from CRM_Contact_BAO_Contact::getcontactTypes had an additional character "\x01" added to the beginning and the end of the string.
I have made the following change to my installation to work around the problem, but I'm sure the correct fix lies elsewhere:
diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php
index 5ab70ae..24dbbe6 100644
— a/CRM/Contact/BAO/Contact.php
+++ b/CRM/Contact/BAO/Contact.php
@@ -1076,7 +1076,7 @@ WHERE id={$id}; ";
if ($contact)
else {