# CiviCRM 5.31.0
Released November 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?** | **yes** |
| **Fix problems installing or upgrading to a previous version?** | **yes** |
| **Introduce features?** | **yes** |
| **Fix bugs?** | **yes** |
## <a name="features"></a>Features
### Core CiviCRM
- **Implement more nuanced "Administer CiviCRM" permisions
Actions that required the "Administer CiviCRM" permission now require one of
two separate permissions: "administer CiviCRM system" and "administer CiviCRM
data". The "Administer CiviCRM" permission still exists, and users having it
are treated as implicitly having both of the new permissions.
However, it is now possible to grant permission to configure profiles,
scheduled reminders, and set admin-only price options independently of
granting permission to configure scheduled jobs, install extensions, and view
the system check. An organization might grant the former to senior staff and
the latter to technical staff.
- **Buttonrama ((https://github.com/civicrm/civicrm-core/pull/18410),
This ensures icons and text within buttons are aligned vertically, and it
makes form buttons appear consistent with links that are rendered to appear
Specifically, most buttons are now `<button>` elements rather than `<input
type="button">`, and button styling now applies to the button itself rather
than a wrapper. Extension and theme developers should confirm that CSS and
DOM selectors accurately identify the intended button elements.
- **Custom field form reform
This improves the form for creating or updating custom fields by improving
validation, making defaults easier to select, and allowing more flexibility
around changing the widget type.
- **Add higher-level support for "bundles" and "collections" of resources
add to certain pages. These can now be bundled together to reduce redundant
code and can be modified with the new `hook_civicrm_alterBundle()`.
The core styles and other resources are now included as bundles, allowing them
to be modified in a standard way.
In addition, page regions, bundles, and (to some extent) page resources are
now treated as "collections" which share a common interface for adding and
retrieving individual resources.
- **Bootstrap3 CSS
CiviCRM introduced a theming system several years ago, but the existing look
and feel was left as a "default", with the *de facto* theming code spread
throughout the application. The new themes have generally used Bootstrap 3 as
a user interface framework.
A handful of new CiviCRM features have been developed that depend on Bootstrap
3 for core functionality or at least for basic look and feel. Sites lacking a
newer theme need a way to load at least a minimal set of Bootstrap 3 code for
these features to be functional and attractive.
This change introduces a new CiviCRM theme extension, named "Greenwich", that
is enabled and hidden by default for all sites. It provides Bootstrap 3 when
needed. In addition, it can serve as a vehicle for moving theming code out of
- **APIv4 Search: Improve GROUP_CONCAT with :label prefix
This improves the Search UI by exposing the DISTINCT modifier and fixing
- **Search ext: rename to Search Kit, mark as beta
An extension to replace the search user interface has been included, but
hidden, in CiviCRM for several months. Named Search Kit, it is now available
to be enabled for sites.
- **Search extension: edit smart groups
Search Kit can now edit smart groups. When installed, the "edit smart group
criteria" link will open the classic search forms or Search Kit as
- **Search ext: support complex joins & HAVING clause in api4 smart groups
Improves the new search extension and APIv4 smart groups in core to support
any entity that can join with Contact, including full support for calculated
fields and the HAVING clause.
- **Select field fixes for screen reader
The placeholder text for select drop-down fields now reflects the field label.
The Select2 widget makes it difficult for screen readers to identify the
field's label, so this helps identify the field for users who rely on screen
- **Add modified_date to list of activity tokens
Adds Modified date to the list of available activity tokens.
- **Add an 'Execute Now' button to the job log
Adds an "Execute Now" button to the Job log to make it easier to rerun a
scheduled job if needed.
- **Send email to contacts when clicking on their email address on the contact's
Improves the contact card by making the email a link which takes the user to a
form to send an email to that contact.
- **Ability to Search Smart or Normal Group using additional filter on Manage
Group page ([dev/report#45](https://lab.civicrm.org/dev/report/-/issues/45):
Adds a filter "Group Type" to the Manage Groups page which can be used
to filter by normal or smart groups.
- **Ability to Send Invoice with modified subject and CC it
Adds the ability to edit the subject and cc fields when emailing an invoice
from a contribution.
- **Add ability to segment query logs
SQL queries can be sent to a debugging log when the `CIVICRM_DEBUG_LOG_QUERY`
environment variable is set. Now, the value of that variable can specify a
file name for the log.
- **Move ACls on LineItem create to financialacls core extension
Simplifies the code base by moving the financial ACL handling from the
LineItem BAO to the financialacls core extension.
- **Convert core processors to use Guzzle and bring them under CI (Work Towards
The PayPal Pro payment processor integration now uses the Guzzle library for
HTTP requests. This improves consistency and allows for unit testing of the
- **Migrate Eway(Single Currency) Payment Processor Type out into its own
The Eway payment processor is now a separate extension, albeit shipped with
- **Make 'Record Payment' & 'Record Refund' visible regardless of whether the
balance 'requires' one
Makes it so the "Record Payment" and "Record Refund" links on Contributions
are always visible.
- **Alter the default of send notification to contributor checkbox on cancel or
edit recurring to off
The "notify contributor" checkbox on the form to cancel or edit a recurring
donation is now unchecked by default.
- **PCP action links support for hook_civicrm_links
This allows `hook_civicrm_links` to be used by extension developers to modify the
list of actions offered to personal campaign page creators.
- **Add Line Item v4 API
Adds the "Line Item" entity to APIv4.
- **Improve metadata on LineItem DAO
Adds labels to line item meta data.
- **Add options to Mail Account settings to improve inbound mail processing
Two new options are added to the Mail Account settings form to improve inbound
1. 'Skip emails which do not have a Case ID or Case token'
2. 'Do not create new contacts when filing emails'
- **Change wording on the Opt Out and Unsubscribe pages
Improves messaging to end user on Opt Out and Unsubscribe pages.
- **Add custom field groups to Membership Contribution Detail report
Contact custom fields are now available on the Membership Contribution Detail
### Drupal Integration
- **Drupal 9 deprecations
Drupal now allows for smooth upgrades between major versions by gradually
introducing new API functions and deprecating others through the cycle of a
major version. A new major version starts by simply removing deprecated
function from the latest release of the prior major version.
This removes the use of a number of functions that have been deprecated since
Drupal 8.5 and are removed in Drupal 9. The result is that CiviCRM 5.31 is no
longer compatible with Drupal versions prior to 8.5 but is compatible with
- **Finish allowing use of SSL to connect to database
(Work Towards [dev/core#1926](https://lab.civicrm.org/dev/core/-/issues/1926):
The setup screen now attempts to identify if the Drupal database connection
uses SSL and fills the configuration options to match.
- **drush civicrm-ext-list add ext's status filter and show version number
Extends the drush command `drush civicrm-ext-list` so that users can:
- Filter by the extension's status (installed, uninstalled, disabled)
- Show the extension version number in the result list
- Use the `--out` option to print results as json or as a pretty table
## <a name="bugs"></a>Bugs resolved
### Core CiviCRM
- **"Network Error" when sorting contact search results by City, Postcode or
- **Public contribution form and Checksums: billing information not loaded if
using multiple processors
Custom data tables for contacts are now created with the charset and collation
to match the `civicrm_contact` table.
This resolves a bug when the billing information is not filled when visiting a
contribution page with multiple payment processors via a checksum link.
- **Deadlocks on acl_cache
(Work Towards [dev/core#1486](https://lab.civicrm.org/dev/core/-/issues/1486):
Removes foreign keys from the ACL cache tables as they are likely to
- **APIv4 - revisit required parameters on location entities
Makes it so that APIv4 can be used for creating event locations by making
contact_id optional for the Address, Phone and Email entities.
- **Eliminate "No extensions available for this version of CiviCRM"
Fixes warning thrown when no public extensions directory is found.
- **Group ids in profile fields are not correct
Fixes DB errors when using the groups field in a profile.
- **Drupal 7 + 9 Groups dont show in edit with version 5.30.1
- **Rebuild triggers after utf8mb4 conversion
When the `System.utf8conversion` API call is run, this ensures that the
triggers for relationship_cache are updated to use the right encoding.
- **Remove explicit COLLATE utf8_bin from RelationshipCache trigger
Ensure that relationship types can be edited after switching to utf8mb4.
- **Fix way of identifying custom serialized fields
Removes references to field types that no longer exist, specifically the
'Multi-Select', 'Multi-Select State/Province', and 'Multi-Select Country',
custom field types, which were all removed in 5.27.
- **Exclude api4 from IDS check
Fixes false-positive "suspicious activity" warnings in the IDS (Intrusion
Detection System) when using APIv4.
- **Fix complexity on cache key
Ensures that the cacheKey does not cross-populate values from different users.
- **Use title instead name in status message
Fixes help text when an option group is saved to show the title of the option
group instead of the name.
- **Export fix on long custom fields
This resolves problems exporting custom fields that have long option values.
- **Contact form task delete php spelling fix
- **Component Titles are not translated on the Configuration Checklist page
- **Error when viewing contact merged to permanently deleted contact
When one contact is merged to another contact, the first contact remains in
the trash and refers to the second. However, there was a bug preventing that
first contact from being viewed if the second contact was deleted permanently.
- **E_WARNING when editing custom field with trigger-based logging turned on
- **Northern Ireland / Wales counties are out of date
- **Multiple email activity cc recipients get scrunched together in recorded
activity details field
- **When exporting for composer-style deployment, exclude the `.gitignore` file
- **Fix patently silly code
- **Fix cache bypass
- **Fix bug in primary handling where TRUE rather than 1 used
- **Greenwich - fix conflict btw bootstrap & jQuery UI button
- **Remove double exception handling in repeattransaction
- **Preferred Language in a profile doesn't show/behave as required when so
- **Fix deprecation notice
- **Replace '&' to 'and' in button label
- **Performance - meta issue for hunting down memory leaks
- **E_NOTICE viewing an activity that has no details contents
- **Undefined index on contact's activity tab when there's an activity that has
no With Contact
- **Undefined index 'class' on new individual form
- **Deprecation warnings when making thank-you letters
This affects all PDF letters.
- **Fix the output of the full text custom search form
This resolves styling issues on the full text search form.
- **For countries without a province N/A is not accepted as a state in a profile
- **IN operator not working in Search
This changes the group search field in the basic "Find Contacts" search back
to a plain select drop-down rather than a Select2 widget.
- **Fix default report permissions when creating reports from CiviCampaign
Ensures that CiviCampaign report titles are not accessible to users without
proper permissions to view the report.
- **Incorrect comparison of status_id when changing status of linked cases
- **View Payment owned by Different contact on Membership and Participant View.
This ensures that related payments are displayed when viewing a Membership or
Participant even if they come from a different contact.
- **Dropdown for country seems to have reverted to a regular select instead of
This resolves a bug in the display of the Country field in the billing address
section of a contribution page.
- **Fix formatLocaleNumericRoundedByCurrency
Ensures that currencies are rounded to the correct decimal point instead of
always 2 decimal points.
- **change civicrm_price_set.min_amount to float
Updates the price set minimum amount field to be float (not int).
- **Incorrect rounding up with priceset fields
Ensures the amount is saved to the database correctly for price field values
when a value is entered longer than two decimals.
- **Display url_site and url_recur based on if the form elements exist
Ensures developers can remove fields from the payment processor configuration
form using the build form hook.
- **LineItem pre Hook non-standard on edit
This resolves a bug in the entity ID sent to `hook_civicrm_pre` when editing
- **Performance - do not retrieve soft credits & pcps when not required
- **Remove ajax timeout from contribution page on behalf of
- **property bag's setAmount should ensure dot decimal point
- **Contact Dashboard does not show event registrations for non-admins
- **Set participant status notification to false by default
The "Send Notification" checkbox is now always unchecked when editing a participant's status. Previously it would be checked by default when changing a status to "Cancelled" or from "Waitlist" or "Pending waitlist".
- **ParticipantListing Report: only display the View link for web, unhardcode
Ensures that when exporting the Participant Listing report the view links are
- **Scheduled reminder: "Additional recipients" receive reminders under
circumstances where they ought not to
Ensures that "Additional recipients" do not receive reminders for deleted
- **Email & Phone storage issues in event location
Ensures second email and phone values are saved for event locations.
- **Creating new event without email fails
- **Changing address on event hangs
- **Grant dashboard counts trashed contacts
- **Possible regression on deleted contacts
Ensures contacts deleted after a mailing is created do not get the mailing.
- **Membership Renewal form re 'fixMembershipBeforeRenew'
The status of an existing membership is now recalculated prior to loading the
renewal form. This allows an accurate status to be displayed and used for
calculating renewal dates.
- **Membership status does not get updated during membership import when status
override is set
- **Bug When Restoring Overridden Status on Related Memberships
Ensures related memberships do not get deleted when running the membership
status calculation scheduled job.
- **Fix for ongoing issues with static upsetting the apple cart
Ensures that inherited relationships are created more reliably.
- **Multiple Memberships Status Not updated when payment status changed from
pending to Completed
- **Make period_type mandatory for MembershipType
### Backdrop Integration
- **Check if BACKDROP_ROOT is defined already
Fixes the "Constant BACKDROP_ROOT already defined..." notice.
### Drupal Integration
- **Make symfony aliased services public
Fixes a warning on the extensions form for Drupal 8 sites.
- **Tarball includes a symlink that goes nowhere, which causes alternate drupal
install method to fail
- **Exception handling - 'Allowed memory size' exhasted issues
Avoid crashes from recursion on unhandled exceptions (most often an issue in
- **inheritLocale regression
Ensures that CiviCRM in multilingual mode respects the Drupal language.
- **Do not block user incase 'Require approval' is checked
Ensures users created via a profile are set to active in Drupal8 to prevent
issues with the email verification step.
- **Fix customGroup getTableNameByEntityName to recognize all entities
This ensures that all entities are recognized by Webform integration.
- **Custom field values not showing in Drupal 7 Views filter
- **Fix theme configuration section on Display preference and improve
`isFrontendPage` function for Drupal CMS
- **Drupal 7 - Groups children now get shown with SPAN CSS error
- **composer.json - Update compile-lib and compile-plugin
## <a name="misc"></a>Miscellany
- **Take the guesswork out of rendering clientside CRM variables
- **Improve consistency of metadata type declarations
- **Use eventID rather than the object in completeTransaction
- **Load event title from participantID
- **Fix Invoice class to not call validateData
- **Finish deprecating BaseIPN->completeTransaction
- **Add postAssert to check payments and contributions are valid on all tests.
- **Switch frontend contribution form to cached/non-deprecated functions for
- **Ensure DAO base class contains functions to be removed from generated files
- **Switch backend membership form to use non-deprecated/cached functions to get
- **Fix civi version for greenwich
- **Switch to passing payment_processor_id as input param to completeOrder
- **Switch membership BAO to use non-deprecated cached functions to get
- **Separate export into separate classes to allow unravelling of component
- **Simplify CRM_Core_BAO_Location::createLocBlock by moving eventLocation
specific handling back to the class
- **Update the post-upgrade thank you message to include URLs to CiviCRM
contributors, CiviCRM members and minor rewrite
- **Simplify call to loadRelatedObjects in repeat/completetransaction
- **Move membership tab add/submit membership buttons to PHP layer
- **Remove extraneous UF match queries
- **Can't send SMS to mailing group whose parent isn't a mailing group (Clean up
- **Merge - ensure location entities remaining on deleted contacts have
(Clean up [dev/core#2047](https://lab.civicrm.org/dev/core/-/issues/2047):
- **[cq] Do not pass by reference where avoidable
(Work Towards [dev/core#2043](https://lab.civicrm.org/dev/core/-/issues/2043):
- **Fix the Test Result (1 failure / -190)
E2E.Core.PrevNextTest.testDeleteByCacheKey recurring test issue
- **SyntaxConformance::testSqlOperators cleanup fix - ensure entities are
- **Move afform to be a core extension
- **Upgrade Angular from 1.5 => 1.8
- **Extraneous queries - activities (Work Towards
- **Eliminate unused query on CRM_Core_BAO_CustomQuery::_construct
- **Rationalise BAO create vs add functions (Work Towards
- **Address extraneous location queries
- **Remove unused functions (Work Towards
- **Remove unneccessary isoToDate function
- **Deprecate BaseIPN functions validateData & LoadObject (Work Towards
- **Separate out Search participant register form from backoffice form
- **Add try catch to main loops on core ipn classes
- **Rename variable $key to $participantID to make it clear what it is
- **Stop passing / using object when all we need is the id
- **Minor code cleanup - this is only ever called from one place so component is
always event ((https://github.com/civicrm/civicrm-core/pull/18343))**
- **Membership form test cleanup, date cleanup on form
- **Search ext: misc cleanup & fixes
- **Switch to non-deprecated/cached functions for membership pricesets
- **Fix parameters for MembershipTest
- **Update code comments
- **Pass in activity type rather than calculate it
- **Move definition of userName to where it is used and remove an unused
- **Minor code simplification on date handling in getMembershipStatusByDate
- **Offer singular entity titles
- **(REF) GenerateData - Make it possible to call this via PHP
- **[REF] Simplify array construction
- **[REF] minor tidy up on membershipStatus::create & add
- **[REF] Folllow up cleanup - remove now unused param
- **[REF] Start the process of separating the search action from the participant
- **[REF] Code simplification - remove conditional chunk
- **[REF] Extract failContribution code
- **[REF] Fix visibility of afform_scanner container service for Symfony …
- **[REF] Refactor price field form to allow for unit testing of the form
- **[REF] Minor readability fix
- **[REF] change deprecated function to API4 call
- **[NFC] Cleanup in test class
- **[REF] Remove now used parameter & make function protected
- **[REF] Consolidate input params that are primarily used for the membership
entity action to an array
- **[REF] Extract the code to determine the DAO name into a functions
- **[REF] Fix deprecated array and string offset access using curly brace…
- **[REF] Code cleanup on membership renewal & test
- **[REF] Improve the human readable name of the eway upgrade step to be …
- **[REF] Simplify loading of related objects in transition components
- **[REF] simplify interaction with objects in complete order
- **[REF] Mark CRM_Contribute_BAO_Contribution_Utils::formatAmount deprec…
- **[REF] Swap out CRM_Utils_Array::value() - partial pull out from PR 18207
- **[REF] Remove unused lines from loadObjects
- **[REF] Ensure that all bundle container services are public for Symfon…
- **[REF] Parse ids before sending to single function (minor simplification)
- **[REF] Hide eway extension in UI and only install it if the original e…
- **[REF] Simplify logic on calling self::updateContributionStatus
- **[REF] Fix adding in the accessKey based on the button array
- **[REF] Add in frontend fields for title and description of group Schem…
- **[REF] Remove unused taskName variable
- **[REF] IPN - move unshared chunk of code out of shared function
- **[REF] Paypal std ipn Move not-actually shared-code out of shared code
- **[REF] Remove some unused params, move one to where it is used
- **[REF] Extract getOrderParams
- **[REF] Filter params in completetransaction
- **[REF] Fix compatability with Drupal 9 installing of var_dumper
- **[REF] Add test for existing Participant batch update cancel and fix to not
- **[REF] Use helper function to check if multiLingual
- **[REF] Update Versions file and remove Net_URL class as doesn't appear…
- **[REF] Remove Eway Libraries and XML_Util as they are now shipped as p…
- **[REF] Add in css classes to make the save and preview button on the C…
- **[REF] Move daoName generation so we don't need to pass the variable name
- **[REF] Very minor cleanup
- **[REF] Fix Event location to create it's locations directly rather than via
shared methods ((https://github.com/civicrm/civicrm-core/pull/18586))**
- **[REF] Consolidate retrieval of searchFormValues
- **[REF] Include recently added core extensions into distmaker
- **[REF] Extract getFormValues
- **[REF] Remove checks as to whether entityShortName is in the component array
- **[REF] Merge code - Move determination about location type to the
- **[REF] Remove unreachable lines
- **[REF] Remove wrangling on activityType param
- **[REF] Finally remove deprecated ids handling
- **[REF] Update composer compile plugin to latest version
- **(REF) Make it easier for extensions to define basic bundles
- **[REF] Follow up cleanup from Event Location
- **(REF) Switch to composer-compile-lib
- **[REF] Remove XML_Util dependancy within ewaysingle extension
- **Remove long-deprecated hook_civicrm_tabs
- **Remove redundant custom field types
- **Remove unnecessary call to 'validateData' from pdf generator
- **Remove unnecessary debug from tests which messes up array output
- **Remove error handling from loadObjects
- **Remove deprecated code lines
- **Remove CRM_Contact_BAO_Contact::getPrimaryOpenId
- **Remove inaccessible call to baseIPN failed
- **Remove pass-by-ref in PaypalProIPN::single
- **Remove obsolete load-bootstrap.js
- **Remove deprecated ids param
- **Remove unused deprecated handling for partial_amount_to_pay
- **Minor test data fix up - ensure domain contact's email is primary
- **Minor test fix
- **Preliminary cleanup on test
- **Fix test to use validateAllContributions
- **Afform Tests - Fix extension tests when run via `civi-test-run`
- **Test fix - use valid membership type
- **Test cleanup fix
- **[Civi\Test] Fix test output noise
- **[Test framework] Wrong group id in mailing test setup
- **Add test to cover existing v3 api setting of tax_amount on line items
- **Add unit test that ultimately failed to hit the desired code but does add
- **[NFC/Test] Unit test activity-contact variations
- **[NFC/Test] Unit test for target contacts on Bulk Email when mailing in
- **[NFC] Remove trailing whitespace
- **[NFC] Aim to reduce memory usage in create single value alter test by…
- **[NFC/Test framework] Make class name match file name
- **[NFC] Minor cleanup - use strict comparison where possible
- **[NFC] Enable APIv4 Testing on the statusPrefence API Tests
- **[NFC] Clarify what CRM_Price_BAO_Priceset::getMembershipCount does
- **[NFC] Enable APIv4 testing on the Fin ACL Extension Line Item test
- **Enotice fix ((https://github.com/civicrm/civicrm-core/pull/18620))**
- **Enotice fix ((https://github.com/civicrm/civicrm-core/pull/18707))**
- **Update civicrm_handler_field_contact_image.inc
Fixes a notice.
- **Update civicrm_handler_field_pseudo_constant.inc
Fixes a notice.
- **Update composer-download-plugin to v3.0.0 to support usage of composer 2.x
## <a name="credits"></a>Credits
This release was developed by the following code authors:
AGH Strategies - Alice Frumin, Andrew Hunt; Agileware - Justin Freeman; Bastien
Ho; Blackfly Solutions - Alan Dixon; CEDC - Laryn Kragt Bakker; Christian Wach;
Circle Interactive - Pradeep Nayak; CiviCRM - Coleman Watts, Tim Otten;
CiviDesk - Sunil Pawar; CompuCorp - Camilo Rodriguez, Ivan; Coop SymbioTIC -
Mathieu Lutfy; Dave D; iXiam - Luciano Spiegel; JMA Consulting - Monish Deb,
Seamus Lee; John Kingsnorth; Lighthouse Consulting and Design - Brian
Shaughnessy; Megaphone Technology Consulting - Dennis P. Osorio, Jon Goldberg;
MJW Consulting - Matthew Wire; QED42 - Swastik Pareek; Richard van Oosterhout;
Semper IT - Karin Gerritsen; Squiffle Consulting - Aidan Saunders; Tadpole
Collective - Kevin Cristiano; Wikimedia Foundation - Eileen McNaughton
Most authors also reviewed code for this release; in addition, the following
reviewers contributed their comments:
Abeilles en Vélo / Bees on a bike; Artful Robot - Rich Lott; Betty Dolfing;
CiviCoop - Jaap Jansma; CiviCRM - Josh Gowans; CiviDesk - Nicolas Ganivet,
Yashodha Chaku; CompuCorp - René Olivo; Freeform Solutions - Herb van den Dool;
Fuzion - Jitendra Purohit, Luke Stewart; Irene Meisel; JMA Consulting - Joe
Murray; Lemniscus - Noah Miller; MJCO - Mikey O'Toole; Tony Maynard-Smith;
Wikimedia Foundation - Maggie Epps
## <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`.