# CiviCRM 5.17.0
Released September 4, 2019
- **[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
- **Add unique names and unique title for recurrings.
Adds the key `unique_title` to the entity definition schema for situations where
multiple entities may be involved (e.g advanced search) and disambiguation is
- **Add query dispatcher to allow query modification
Allows a query to be modified from an extension, for example by prepending
data like '/* Query run by user 45*/'.
- **Add support for bulkcreates
Adds a bulkCreate function for CustomField so that one can create multiple
custom fields at the same time. This sets the stage for a new protocol
for how bulk create actions could look from a code point of view.
- **Make admin panels hookable
Adds the hook `alterAdminPanel` to allow extension developers to hide and show
elements on the admin screen.
- **[EXPORT] add getPreview function
Adds a function to allow preview of export results.
- **Export help info does not match code
Improves the export UI when one selects "Merge All Contacts with the Same
Address" so that the field "Postal Greeting (merging > 2 contacts)" reads
"Postal Greeting (when merging contacts)" and the field "Addressee (merging >
2 contacts)" reads "Addressee (when merging contacts)" and the code behind
these fields so that merging greater than 2 contacts or less than 2 contacts
functions the same.
- **Can't show contact subtype in search views
This change ensures that one can use Contact Subtype as a result column in
- **[REPORT] Allow extensions to join address, email and phone tables without
limiting to primary fields
Allows reports to join the address email and phone tables without limiting to
just primary fields and add a test to ensure this functionality stays in
- **Use metadata for getOptions abbreviation & include currency symbol
Refactors the "abbreviation" mode in getOptions to be more consistently
metadata-driven, and adds the currency symbol as an abbreviation to fetch.
- **Error log improvements: Provide severity level and use Civi::log()
Improves the Error Logging functionality ` CRM_Core_Error::debug_var` by
adding an optional severity level parameter and using `Civi::log()`.
- **Move the code to add employer from relationship backoffice form to BAO
Makes it so one can add the employer contact after a current 'Employee of'
relationship is created and adds an optional relationship.create API parameter
- **[METADATA] Add titles to Mapping xml & DAOs
Adds some missing metadata to the Mapping & MappingField entities.
- **Fix support for relative dates in urls
Improves url support for relative dates for fields that have been converted to
- **Add default location for API v3 creates of Address, IM, OpenID and Phone
- **EntityPageTrait: Set logged in contact ID as default if one is not
specified, this allows permission checks etc. to work properly.
Currently the `entitypagetrait` is only in use by
CRM_Contact_Page_View_Relationship. However the plan is to extend it to other
pages too, this PR updates it to get the logged in contact ID if none is
passed in - so it can be used on non-contact forms (eg. event lists).
- **Move log and compilation dirs from "Runtime" to "Paths"
This is an update to the path-handling convention for data folders that allows
more intuitive management of file-paths.
- **Use select2 to display field mappings
On the "Export Options" Screen for the "Use Saved Field Mapping" select field
adds the Description for the option (if one exists).
- **expose smarty's compile_check to be overridden in civicrm.settings.php
Exposes the Smarty variable `compile_force` so that it can be overridden from
civicrm.settings.php because having `compile_force` set to FALSE in some
environments has a positive impact on page rendering performance.
- **[dev/core#538](https://lab.civicrm.org/dev/core/issues/538) Activity search
(advanced search) by subject - is exact match only
Makes searching on some fields (including but not limited to invoice_number,
activity details, activity subject and activity location) do a "Like" search
as opposed to a strict match search consistently whether using the advanced
search or a component specific search.
- **Unable to use url search arguments in 'Advanced Search' using force=1
Adds support for the url search arguments 'contact_tags' and 'email' for the
'Advanced Search' form.
- **Extend contribute search url parsing to advanced search
This change extends the url parameters accepted by the Advanced Search form to
include the search url parameters accepted by the Contribution Search form.
- **Improve performance on getSoftContribution details - only run one query
instead of one per contribution
Improves performance when retrieving bulk contributions.
- **Switch priceset selector to addField method
Switches to adding price set fields using schema metadata instead of hard
- **Set title using standard form method and use for success message on
Switches to using a standard form method for assigning title on the Manage
Contribution page screen so the title can be accessed during postprocess.
- **Improve handling of 'Manage Event' title
Switches to using a standard form method for assigning title on the Manage
Event screen so the title can be accessed during postprocess.
- **Changed the title and description of profile_add_to_group_double_optin
Improves help text by updating the profile_add_to_group_double_optin and
profile_double_optin to have different titles and descriptions.
- **Add serialization metadata for MembershipType api
Adds metadata for serializing the membership_type fields
'relationship_type_id' and 'relationship_direction'.
- **Switch create MembershipPayment to use API
Simplifies and standardizes the creation of a MembershipPayment when using a
"live" payment method.
## <a name="bugs"></a>Bugs resolved
### Core CiviCRM
- **Does CiviCRM make it possible to specify which directories are private and
which are public-accessible?
This deprecates a function which was enabling/complicit in problematic
- **Postal Code Suffix returns Postal Code value
Ensures when the postal code suffix column is displayed it returns the suffix,
before this change the postal code value was displayed.
- **Contact Reference Field Cutoff on Export
Fixes the handling of custom country fields longer than 16 characters when
exporting and improves test coverage.
- **Issue with alterReportVars hook invoke
Switches to invoking alterReportVars hook before grand total and section total
calculations instead of after so that when alterReportVars hook is used to
alter values in report rows those changes are taken into account when
- **Delete repeating activities not working as intended
Ensures that when the user opts to delete multiple repeat activities, the
specified activities are actually deleted.
- **Bad popup on update recurring screen
Ensures that custom data is not loaded on the update subscription form when it
is in self service mode.
- **Count on Groups tab changes when tab is loaded
Fixes a bug where if a contact had been explicitly added to any Smart Groups,
then the number on their Groups tab would not include these Smart Groups until
the tab was loaded.
- **Contact Reference fields are not updated when merging contacts
Ensures when duplicates are merged, custom fields and other records pointing
to the duplicate contact are updated to point to the surviving contact.
- **Regression: Custom searches no longer work
Fixes a regression that broke custom searches in 5.16.
- **Datatables error when viewing contact multiple record custom field tab
containing a file field
Fixes a Datatables error when viewing a contact's multiple record custom field
tab containing a file field because of an uncaught exception and adds a unit
- **Add pptx to safe file types
Ensures the file type 'pptx' is included as an uploadable file type.
- **[Report] Fix handling of location type in Reports
Fixes a bug in the processing of the `location_type_id` field for addresses in
reports. Before this change the array key's name was "is_primary" which led to
showing the location type as either blank or Home which is generally the label
for location type id 1.
- **[Export] Convert testGender Export to new test format.
This change ensures that gender labels longer than 16 characters are supported
- **[EXPORT] Minor fixes to the export form
This improves the export form by only showing enabled contact types and
only showing relevant relationship types for a given contact type.
- **[IMPORT] [code-quality] Remove instances of CRM_Core_Error::fatal from first
import form ((https://github.com/civicrm/civicrm-core/pull/14870))**
Code cleanup towards removing `CRM_Core_Error::fatal` and using
- **Translation 'ts' usage fixes.
Fixes how the gettext 'ts' translation function is called reducing the
number of warnings from the string extraction script.
- **Fix removeNullContactTokens compatibility with custom tokens
Fixes notices and warnings with custom tokens when updating a contact record.
- **Do not launch raw js alert jqueryValidation fails
For sites with Jquery validation turned on disables js alerts.
- **Invalidate smart group cache for group following deletion of group_contact
Ensures that when a contact is removed from a smart group they are removed
from the cache instantly.
- **Ensure that if present the HTTP_X_FORWARDED_FOR IP address is used instead
of the SERVER_ADDR when logging items from the IDS
Ensures the `SERVER_ADDR` is only used if `HTTP_X_FORWARDED_FOR` cannot be.
- **Set profile greeting fields based on actual contact type
Sets greeting options in a profile based on the actual contact type being
edited instead of based off the profile type.
- **Menubar - Improve flexibility & remove hardcoded values
Minor tweak to crm.menubar.js to make it less reliant on the presence of a
`<div id="crm-container">` which may not be present on non-civicrm pages. Also
tweaks the js to remove hardcoded pixel values to work better with theme
- **Use singleton to get session instead of relying on ->_session being set
Calls CRM_Core_Session::singleton() on the `CRM_Profile_Form` instead of
relying on $this->_session being set.
- **Remove the only two defined fonts from selectors
Before this change CiviCRM was setting h3 tags on front end forms to have the
font arial. After this change h3 tags on front end forms inherit their fonts
from the theme (like the rest of the h tags).
- **GenCode, Cache::cleanKey() - Fix deploop during clean initialization
Fixes a bug when running `xml/GenCode.php` with a clean codebase with no DAO
- **e-notice fix & unit test
Fixes an e-notice when a table has been excluded from triggers by a hook.
- **Fatal db error in Activity Summary report when Sorting uses Section Header
- **With logging turned on editing an activity displays as a deletion
- **Regression: Can't use CiviCRM menu on 5.16.0
- **Add missing is_public flags to public paths
- **Fix php7.x warning on count
- **Don't let optiongroup check crash
- **Fix enotice on formatting credit card details
- **Fix obscure bug on updating custom fields (not necessarily hittable via UI)
- **MagicMerge - Fix ephemeral overrides for aliased properties
- **Current employer disappears when disabling expired relationships
- **Case summary report filters incorrectly for case type
Fixes a bug where applying the case type filter in the case summary report
resulted in two case types being reported where only one is selected in the
case type filter.
- **CiviCase singleton activity warning has wrong url
Fixes a bug where if a case type has an activity type (other than open case)
with max_instances set to 1 and a user attempted to create a second activity
of that type for that case type the warning presented to the user would
contain a broken link to edit the existing activity of that type so that the
link works as expected.
- **[dev/core#1133](https://lab.civicrm.org/dev/core/issues/1133) Payment method
name is displayed instead of label in payment block for Manual payment
Ensures the Payment method name is displayed instead of label in payment block
for Manual payment.
- **Bug, cannot import Contributions because the import requires the payment
method, payment instrument ID, not the payment instrument label
- **Editing a financial account pops up a blank new form
- **Contribution page including 2 email fields does not respect dedupe rule.
- **Catch Payment Processor Exception if thrown when registering via back office
- **Fix creation of additional zero value line item when changing fee selection
in edge case ((https://github.com/civicrm/civicrm-core/pull/14589))**
- **Fixed event type id fetch
Fixes a bug where when using the query search the event type id was being
returned as the option_value.id instead option_value.value.
- **Participants having multiple roles affects maximum event registration count
Ensures that Participants having multiple roles does not affect the maximum
event registration count.
- **Allow duplicate backend registration when event has "allow same participant
- **Event Cart: does not save participant custom fields on checkout
- **Event Templates: do not auto-populate the Start Date / End Date
- **Unsubscribe broken if mailing sent to previous mailing recipients with an
excluded group (Work towards
These changes clean up code to set the stage to fix a bug where the
unsubscribe link does not work if a mailing is sent to a list of previous
mailing recipients and excludes a group.
- **Contribution tokens with option values display values, not label
- **Scheduled Reminders for Membership not being sent
Fixes a bug where If you setup a scheduled reminder for memberships based on
the end date, the first reminder would send as expected but if the user
renewed their membership it wouldn't send out another reminder when the
condition became true for the new end date.
- **Fix mishandling of renamed membership status labels on membership import
Fixes a bug that especially affects multilingual sites where the 'Membership
Status' is compared against the 'name' field but not the 'label'.
- **Fix membership end date on confirming a pending contribution
Fixes a bug where if a user created a Membership with a contribution status of
pending for 2 or more terms, recording a payment for that Contribution would
lead to the membership end_date being set incorrectly.
### Backdrop Integration
- **Fix getLoginURL() for Backdrop
Fixes the redirect when an anonymous user goes to `/user` to point to
`/user/login` instead of `/user?destination...`.
### Drupal Integration
- **confirmation screen shows internal profile name not public title (reg screen
shows public title)
Fixes a bug whereby the front end profile title was not being used in event
confirm & thank you screens & confirmation emails.
- **[regression] `cv` fails on CiviCRM 5.15.0
Fixes a call to `languageNegotiationURL` that was causing cv to fail on Drupal
- **Fail more gracefully when attempting to install on PHP 5.x
Raises the `MINIMUM_PHP_VERSION` from 5.6 to 7.0 in the metadata because when
upgrading via drush or Drupal web UI to Civi 5.16+ on PHP 5.6, the Civi
class-loader fails to initialize. The installer is also updated to check the
PHP version before proceeding with the class loader.
- **Migrate CivicrmHelper::parseUrl() to CRM_Utils_System_Drupal8::parseUrl().
Fixes a bug when installing Drupal8 thru the command line.
- **Fix path for civicrm.settings.php when installed in profiles/
Ensures that when CiviCRM is installed in a Drupal distribution profile under
`profiles/<profile_name>/modules/[contrib]`, the function `civicrm_conf_init()`
returns the proper path for file civicrm.settings.php before this change
calling an API using REST would result in a "Could not load the settings
## <a name="misc"></a>Miscellany
- **Changing a civicase activity's label breaks the max_instances check (Begins
work towards [dev/core#1116](https://lab.civicrm.org/dev/core/issues/1116):
- **Update civicrmtheme module to use new isFrontEndPage function on user System
- **Removed hardcoded activity status and used Activity create
- **Extract field wrangling to determineReturnProperties
- **Finish removing references to Config.IDS.ini
- **Convert Navigation cache group to current cache definition system
- **Convert the contact fields cache group to standard cache backend
- **Remove additional custom fields deletegroup functions
- **Add in Deprecation warnings on Cache functons
- **Autoformat /tests directory with php short array syntax
- **Remove use of deprecated path in function
- **Add in Atomfeeds deprecation now that the extension has a new release with
converted cache mechanism
- **Further deprecate use of $ids array in membership functions
- **[IMPORT] reduce php4 support, don't pass by ref when not required
- **[IMPORT] [code-quality] Remove usage of nullArray
- **[IMPORT] [code quality] [REF] Improve readability of variable assignment
- **Remove "Copy Case custom data" code (circa 2013)
- **People tagged with “No Bulk Email (User Opt Out)” seem to be receiving bulk
email (Adds test for
- **Remove deprecated SQL_CALC_FOUND_ROWS
- **Remove unused xml/schema/Event/EventPage.xml
- **Errors exporting contributions on 5.13.2 (unit test for
- **Minor cleanup around invoicing on event code
- **Multilingual test fix and cleanup
- **Updated Circle-Interactive developers info
- **Remove unused standalone-mode code
- **[TEST] [REF] [Export] Convert a couple more tests
- **[REF] [Test] [Export] Convert some more tests to use the newer function
- **[REF] [Export] [Test] Update 2 more tests to use new helper
- **[REF][TEST][EXPORT] minor test cleanup & minor cleanup of code it tests
- **[REF] [TEST] [Export] Update export tests to reflect new format
- **[REF] [EXPORT] [TLA] Update handling of input fields so that the mapping
format is accepted.
- **[NFC] [REF] [TEST] [EXPORT] Update various export tests to test csv output
with new functions
- **[REf] [Export] Remove deprecated componentPaymentFields function
- **[Ref] [Export] Remove exportComponent function - it's not adding much here
- **[REF] [Export] Move writeToTable fn to exportProcessor
- **[REF] [Export] Stop passing header rows around
- **[REF] [Export] Remove now redundant param
- **[REF] [EXPORT] Use columns from processor instead of passing them
- **[REF] [Export] Move temp table creation function to the processor
- **[REF] [Export] Stop passing exportParams & sqlColumns around
- **[REF] [Export] remove another confusing parameter
- **[REF] [Export] Stop passing export params to the merge function
- **[REF] [Export] Simplify setting of address strings
- **[REF] [Export] clean up incorporation of order by & group by into
- **[REF] [Export] More export Structure arrays to processor
- **[REF] [Export] Further cleanup - construct sql more concisely
- **[REF] [Export] move mergeSameAddress to processor class
- **[REF] [Export] further code cleanup
- **[REF] [EXPORT] Alter CRM_Export_BAO_Export::exportComponents
- **[REF] [Export] move build master copy array to ExportProcessor
- **[REF] [Export] Remove code that seems unused
- **[REF] [Export] Move setting of household properties to processor
- **[REF] [Export] Minor code relocation
- **[REF] [Export] Move replace merge tokens to processor class
- **[REF] [EXPORT] Stop passing return Properties
- **[REF] [Export] Move function that parses tokens to address processor
- **[REF] [EXPORT] Minor consolidation of weird mergeSameAddreess nightmare code
- **[REF] [EXPORT] cleanup setting of additional postal fields
- **[REF][Export] Minor cleanup on household merge properties
- **[REF] [EXPORT] partial cleanup on adding fields to returnProperties based on
- **[REF] [export] remove chunk of non-functional code
- **[REF] [export] Cleaner handling of additional return properties
- **[ref] [export] [test] Improve csv test to test final output rather than the
- **[REF] [export] . Move greeting params retrieval to the place in the code
where it is used
- **[REF] [Export] Move fetch Relationship details to processor
- **[REF] [Import] extract function that sets field metadata
- **[REF][Import] very minor cleanup - 3 lines of code to one
- **[REF][Event] Extract calculation of 'zero-ness' in form rule
- **[REF] extract loadSavedMapping
- **[REF] Add in cleanup function to prevnext service and utilise in clea…
- **[REF] Update selfService in updateBilling to use shared function
- **[REF] remove never-set, mispelt parameter
- **[REF] minor code cleanup on import mapping
- **[REF] Move Self service handlng to shared function to allow for use i…
- **[REF] simple extraction of function to check required fields are present
- **[REF] Down with php4 compatibility
- **[REF] Convert contribution_recur dates to datepicker from jcalendar
- **[REF] initial extraction of loading saved mapping to qf format
- **[REF] simplify & add tests on getMappingParams
- **[REF] Update export test to new function
- **[REF] Extract mapping converter function, kinda brutally
- **[REF] export code simplification
- **[REF] Extract saveMapping Field
- **[REF] Remove call to getMappingFields in favour of api call.
- **[REF] un-extract createProportionalFinancialEntities
- **[REF] Move function onto the processor class
- **[REF] Further cleanup & extraction in getMappingFieds
- **[REF] Simple function extraction for buildMappingForm
- **[REF] simple extraction of getFieldAlterSQL
- **[REF] extract portion that creates the custom field record
- **[REF] simple extraction of prepareCreateParams
- **[REF] Cleanup fixSchemaDifferencesFor()
- **[REF] clarify variable (very minor change with good test cover)
- **[REF] Extract CRM_Core_BAO_Mapping::addComponentFields
- **REF Simple cleanup of tabset code for contributionpages
- **[REF] final cleanup - call bulkCreate from migrate_utils
- **[REF] Cleanup up handling of dates for Recurring & Contribution date fields
in query class ((https://github.com/civicrm/civicrm-core/pull/14825))**
- **[REF] Cleanup usage of CRM_Core_BAO_PrevNextCache::setItem and deprec…
- **[REF] [Test] Add test to cover handling of 'gender_id' on import, remove
unused code. ((https://github.com/civicrm/civicrm-core/pull/14879))**
- **[REF] [TEST] cleanup on export activity test
- **[test] Catch A.net exception & ignore
- **[Test] [Import] Add test to demonstrate bug that turns out not to exist
- **Add test for failed payment
- **Add unit test demonstrating attaching a listener to queries
- **[Test] Add test cover for Member_BAO_Query auto_renew field
- **Add unit test for net_amount when fee_amount is set
- **Fix some test leakage
- **[TEST] export - add unit test covering merge to same address addressee
- **[TEST][EXPORT] Improve unit test on export.
- **[NFC] [TEST] Reformat arrays in test classes
- **[NFC] [TEST] code formatting in test class
- **[NFC] reformat class
- **[NFC] Formatting in BAO_Relationship class
- **[NFC] code formatting only
- **[NFC] minor cleanup
- **NFC Update node module versions based on npm audit fix
- **(NFC) Fixing documentation links in readme.
- **[NFC] code reformatting
- **(NFC) VERSIONS.php - Add discussion about how to migrate to composer
- **[NFC] comment fixes, function mis-casing fix
- **[NFC] comment
## <a name="credits"></a>Credits
This release was developed by the following code authors:
AGH Strategies - Andrew Hunt, Eli Lisseck; Agileware - Alok Patel, Justin
Freeman; Australian Greens - Seamus Lee; Circle Interactive - Dave Jenkins, Kirk
Jackson, Pradeep Nayak; CiviCRM - Coleman Watts, Tim Otten; CiviDesk - Yashodha
Chaku; Coop SymbioTIC - Mathieu Lutfy; Dave D; Deepak Srivastava; Electronic
Frontier Foundation - Mark Burdett; Freeform Solutions - Herb van den Dool;
Fuzion - Jitendra Purohit; Giant Rabbit - Peter Haight; Greenpeace CEE - Patrick
Figel; iXiam - Luciano Spiegel; JMA Consulting - Monish Deb; John Kingsnorth;
Lighthouse Design and Consulting - Brian Shaughnessy; Megaphone Technology
Consulting - Jon Goldberg; MillerTech - Chamil Wijesooriya; MJCO - Mikey
O'Toole; MJW Consulting - Matthew Wire; Nicol Wistreich; OSSeed Technologies
LLP - Sushant Paste; Squiffle Consulting - Aidan Saunders; Wikimedia Foundation -
Most authors also reviewed code for this release; in addition, the following
reviewers contributed their comments:
AGH Strategies - Alice Frumin; Agileware - Justin Freeman; CiviCoop - Jaap
Jansma; CiviDesk - Nicolas Ganivet; CompuCorp - Alessandro Verdura; Fuzion -
Luke Stewart; Joseph Lacey; Richard van Oosterhout; Ryan L. Robinson; Skvare -
Mark Hanna; 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`.