# CiviCRM 5.22.0
Released February 5, 2020
- **[Bugs resolved](#bugs)**
## <a name="synopsis"></a>Synopsis
| *Does this version...?* | |
| Fix security vulnerabilities? | no |
| **Change the database schema?** | **yes** |
| **Alter the API?** | **yes** |
| Require attention to configuration options? | no |
| **Fix problems installing or upgrading to a previous version?** | **yes** |
| **Introduce features?** | **yes** |
| **Fix bugs?** | **yes** |
## <a name="features"></a>Features
### Core CiviCRM
- **Field Names now Reserved Words in MySQL8
Allows CiviCRM installations to run on MySQL8 and updates the test
infastructure to support MySQL8.
- **Add controlField metadata for ChainSelect fields
Adds additional field metadata for state/province and county address fields
for the sake of autogenerated forms (afform).
- **Allow Angular modules to provide dynamic HTML snippets
Supports afforms dynamic templates by allowing angular partials to be passed
as strings not just file paths.
- **Allow values to be passed to api4 GetFields
Makes it possible to filter api4 `getFields` calls by contact
type, only returning custom fields appropriate to certain contact types.
- **Pass api4 getFields values through to getOptions
Allows option filtering in api4, similar to how it works in api3.
- **Add api to check for missing indices
Adds an api to check for missing mysql indices.
- **Add in Country and StateProvince APIv4 Entities
Adds Country and StateProvince APIv4 Entities.
- **Replace all instances of CRM_Core_Fatal with throw new CRM_Core_Exception
(Work Towards [dev/core#560](https://lab.civicrm.org/dev/core/issues/560):
Work towards throwing exceptions (instead of fatal errors).
- **Deadlocked queries cause an instant error for end-users, but are retried in
other circumstances (Work Towards
Improves logging from deadlocks specifically, before this change an error
recorded because of a deadlock query was recorded as "DBError::Unknown Error"
now they are recorded as "DBError::deadlock".
- **We should give user feedback in case of a Payment Processor Exception
Improves user experience when updating or canceling a recurring payment by
displaying any error message sent from the payment processor to the user.
- **Code cleanup Update Paypal invokeApi to only throw exceptions.
Standardizes and improves error handling within PayPal.
## <a name="bugs"></a>Bugs resolved
### Core CiviCRM
- **CIVI-SA-2019-21 may lead to regressions when following typehints on
Deprecates old setItem & setOptionValue functions on
BAO_Setting to prevent regressions.
- **Deadlocks on acl_cache (Work Towards
Adds an index to the `civicrm_acl_cache.modified_date` column to reduce
deadlocks when running the ACL Cache.
- **Port "+options" for constant-parameters to APIv4-PHP (Work Towards
Ensures managed entities are not reconciled during upgrades.
- **Api4 - Fix auto serialize array input for CheckBox/MultiSelect fields
In Api4, serialized fields should input/output as array data. This wasn't
working on the input side for custom entities. This fixes array input handling
and adds test coverage.
- **Fix output display in api4 explorer
Ensures api4 explorer displays output with html entities properly.
- **Add in searchFieldMetadata for contact_tags, contact_type, group and
deleted_contacts fields for contribute, pledge searches
Adds url support on search forms (other than the search builder) for the
following fields: `contact_tags`, `contact_type`, `group` and
- **Update Smart Group form uses different labels for Group Title and Group
Improves user experience by making the Smart Group field labels on the
Advanced Search from match the labels used on the Smart Group edit form.
- **Update Smart Group form unsets the existing Group Types
Ensures the Mailing List group type remains set on the Update Smart Group
- **loadServices: tighten up file match regex
Ensures that CiviCRM code living under a path containing the characters 'php'
does not crash when loading services.
- **Activity type listing shows name instead label
- **Export doesn't work in Excel with diacritic chars
- **text missing from email column when custom search profile is used
in Advanced Search
- **Undefined offset and uninitialized string offset notices on upgrade to 5.21
- **Add case activity action links to activity report
Ensures if an activity is linked to a case the "case activity" actions are
displayed instead of the standard activity actions (eg. move/copy to case
instead of file on case).
- **Activity Details CiviReport gives network error when paging to next page if
choose filter to include case activities
- **Case Detail 'Active Role?' filter excludes cases without relationships
- **Manager/Creator Information not being returned for case related contacts
when fetching Case Details
- **Thousands-separator corrupts price field values (comma)
Fixes a bug where price options with thousands operators didn't submit
- **E notice fix on Price set form
Removes an e notice when submitting the price set form.
- **Advanced search fails to properly search for contribution source
- **Event Participants actions (Print Name Badges, Export...) ignores search
Ensures that the actions menu on the participant search form respects search
- **Exception Malformed temp table category on New A/B Test
Fixes a regression in 5.21.2 where creating a new A/B Test resulted in a
session status Exception Malformed temp table.
- **Fix js error on choosing membership type
type from the backend membership signup form.
### Drupal Integration
- **Error when creating user record for Civi contact
Fixes an E-notice "Notice: Trying to get property 'id' of non-object in
CRM_Core_BAO_UFMatch::updateContactEmail() (line 449 of
submitting the "Create User Record" form which can be found from the "Actions"
menu-button while viewing a CRM contact.
- **Missing address on `/user` when location type label differs from its name
### Wordpress Integration
- **Fix basepage title for Yoast SEO when theme declares "title-tag" support
Fixes a bug for sites with the Yoast SEO plugin where the CiviCRM page title
was not being displayed properly. Specifically the Yoast SEO plugin
short-circuits the code in `wp_get_document_title()` by filtering via
`pre_get_document_title`. This means that the CiviCRM code to apply the
CiviCRM basepage title via the document_title_parts filter is never reached
and the basepage title does not reflect the CiviCRM content.
## <a name="misc"></a>Miscellany
- **Fix typo, Mailign should be Mailing
- **Switch static var to using Civi::statics
- **Remove code to create a subscription history entry when a contact is created
- **Remove unnecessary query when updating org, if no name update.
- **Remove unnecessary, and possibly incorrect query from email update
- **Remove unneeded zendframwork/zend-validator and zendframwork/zend-stdlib
packages as not required by any other package
- **Remove legacy_redirect_path handling
- **Remove function marked as deprecated & unused by core nearly a year ago
- **Remove vestige of apiv2
- **Remove PEAR package Structures_Graph as there appears to be no use for it
- **Remove Net_UserAgent_Detect package
- **Paypal class cleanup
- **2020 test fixes.
- **Unit test for https://github.com/civicrm/civicrm-core/pull/16120
- **Update unit tests to use name spaced format of phpunit test classes for
- **Update to use the namespaced version of the PHPUnit test classes as this
will work for phpunit6 going forward as well as phpunit5
- **Update PHPUnit Test class declarations to use namespaced format for phpunit6
- **[REF] Minor cleanup - declare exceptions, use single quotes, strict
- **[REF] remove CRM_Core_Error check
- **[REF] Convert more petition signature fatals to status bounce
- **[REF] Switch CRM_Utils_Error::fatal calls for CRM_Core_Exception in Grant.
utils, bin/ and Civi/Angular/ folders
- **[REF] Minor simplification on additional_participants checks
- **[REF] Refactor Contact Search form to use standardised getSortID function
- **[REF] Refactor Activity Search to use parent getSortID function
- **[REF] Refactor Campaign Search form to use standardised getSortID function
- **[REF] Move wrangling of Front end form contribution param for autoRenew back
to form ((https://github.com/civicrm/civicrm-core/pull/15927))**
- **[REF] Replace Deprecated function CRM_Core_BAO_Setting::setItem with the
relevant Civi::contactSettings function
- **[REF] remove unused from getACLRoles
- **[REF] simplify recordAdjustedAmt function
- **[REF] extract member form batch update & add test
- **[REF] Remove unused params from function signature for getACLs
- **[REF] step towards wiping out $ids array in membership bao functions
- **[Ref] improve readability of acl code
- **[Ref] Remove php4 support from BAO_Acl class
- **(NFC) Civi, CRM, tests - Update for
- **[NFC] Test clean up.
- **[NFC] cleanup to declared exceptions, quotes, strict mode.
- **[NFC] Declare exceptions, use single quotes where possible, use strict
- **[NFC] Add in unit test for dev/core#1460
- **[NFC] code cleanup
- **[NFC] Add in a unit test of passing an array into the Civi::settings set
facade and getting it back
- **[NFC] Add test on buildMembershipTypeValues & cleanup class
- **[NFC] Re-generate DAOs
- **[NFC] Extract duplicated code lines in test
- **[NFC] Clean up unit test
- **[NFC] If statement is always true
## <a name="credits"></a>Credits
This release was developed by the following code authors:
AGH Strategies - Andrew Hunt; Agileware - Justin Freeman; Australian Greens -
Seamus Lee; Christian Wach; Circle Interactive - Pradeep Nayak; CiviCRM -
Coleman Watts, Tim Otten; Coop SymbioTIC - Mathieu Lutfy; Dave D; Fuzion -
Jitendra Purohit; MJW Consulting - Matthew Wire; Squiffle Consulting - Aidan
Saunders; Wikimedia Foundation - Eileen McNaughton
Most authors also reviewed code for this release; in addition, the following
reviewers contributed their comments:
AGH Strategies - Alice Frumin; Artful Robot - Rich Lott; CiviDesk - Yashodha
Chaku; Joinery - Allen Shaw; Megaphone Technology Consulting - Jon Goldberg;
Tadpole Collective - Kevin Cristiano;
## <a name="feedback"></a>Feedback
These release notes are edited by Alice Frumin and Andrew Hunt. If you'd like
to provide feedback on them, please log in to https://chat.civicrm.org/civicrm
and contact `@agh1`.