CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2022-03-17T18:15:55Zhttps://lab.civicrm.org/dev/core/-/issues/3112Regression on 5.48 upgrade2022-03-17T18:15:55ZeileenRegression on 5.48 upgradeNew upgrade bug ... - I got past it doing https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/crm/civicrm/+/769796/1
- the item that it caught is further down
```
* ERROR USERINFO: SELECT `a`.`id` AS `id`, `a`.`option_group_...New upgrade bug ... - I got past it doing https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/crm/civicrm/+/769796/1
- the item that it caught is further down
```
* ERROR USERINFO: SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`label` AS `label`, `a`.`value` AS `value`, `a`.`name` AS `name`, `a`.`grouping` AS `grouping`, `a`.`filter` AS `filter`, `a`.`is_default` AS `is_default`, `a`.`weight` AS `weight`, `a`.`description` AS `description`, `a`.`is_optgroup` AS `is_optgroup`, `a`.`is_reserved` AS `is_reserved`, `a`.`is_active` AS `is_active`, `a`.`component_id` AS `component_id`, `a`.`domain_id` AS `domain_id`, `a`.`visibility_id` AS `visibility_id`, `a`.`icon` AS `icon`, `a`.`color` AS `color`
FROM a
WHERE (`a`.`option_group_id` = "19") AND (`a`.`name` = "CiviGrant")
[nativecode=1146 ** Table 'civicrm.a' doesn't exist]
* ERROR DEBUGINFO: SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`label` AS `label`, `a`.`value` AS `value`, `a`.`name` AS `name`, `a`.`grouping` AS `grouping`, `a`.`filter` AS `filter`, `a`.`is_default` AS `is_default`, `a`.`weight` AS `weight`, `a`.`description` AS `description`, `a`.`is_optgroup` AS `is_optgroup`, `a`.`is_reserved` AS `is_reserved`, `a`.`is_active` AS `is_active`, `a`.`component_id` AS `component_id`, `a`.`domain_id` AS `domain_id`, `a`.`visibility_id` AS `visibility_id`, `a`.`icon` AS `icon`, `a`.`color` AS `color`
FROM a
WHERE (`a`.`option_group_id` = "19") AND (`a`.`name` = "CiviGrant")
[nativecode=1146 ** Table 'civicrm.a' doesn't exist]
#0 /srv/civi-sites/wmff/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#1 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB.php(997): PEAR_Error->__construct("DB Error: no such table", -18, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#2 /srv/civi-sites/wmff/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-18, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#3 /srv/civi-sites/wmff/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_civirpow), NULL, -18, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...", "DB_Error", TRUE)
#4 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB/common.php(1928): PEAR->__call("raiseError", (Array:7))
#5 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB/mysqli.php(936): DB_common->raiseError(-18, NULL, NULL, "SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...", "1146 ** Table 'civicrm.a' doesn't exist")
#6 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()
#7 /srv/civi-sites/wmff/drupal/sites/default/civicrm/extensions/rpow/DB/civirpow.php(66): DB_mysqli->simpleQuery("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#8 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB/common.php(1234): DB_civirpow->simpleQuery("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#9 /srv/civi-sites/wmff/civicrm/packages/DB/DataObject.php(2696): DB_common->query("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#10 /srv/civi-sites/wmff/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#11 /srv/civi-sites/wmff/civicrm/CRM/Core/DAO.php(468): DB_DataObject->query("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#12 /srv/civi-sites/wmff/civicrm/CRM/Core/DAO.php(1633): CRM_Core_DAO->query("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...", TRUE)
#13 /srv/civi-sites/wmff/civicrm/Civi/Api4/Query/Api4SelectQuery.php(167): CRM_Core_DAO::executeQuery("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#14 /srv/civi-sites/wmff/civicrm/Civi/Api4/Generic/DAOGetAction.php(113): Civi\Api4\Query\Api4SelectQuery->run()
#15 /srv/civi-sites/wmff/civicrm/Civi/Api4/Generic/DAOGetAction.php(101): Civi\Api4\Generic\DAOGetAction->getObjects(Object(Civi\Api4\Generic\Result))
#16 /srv/civi-sites/wmff/civicrm/Civi/Api4/Provider/ActionObjectProvider.php(69): Civi\Api4\Generic\DAOGetAction->_run(Object(Civi\Api4\Generic\Result))
#17 /srv/civi-sites/wmff/civicrm/Civi/API/Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Generic\DAOGetAction))
#18 /srv/civi-sites/wmff/civicrm/Civi/Api4/Generic/AbstractAction.php(234): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
#19 /srv/civi-sites/wmff/civicrm/api/api.php(85): Civi\Api4\Generic\AbstractAction->execute()
#20 /srv/civi-sites/wmff/civicrm/CRM/Upgrade/Incremental/php/FiveFortySeven.php(284): civicrm_api4("OptionValue", "get", (Array:2))
#21 /srv/civi-sites/wmff/civicrm/CRM/Queue/Task.php(73): CRM_Upgrade_Incremental_php_FiveFortySeven::migrateCiviGrant(Object(CRM_Queue_TaskContext))
#22 /srv/civi-sites/wmff/civicrm/CRM/Queue/Runner.php(215): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
RAW Paste Data
* ERROR USERINFO: SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`label` AS `label`, `a`.`value` AS `value`, `a`.`name` AS `name`, `a`.`grouping` AS `grouping`, `a`.`filter` AS `filter`, `a`.`is_default` AS `is_default`, `a`.`weight` AS `weight`, `a`.`description` AS `description`, `a`.`is_optgroup` AS `is_optgroup`, `a`.`is_reserved` AS `is_reserved`, `a`.`is_active` AS `is_active`, `a`.`component_id` AS `component_id`, `a`.`domain_id` AS `domain_id`, `a`.`visibility_id` AS `visibility_id`, `a`.`icon` AS `icon`, `a`.`color` AS `color`
FROM a
WHERE (`a`.`option_group_id` = "19") AND (`a`.`name` = "CiviGrant")
[nativecode=1146 ** Table 'civicrm.a' doesn't exist]
* ERROR DEBUGINFO: SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`label` AS `label`, `a`.`value` AS `value`, `a`.`name` AS `name`, `a`.`grouping` AS `grouping`, `a`.`filter` AS `filter`, `a`.`is_default` AS `is_default`, `a`.`weight` AS `weight`, `a`.`description` AS `description`, `a`.`is_optgroup` AS `is_optgroup`, `a`.`is_reserved` AS `is_reserved`, `a`.`is_active` AS `is_active`, `a`.`component_id` AS `component_id`, `a`.`domain_id` AS `domain_id`, `a`.`visibility_id` AS `visibility_id`, `a`.`icon` AS `icon`, `a`.`color` AS `color`
FROM a
WHERE (`a`.`option_group_id` = "19") AND (`a`.`name` = "CiviGrant")
[nativecode=1146 ** Table 'civicrm.a' doesn't exist]
#0 /srv/civi-sites/wmff/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#1 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB.php(997): PEAR_Error->__construct("DB Error: no such table", -18, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#2 /srv/civi-sites/wmff/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-18, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#3 /srv/civi-sites/wmff/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_civirpow), NULL, -18, 16, (Array:2), "SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...", "DB_Error", TRUE)
#4 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB/common.php(1928): PEAR->__call("raiseError", (Array:7))
#5 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB/mysqli.php(936): DB_common->raiseError(-18, NULL, NULL, "SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...", "1146 ** Table 'civicrm.a' doesn't exist")
#6 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB/mysqli.php(406): DB_mysqli->mysqliRaiseError()
#7 /srv/civi-sites/wmff/drupal/sites/default/civicrm/extensions/rpow/DB/civirpow.php(66): DB_mysqli->simpleQuery("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#8 /srv/civi-sites/wmff/civicrm/vendor/pear/db/DB/common.php(1234): DB_civirpow->simpleQuery("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#9 /srv/civi-sites/wmff/civicrm/packages/DB/DataObject.php(2696): DB_common->query("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#10 /srv/civi-sites/wmff/civicrm/packages/DB/DataObject.php(1829): DB_DataObject->_query("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#11 /srv/civi-sites/wmff/civicrm/CRM/Core/DAO.php(468): DB_DataObject->query("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#12 /srv/civi-sites/wmff/civicrm/CRM/Core/DAO.php(1633): CRM_Core_DAO->query("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...", TRUE)
#13 /srv/civi-sites/wmff/civicrm/Civi/Api4/Query/Api4SelectQuery.php(167): CRM_Core_DAO::executeQuery("SELECT `a`.`id` AS `id`, `a`.`option_group_id` AS `option_group_id`, `a`.`lab...")
#14 /srv/civi-sites/wmff/civicrm/Civi/Api4/Generic/DAOGetAction.php(113): Civi\Api4\Query\Api4SelectQuery->run()
#15 /srv/civi-sites/wmff/civicrm/Civi/Api4/Generic/DAOGetAction.php(101): Civi\Api4\Generic\DAOGetAction->getObjects(Object(Civi\Api4\Generic\Result))
#16 /srv/civi-sites/wmff/civicrm/Civi/Api4/Provider/ActionObjectProvider.php(69): Civi\Api4\Generic\DAOGetAction->_run(Object(Civi\Api4\Generic\Result))
#17 /srv/civi-sites/wmff/civicrm/Civi/API/Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Generic\DAOGetAction))
#18 /srv/civi-sites/wmff/civicrm/Civi/Api4/Generic/AbstractAction.php(234): Civi\API\Kernel->runRequest(Object(Civi\Api4\Generic\DAOGetAction))
#19 /srv/civi-sites/wmff/civicrm/api/api.php(85): Civi\Api4\Generic\AbstractAction->execute()
#20 /srv/civi-sites/wmff/civicrm/CRM/Upgrade/Incremental/php/FiveFortySeven.php(284): civicrm_api4("OptionValue", "get", (Array:2))
#21 /srv/civi-sites/wmff/civicrm/CRM/Queue/Task.php(73): CRM_Upgrade_Incremental_php_FiveFortySeven::migrateCiviGrant(Object(CRM_Queue_TaskContext))
#22 /srv/civi-sites/wmff/civicrm/CRM/Queue/Runner.php(215): CRM_Queue_Task->run(Object(CRM_Queue_TaskContext))
```
```
Mar 11 00:32:00 [warning] Array
(
[entity] => Navigation
[values] => Array
(
[name] => Grant Status
[domain_id] => current_domain
)
)
Array
(
[checkPermissions] =>
[where] => Array
(
[0] => Array
(
[0] => name
[1] => =
[2] => Grant Status
)
[1] => Array
(
[0] => domain_id
[1] => =
[2] => current_domain
)
)
)
```5.47.2https://lab.civicrm.org/dev/core/-/issues/3105Event Registration Confirmation from waitlist crashes payment processors that...2022-06-09T01:23:08ZFrancis (Agileware)Event Registration Confirmation from waitlist crashes payment processors that expect to be able to pull contact information from the doPayment parameters (Stripe via PropertyBag)Overview
----------------------------------------
When a participant returns to the site after moving from the waitlist to a pending status, the contactID parameter is not passed through to the payment processor.
On Stripe in particular...Overview
----------------------------------------
When a participant returns to the site after moving from the waitlist to a pending status, the contactID parameter is not passed through to the payment processor.
On Stripe in particular, this causes the form to crash, payment to not be made, the Participant record to remain in pending from waitlist state, and any additional details entered into the form to be lost.
There's the potential for this to cause problem with other payment processors where contactID is expected to be passed through also.
It seems like this information should be set by the Confirmation form before handing off to the payment processor, so filing as a core bug.
Reproduction steps
----------------------------------------
1. Enable waitlist statuses in CiviCRM
2. Create an Event with Waitlist enabled, setting the payment processor to Stripe
3. Register a "Pending From Waitlist" attendee (e.g. fill the waitlist then try to register one more)
4. Attempt to use the generated link /civicrm/event/register/confirm?reset=1&participantId={id}&cs={checksum}
5. Note that the previously filled details are loaded
6. Fill in all details and confirm the registration
Current behaviour
----------------------------------------
The Form throws up the unfriendly yellow error box with `Property 'contactID' has not been set.`
Trace also appears in CiviCRM.HASH.log:
```
$Fatal Error Details = array:3 [
"message" => "Property 'contactID' has not been set."
"code" => null
"exception" => BadMethodCallException {#12711
#message: "Property 'contactID' has not been set."
#code: 0
#file: "/.../httpdocs/wp-content/plugins/civicrm/civicrm/Civi/Payment/PropertyBag.php"
#line: 291
trace: {
/.../httpdocs/wp-content/plugins/civicrm/civicrm/Civi/Payment/PropertyBag.php:291 {
› }
› throw new \BadMethodCallException("Property '$prop' has not been set.");
› }
}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/Civi/Payment/PropertyBag.php:625 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/ext/com.drastikbydesign.stripe/CRM/Core/Payment/Stripe.php:556 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php:1264 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Event/Form/Registration/Confirm.php:533 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:565 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php:144 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php:43 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:353 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { ...}
/.../httpdocs/wp-content/plugins/civicrm/civicrm.php:1170 { ...}
/.../httpdocs/wp-content/plugins/civicrm/includes/civicrm.basepage.php:366 { ...}
/.../httpdocs/wp-includes/class-wp-hook.php:307 { ...}
/.../httpdocs/wp-includes/class-wp-hook.php:331 { ...}
/.../httpdocs/wp-includes/plugin.php:522 { ...}
/.../httpdocs/wp-includes/class-wp.php:771 { ...}
/.../httpdocs/wp-includes/functions.php:1310 { ...}
/.../httpdocs/wp-blog-header.php:16 { ...}
/.../httpdocs/index.php:17 { ...}
}
}
]
```
Expected behaviour
----------------------------------------
Event registration is confirmed, Payment is received, email is sent, and so on
Environment information
----------------------------------------
* __Browser:__ _Any browser_
* __CiviCRM:__ _5.46.2_ (Did not see any relevant changes in 5.47.0)
* __PHP:__ _7.4_
* __CMS:__ _WordPress 5.9.1_
* __Database:__ _MariaDB 10.3_
* __Web Server:__ _Apache 2.4, Nginx latest docker_
Comments
----------------------------------------
Note that everything works up until the confirmation step.
Agileware Ref: CIVICRM-19355.51.0https://lab.civicrm.org/dev/core/-/issues/3104RC Error: Call to undefined method CRM_Contact_Page_View_Summary::addExpected...2022-03-13T10:28:32Zmagnolia61RC Error: Call to undefined method CRM_Contact_Page_View_Summary::addExpectedSmartyVariables()With the current RC (5.48 beta 1) I get the following fatal error when I want to view a contact record
`Error: Call to undefined method CRM_Contact_Page_View_Summary::addExpectedSmartyVariables() in CRM_Core_BAO_CustomGroup::buildCustom...With the current RC (5.48 beta 1) I get the following fatal error when I want to view a contact record
`Error: Call to undefined method CRM_Contact_Page_View_Summary::addExpectedSmartyVariables() in CRM_Core_BAO_CustomGroup::buildCustomDataView() (line 1986 of /var/www/vhosts/xyz/webroot/sites/all/modules/civicrm/CRM/Core/BAO/CustomGroup.php).`
- CiviCRM: 5.48.beta1
- CMS: Drupal 7.89
- PHP: 7.4.28 (fpm-fcgi)
- Database: 10.6.5-MariaDB-1:10.6.5+maria~bullseye-log engine: InnoDB 10 row format: Dynamic
- Webserver: Apache
- OS: Linux5.48.0https://lab.civicrm.org/dev/core/-/issues/3102Surveys broken in php 82022-03-06T16:02:31ZDaveDSurveys broken in php 8`TypeError: call_user_func(): Argument #1 ($function) must be a valid callback, non-static method CRM_Campaign_Page_AJAX::surveyList() cannot be called statically in CRM_Utils_REST::process() (line 266 of .../web/sites/all/modules/civicr...`TypeError: call_user_func(): Argument #1 ($function) must be a valid callback, non-static method CRM_Campaign_Page_AJAX::surveyList() cannot be called statically in CRM_Utils_REST::process() (line 266 of .../web/sites/all/modules/civicrm/CRM/Utils/REST.php).`
Above error after creating a survey, and the survey doesn't show on the survey dashboard. The error is a bit hidden - you need to look in the network console, or drupal watchdog.5.48.0https://lab.civicrm.org/dev/core/-/issues/3100Grant CiviReport menu inconsistencies2022-03-09T13:47:08ZDaveDGrant CiviReport menu inconsistencies1. On a brand new install without civigrant, there's an empty Reports - CiviGrant menu.
1. If you install civigrant or upgrade from a site that had civigrant, the CiviGrant menu is still empty, and the reports get put under Reports - Con...1. On a brand new install without civigrant, there's an empty Reports - CiviGrant menu.
1. If you install civigrant or upgrade from a site that had civigrant, the CiviGrant menu is still empty, and the reports get put under Reports - Contact Reports.
There's two things I think:
1. Some leftovers in the xml files from before. Should be an easy fix.
1. Even if that's fixed, where _should_ the extension's reports live in the menu?5.47.1https://lab.civicrm.org/dev/core/-/issues/3095Formatting shows Currency for samey-locales2022-03-05T14:09:10ZeileenFormatting shows Currency for samey-localesThe switch to BrickMoney has the positive impact of adding a currency for the non-site-default locale - so for a US site NZ donations would be prefixed with NZ.
However, it turns out it is pretty common for NZ sites to leave the site la...The switch to BrickMoney has the positive impact of adding a currency for the non-site-default locale - so for a US site NZ donations would be prefixed with NZ.
However, it turns out it is pretty common for NZ sites to leave the site language as en_US as no other English variants are offered without the translation install...
![image](/uploads/7a814b43db89c9c100b4cbd7c9ccd528/image.png)
We discussed this & think that the remedy is to add a new setting
format_locale
If set this will be used for money formatting INSTEAD of thousand separator and decimal separator - ie those will be determinted from the format_locale and we will hide those settings in the UI and deprecate them. Over time we will encourage people to switch. This setting can also be used for dates5.47.0https://lab.civicrm.org/dev/core/-/issues/3094Contribution view page crashes if you don't have event permissions2022-03-08T00:10:22ZDaveDContribution view page crashes if you don't have event permissionshttps://github.com/civicrm/civicrm-core/pull/22732 adds info about participants to the page but the api call throws an exception if you don't have permissions. I think I'll just put up a PR to wrap in a try/catch and then not display the...https://github.com/civicrm/civicrm-core/pull/22732 adds info about participants to the page but the api call throws an exception if you don't have permissions. I think I'll just put up a PR to wrap in a try/catch and then not display the participant stuff if error.5.48.0https://lab.civicrm.org/dev/core/-/issues/3093Upgrade error with civigrant - order of dependencies matters2022-03-07T22:15:00ZDaveDUpgrade error with civigrant - order of dependencies matters1. Install an older version of civi. Let's say 5.39 but I don't think it matters too much.
1. Enable the CiviGrant component.
1. **Don't** install search kit.
1. Upgrade. You'll see a message about "extension error" that looks like this....1. Install an older version of civi. Let's say 5.39 but I don't think it matters too much.
1. Enable the CiviGrant component.
1. **Don't** install search kit.
1. Upgrade. You'll see a message about "extension error" that looks like this. So far not a problem, but note the order of dependencies listed. The average person will now attempt to install `Form Core` first.
![Untitled2](/uploads/84a1e72d59998ab8fc392187e72a5d29/Untitled2.png)
1. NO! You must install search kit first. Otherwise you get `API error: API (SearchDisplay, create) does not exist (join the API team and implement it!) on SearchDisplay.create`.
Note that this is slightly different from https://lab.civicrm.org/dev/core/-/issues/3036 (PR https://github.com/civicrm/civicrm-core/pull/22623) which dealt with interdependence between form builder and search kit, and the order there doesn't matter.5.47.0https://lab.civicrm.org/dev/core/-/issues/3087CiviGrant appears in admin menu twice2022-03-01T01:07:07ZDaveDCiviGrant appears in admin menu twiceI think it's maybe some leftovers in xml/templates/civicrm_navigation.tpl that need to be moved over/removed.I think it's maybe some leftovers in xml/templates/civicrm_navigation.tpl that need to be moved over/removed.5.47.0https://lab.civicrm.org/dev/core/-/issues/3085Checkbox fields on profile admin page can't be unchecked2022-03-09T20:27:07ZspalmstromCheckbox fields on profile admin page can't be uncheckedOverview
----------------------------------------
Once mapping is enabled for a profile, you cannot disable it.
Reproduction steps
----------------------------------------
1. Click on **Administer -> Custom Data and Screens -> Profiles...Overview
----------------------------------------
Once mapping is enabled for a profile, you cannot disable it.
Reproduction steps
----------------------------------------
1. Click on **Administer -> Custom Data and Screens -> Profiles **.
1. Select **Name and Address -> Settings**.
1. Click on **Advanced Settings**.
1. Click the _Enable Mapping for this profile?_ box.
1. Click on **Save**.
1. Repeat steps 2 to 4, thus clearing the _Enable Mapping_ checkbox.
1. Click on **Save**.
1. Repeat steps 2 and 3.
1. You will see that the mapping box remains ticked.
Current behaviour
----------------------------------------
The mapping box remains ticked.
`
Expected behaviour
----------------------------------------
The mapping box should remain clear when it has been cleared before saving.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is necessary. -->
* __MS Edge__ but probably not relevant.
* __CiviCRM:__ _5.48.alpha1/5.46.2_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ 7.3.33-1+0\~20211119.91+debian10~1.gbp618351/7.4__ but probably not relevant.
* __CMS:__ _Whatever the Sandbox runs under/Drupal 9.3.6_ but probably not relevant.
* __Database:__ _Whatever the Sandbox runs under/MySQL 8.x_ but probably not relevant.
* __Web Server:__ _Whatever the Sandbox runs under/IIS 10_ but probably not relevant.
Comments
----------------------------------------
This makes it impossible to turn off mapping. Note that I reproduced this on the Sandbox.5.49.0https://lab.civicrm.org/dev/core/-/issues/3084Backend membership with a price set will ignore the price field financial typ...2022-05-05T06:27:07ZherbdoolBackend membership with a price set will ignore the price field financial type, uses price set insteadOverview
----------------------------------------
Backend membership with a price set will ignore the price field financial type, uses price set instead. (This is a different problem from https://lab.civicrm.org/dev/core/-/issues/3083 t...Overview
----------------------------------------
Backend membership with a price set will ignore the price field financial type, uses price set instead. (This is a different problem from https://lab.civicrm.org/dev/core/-/issues/3083 though they should be consistent).
Related to https://lab.civicrm.org/dev/core/-/issues/3084, https://lab.civicrm.org/dev/core/-/issues/2414
Reproduction steps
----------------------------------------
1. Set up a price set to include memberships.
2. One price field should be membership of financial type Member Dues. The other Donation.
![2022-02-25_14.17.49_dev-cycleto.pantheonsite.io_edb775bf4afb](/uploads/baab97de74fc3910e4a016138db06c98/2022-02-25_14.17.49_dev-cycleto.pantheonsite.io_edb775bf4afb.png)
3. Make a backend membership purchase.
Current behaviour
----------------------------------------
The contribution will show that each line item gets the financial type from the price set and not from the price set field:
![2022-02-25_14.16.03_dev-cycleto.pantheonsite.io_372ee7ffbad1](/uploads/1f8a227ce02fb8c0d1b28a707ada8af0/2022-02-25_14.16.03_dev-cycleto.pantheonsite.io_372ee7ffbad1.png)
And it doesn't set the non-deductible amount properly. In fact, I don't think it's set either way. If I change the price set financial type to be Merchandise then it still doesn't set the non-deductible.
![2022-02-25_14.25.54_dev-cycleto.pantheonsite.io_ad7e30a61562](/uploads/4b22eafeeca74ee89f60918102bed234/2022-02-25_14.25.54_dev-cycleto.pantheonsite.io_ad7e30a61562.png)
Expected behaviour
----------------------------------------
Should use the financial type of the price set *field/option*. And it should set the non-deductible based on that. This is how it's working for a non-member price set: it will use the price field financial type and non-deductible amount regardless of what the price set is using.5.49.0https://lab.civicrm.org/dev/core/-/issues/3082Enhance EntityRef to widget to show create new option when contacts are restr...2022-03-09T13:47:08ZKurund JalmiEnhance EntityRef to widget to show create new option when contacts are restricted by multiple contact type## Current behavior
Below code works fine and shows `create new` option when contacts are restricted by single contact type.
```php
$this->addEntityRef('my_field', ts('Select Contact'), [
'api' => [
'params' => ['contact_type' =>...## Current behavior
Below code works fine and shows `create new` option when contacts are restricted by single contact type.
```php
$this->addEntityRef('my_field', ts('Select Contact'), [
'api' => [
'params' => ['contact_type' => 'Organization'],
],
'create' => TRUE,
]);
```
However, when contacts are restricted by multiple contacts `create new` option is not available
```php
$this->addEntityRef('my_field', ts('Select Contact'), [
'api' => [
'params' => ['contact_type' => ['IN' => ["Individual", "Organization"]]]
],
'create' => TRUE,
]);
```
## Expected behavior
- It should show create new options for Individual and Organization.5.49.0https://lab.civicrm.org/dev/core/-/issues/3080Duplicate Billing location checkbox for a contact is allowed during inline ad...2022-04-07T20:59:16ZVangelisPDuplicate Billing location checkbox for a contact is allowed during inline address editingOverview
----------------------------------------
In the case that someone has 2 addresses registered, they can flag both of them as billing location via the inline address editing checkbox which I believe is wrong. This behaviour does n...Overview
----------------------------------------
In the case that someone has 2 addresses registered, they can flag both of them as billing location via the inline address editing checkbox which I believe is wrong. This behaviour does not replicate when you edit the contact.
I am assuming that this is not an intended behaviour.
Reproduction steps
----------------------------------------
1. On the [CiviCRM demo site](https://dmaster.demo.civicrm.org) go to the default `demo@example.com` contact.
1. Do an inline edit and add an address. Check the checkbox "Billing location for this contact".
1. Add a 2nd address via inline editing and check again the checkbox "Billing location for this contact" on the 2nd address.
1. Review both addresses, both got the "Billing location for this contact".
1. Try to edit the contact using the edit button, check both checkboxes and save the form. Only one address gets the checkbox "Billing location for this contact".
Expected behaviour
----------------------------------------
There should be a validation while saving the inline address form to check if the checkbox is already being used in another address ID and if yes, it should not store the checkbox (or unset it).5.49.0https://lab.civicrm.org/dev/core/-/issues/3077case xml processor skips pre hook when creating roles/relationships2022-02-26T15:18:41Zlcdwebcase xml processor skips pre hook when creating roles/relationshipsWhile trying to implement some custom modifications to case roles when a case is created, I found that the relationship creation is not passed through the pre/post hooks. This is because the XML Processor does a direct DAO insertion, rat...While trying to implement some custom modifications to case roles when a case is created, I found that the relationship creation is not passed through the pre/post hooks. This is because the XML Processor does a direct DAO insertion, rather than using the BAO add() method.
See:
https://github.com/civicrm/civicrm-core/blob/master/CRM/Case/XMLProcessor/Process.php#L248
I think this can be safely swapped for CRM_Contact_BAO_Relationship::add(). But looking for others to provide input.5.48.0lcdweblcdwebhttps://lab.civicrm.org/dev/core/-/issues/3072Proposal: Remove time component from the {contribution.receive_date} token2022-03-31T22:47:07ZDaveDProposal: Remove time component from the {contribution.receive_date} tokenOr provide an alternate token, or at least handle it with smarty in the stock workflow templates. It used to do the latter prior to 5.47: https://github.com/civicrm/civicrm-core/pull/22560/files#diff-fd5668d5492e5f0ec55b7f8a10eccfa4ea9de...Or provide an alternate token, or at least handle it with smarty in the stock workflow templates. It used to do the latter prior to 5.47: https://github.com/civicrm/civicrm-core/pull/22560/files#diff-fd5668d5492e5f0ec55b7f8a10eccfa4ea9de249e4cf2383a2e0d36dbd92ebe0R154
Not marking regression because the token itself isn't a regression and the use in the template is for new installs.5.48.0https://lab.civicrm.org/dev/core/-/issues/3071Child Groups incorrectly show extra table cell on Manage Groups screen2022-02-17T14:12:43ZhaystackChild Groups incorrectly show extra table cell on Manage Groups screenOverview
----------------------------------------
Since [this commit in CiviCRM 5.45](https://github.com/civicrm/civicrm-core/pull/22084) Child Groups incorrectly show extra table cell on Manage Groups screen when CiviCRM is not in Multi...Overview
----------------------------------------
Since [this commit in CiviCRM 5.45](https://github.com/civicrm/civicrm-core/pull/22084) Child Groups incorrectly show extra table cell on Manage Groups screen when CiviCRM is not in Multisite mode. The problem is that `showOrgInfo` is set to `(string) "0"` and is therefore not empty in when [tested in the template](https://github.com/civicrm/civicrm-core/blob/afc3a25afd92dbda09e4b708f3ac943640286d01/templates/CRM/Group/Form/Search.tpl#L257).
Reproduction steps
----------------------------------------
1. Create a Child Group
1. Open Parent Group discovery tab
1. Table spills out of container with extra `null` cell
Current behaviour
----------------------------------------
![Screenshot_2022-02-15_at_12.07.38](/uploads/3404bb0098caac554e63edb176dcbf01/Screenshot_2022-02-15_at_12.07.38.png)
Expected behaviour
----------------------------------------
![Screenshot_2022-02-15_at_12.08.05](/uploads/6eb6a8d60cdcc51a66f0bfa8ba1f041b/Screenshot_2022-02-15_at_12.08.05.png)
Comments
----------------------------------------
PR to follow.5.48.0https://lab.civicrm.org/dev/core/-/issues/3069Grant fields are included in exports in the Contact grouping2024-03-08T00:10:30ZDaveDGrant fields are included in exports in the Contact groupingGo to e.g. find contacts or find activities and from the results pick some or all and choose Export from the actions dropdown. Choose select fields for export. In the Contacts grouping, CiviGrant fields are being included there. I don't ...Go to e.g. find contacts or find activities and from the results pick some or all and choose Export from the actions dropdown. Choose select fields for export. In the Contacts grouping, CiviGrant fields are being included there. I don't remember seeing this before but will double-check if that's where they used to show up.5.47.0https://lab.civicrm.org/dev/core/-/issues/3066Error cancelling a contribution if CiviPledge is disabled2022-02-17T03:43:10ZIan WilsonError cancelling a contribution if CiviPledge is disabledOverview
----------------------------------------
If the CiviPledge component is disabled, changing a contribution's status to "Cancelled" will throw an error.
Reproduction steps
----------------------------------------
1. Disable CiviP...Overview
----------------------------------------
If the CiviPledge component is disabled, changing a contribution's status to "Cancelled" will throw an error.
Reproduction steps
----------------------------------------
1. Disable CiviPledge at /civicrm/admin/setting/component?reset=1
1. Create a contribution
1. Edit the contribution and set the status to "Cancelled"
1. Save
Comments
----------------------------------------
When trying to cancel through the UI, the ajax spinner will keep going. If you refresh page the contribution status will be updated.
I tried cancelling the contribution through the APIv4 browser and it throws this error: "PledgePayment API is not available because CiviPledge component is disabled".
The culprit seems to be `disconnectPledgePaymentsIfCancelled()` that is called by `CRM_Contribute_BAO_Contribution::create()`. It makes an APIv4 call for PledgePayment but doesn't take the status of the component into account.
Environment information
----------------------------------------
* __CiviCRM:__ _5.46.1_5.47.0https://lab.civicrm.org/dev/core/-/issues/3063Foreign constraint violation on APIv3 contribution create if financial_type_i...2022-02-16T21:27:08ZIan WilsonForeign constraint violation on APIv3 contribution create if financial_type_id is numericOverview
----------------------------------------
We have a lot of numeric financial types. On the new ESR (and also the dmaster site), attempts to create contributions via APIv3 are failing.
Reproduction steps
-------------------------...Overview
----------------------------------------
We have a lot of numeric financial types. On the new ESR (and also the dmaster site), attempts to create contributions via APIv3 are failing.
Reproduction steps
----------------------------------------
1. Go to /civicrm/api3/#explorer
1. Select "FinancialType" for entity and "create" for action.
1. Fill in a numeric value (e.g. 1234) for Financial Type Value and click Execute.
1. Reload the page.
1. Select "Contribution" for entity and "create" for action.
1. Select your newly created Financial Type ID from the list and fill in anything for other values.
1. Click Execute.
Current behaviour
----------------------------------------
The financial_type_id parameter accepts the financial type name (e.g. "Event Fee"). However, if the provided value is a number, it appears that the resulting SQL query attempts to use the number directly instead of looking up the associated key.
On the dmaster website the following query (via APIv3 explorer):
```php
$result = civicrm_api3('Contribution', 'create', [
'financial_type_id' => 1234,
'receive_date' => "2022-02-08",
'total_amount' => 50,
'contact_id' => "user_contact_id",
]);
```
produces the following result:
```json
{
"code": -3,
"error_message": "DB Error: constraint violation",
"mode": 16,
"debug_info": "INSERT INTO `civicrm_contribution` (`contact_id` , `financial_type_id` , `payment_instrument_id` , `receive_date` , `total_amount` , `fee_amount` , `net_amount` , `currency` , `contribution_status_id` , `tax_amount` ) VALUES ( 204 , 1234 , 4 , 20220208000000 , 50 , 0 , 50 , 'USD' , 1 , 0 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`dmastercivi_g5lis`.`civicrm_contribution`, CONSTRAINT `FK_civicrm_contribution_financial_type_id` FOREIGN KEY (`financial_type_id`) REFERENCES `civicrm_financial_type` (`id`))]",
"type": "DB_Error",
"user_info": "INSERT INTO `civicrm_contribution` (`contact_id` , `financial_type_id` , `payment_instrument_id` , `receive_date` , `total_amount` , `fee_amount` , `net_amount` , `currency` , `contribution_status_id` , `tax_amount` ) VALUES ( 204 , 1234 , 4 , 20220208000000 , 50 , 0 , 50 , 'USD' , 1 , 0 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`dmastercivi_g5lis`.`civicrm_contribution`, CONSTRAINT `FK_civicrm_contribution_financial_type_id` FOREIGN KEY (`financial_type_id`) REFERENCES `civicrm_financial_type` (`id`))]",
"to_string": "[db_error: message=\"DB Error: constraint violation\" code=-3 mode=callback callback=CRM_Utils_REST::fatal prefix=\"\" info=\"INSERT INTO `civicrm_contribution` (`contact_id` , `financial_type_id` , `payment_instrument_id` , `receive_date` , `total_amount` , `fee_amount` , `net_amount` , `currency` , `contribution_status_id` , `tax_amount` ) VALUES ( 204 , 1234 , 4 , 20220208000000 , 50 , 0 , 50 , 'USD' , 1 , 0 ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`dmastercivi_g5lis`.`civicrm_contribution`, CONSTRAINT `FK_civicrm_contribution_financial_type_id` FOREIGN KEY (`financial_type_id`) REFERENCES `civicrm_financial_type` (`id`))]\"]",
"is_error": 1
}
```
Using a text value produces a similar example query:
```php
$result = civicrm_api3('Contribution', 'create', [
'financial_type_id' => "Event Fee",
'receive_date' => "2022-02-08",
'total_amount' => 50,
'contact_id' => "user_contact_id",
]);
```
and the result is successful:
```json
{
"is_error": 0,
"version": 3,
"count": 1,
"id": 116,
"values": {
"116": {
"id": "116",
"contact_id": "204",
"financial_type_id": "4",
"contribution_page_id": "",
"payment_instrument_id": "4",
"receive_date": "20220208000000",
"non_deductible_amount": "",
"total_amount": "50",
"fee_amount": "0",
"net_amount": "50",
"trxn_id": "",
"invoice_id": "",
"invoice_number": "",
"currency": "USD",
"cancel_date": "",
"cancel_reason": "",
"receipt_date": "",
"thankyou_date": "",
"source": "",
"amount_level": "",
"contribution_recur_id": "",
"is_test": "",
"is_pay_later": "",
"contribution_status_id": "1",
"address_id": "",
"check_number": "",
"campaign_id": "",
"creditnote_id": "",
"tax_amount": "0",
"revenue_recognition_date": "",
"is_template": "",
"contribution_type_id": "4"
}
}
}
```
Environment information
----------------------------------------
* __CiviCRM:__ _Master/5.45.35.46.2https://lab.civicrm.org/dev/core/-/issues/3060Deprecated function error in Custom Searches.2022-02-12T15:27:15ZspalmstromDeprecated function error in Custom Searches.Overview
----------------------------------------
This message appears when opening some custom searches, e.g. _Household Name and State._
```
User deprecated function: Attributes passed to CRM_Core_Form::add() are not an array. Caller: ...Overview
----------------------------------------
This message appears when opening some custom searches, e.g. _Household Name and State._
```
User deprecated function: Attributes passed to CRM_Core_Form::add() are not an array. Caller: CRM_Contact_Form_Search_Custom_Sample::buildForm in CRM_Core_Error::deprecatedWarning() (line 1059 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Error.php).
```
Similar errors occur in _Zip Code Range_ and _Custom Group Multiple Values Listing_
This is not the same as https://lab.civicrm.org/dev/core/-/issues/3051
Reproduction steps
----------------------------------------
1. Click on **Search -> Custom Searches**.
1. Click on **Household Name and State**.
1. This message appears:
![image](/uploads/2f25708d09bcf4a82d224c970d43d825/image.png)
Current behaviour
----------------------------------------
_What happens currently. Please provide error messages, screenshots or gifs ([LICEcap](http://www.cockos.com/licecap/), [SilentCast](https://github.com/colinkeenan/silentcast)) where appropriate._
```
User deprecated function: Attributes passed to CRM_Core_Form::add() are not an array. Caller: CRM_Contact_Form_Search_Custom_Sample::buildForm in CRM_Core_Error::deprecatedWarning() (line 1059 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Error.php).
```
Expected behaviour
----------------------------------------
_What should happen._
The message shouldn't appear.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is necessary. -->
* __Browser:__ _Microsoft Edge_ but probably not relevant.
* __CiviCRM:__ _5.48.alpha1/5.46.0/..._ The former is the demo site.
* __PHP:__ _7.3.33-1+0\~20211119.91+debian10\~1.gbp618351/8.0/7.4...__ but probably not relevant.
* __CMS:__ _Drupal <whatever runs the demo site>/Drupal 9.3.5/..._ but probably not relevant.
* __Database:__ _Whatever runs the demo site/MySQL 8.0.28/..._ but probably not relevant.
* __Web Server:__ _Whatever runs the demo site/IIS 10/..._ but probably not relevant.
Comments
----------------------------------------
_Anything else you would like the reviewer to note._
I did some investigation. The problem in _Household Name and State_ is caused by these lines in
```
<drupal root>/vendor/civicrm/civicrm-core/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Sample.php
```
Lines 51 - 54 in 5.46.0
```
$form->add('text',
'household_name',
ts('Household Name'),
TRUE
);
```
The fourth parameter (TRUE) is not an array, but unless the type is 'static', expects the attribute (fourth parameter) to be an array.
```
<drupal root>/vendor/civicrm/civicrm-core/CRM/Core/Form.php
```
These lines solve the problem.
```
$attrib[] = TRUE;
$form->add('text',
'household_name',
ts('Household Name'),
$attrib
);
```
In _Zip Code Range_ the offending lines are 48 - 58 in:
```
<drupal root>/vendor/civicrm\/civicrm-core/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ZipCodeRange.php
```
```
$form->add('text',
'postal_code_low',
ts('Postal Code Start'),
TRUE
);
$form->add('text',
'postal_code_high',
ts('Postal Code End'),
TRUE
);
```
In _Custom Group Multiple Values Listing_ the offending line is 90 in
```
<drupal root>/vendor/civicrm/civicrm-core/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/MultipleValues.php
```
```
$form->add('text', 'sort_name', ts('Contact Name'), TRUE);
```
I haven't attempted a PR as I get updates via Composer as opposed to using Git, but thought I should report it anyway. It may be that someone is already working on this.5.48.0