Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Blocker
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.1.5
-
Fix Version/s: 3.2
-
Component/s: CiviMember
-
Labels:None
Description
Summary
==========
Some code functions need to use a known string value to find the proper status to assign. For example, 'Pending' status and 'Deceased' status. Currently, the civicrm_membership_status table only has a 'name' column. So when the 'name' value is translated - these functions break (see example below).
Implementation
=============
1. Add civicrm_membership_status.label column to schema
2. For new installs - instantiate all default status with Label = Name for default (en_US) and set Label to translated Name value for existing localizations. Also set is_reserved = 1 for all statuses which are referenced by code functions.
3. For upgrades
- Add 'label' column to table
- Set is_reserved = 1 for all statuses referenced by code functions
- Check for required statuses using current localized language
-+ Update rows where 'name' col matches an expected status value, setting 'label' = 'name' and 'name' = untranslated value
-+ Insert rows for any missing required statuses
-+ Disable rows where 'name' col does NOT match any known status (set is_active = 0). If any rows were disabled - include the following message in the "Update successful" screen:
"One or more Membership Status Rules was disabled during the upgrade because it did not match a recognized status name. if custom membership status rules were added to this site - review the disabled statuses and re-enable any that are still needed (Administer > CiviMember > Membership Status Rules)."
4. Modify "Edit Membership Status" form to include read-only display of 'name' column (primarily to help w/ debugging any problems with localized sites).
---- Original Post ----
Trying to update membership data results in a MySQL syntax error, the executed query is:
SELECT *
FROM civicrm_membership
WHERE ( status_id != ) AND ( civicrm_membership.id = 1 ) AND ( civicrm_membership.contact_id = 13 ) AND ( civicrm_membership.membership_type_id = 5 ) AND ( civicrm_membership.is_test = 0 )
ORDER BY start_date DESC
The query misses a parameter (status_id != ). I do not know if I missed a configuration setting or this is indeed a bug.