Development issueshttps://lab.civicrm.org/groups/dev/-/issues2021-09-11T18:57:53Zhttps://lab.civicrm.org/dev/core/-/issues/2828Getting system status message about contributeMode after upgrade to 5.43 when...2021-09-11T18:57:53ZDaveDGetting system status message about contributeMode after upgrade to 5.43 when it seems like it shouldn'tThis only affects master (5.43). You'd only see this on a site that was installed before 5.20 I think.
What seems to be happening is that the text version of the message template was updated in 5.20 at https://github.com/civicrm/civicrm...This only affects master (5.43). You'd only see this on a site that was installed before 5.20 I think.
What seems to be happening is that the text version of the message template was updated in 5.20 at https://github.com/civicrm/civicrm-core/pull/15682/files#diff-5eff848ae038ac430860eb2b822aa501ad7135621221116d204c5ee8ca07fcde, but the corresponding thing that replaces updated templates in the db didn't include a reference to the text version, just the html version: https://github.com/civicrm/civicrm-core/blob/f5eb3977811d1701a3c086f4ca5b34f8d172c958/CRM/Upgrade/Incremental/MessageTemplates.php#L118
So what happens is you still get the status notice since you have an old copy of the text version in the db.
I guess the way to fix this is to add `['name' => 'contribution_online_receipt', 'type' => 'text'],` into MessageTemplates.php numbered at 5.43?5.43.0https://lab.civicrm.org/dev/core/-/issues/2816New contribution can't be saved when validation fails on first try2021-09-17T19:48:05ZDaveDNew contribution can't be saved when validation fails on first try
1. Define a premium product.
1. Contributions - New Contribution
1. Fill out the contact and the amount, but forget, let's say, the financial type.
1. Click save.
1. Ok it warns you and reloads the form.
1. Now pick Donation.
1. Click s...
1. Define a premium product.
1. Contributions - New Contribution
1. Fill out the contact and the amount, but forget, let's say, the financial type.
1. Click save.
1. Ok it warns you and reloads the form.
1. Now pick Donation.
1. Click save.
```
INSERT INTO `civicrm_contribution_product` (`product_id` , `contribution_id` , `fulfilled_date` ) VALUES ( 0 , 96 , NULL ) [nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`dmastercivi_g5lis`.`civicrm_contribution_product`, CONSTRAINT `FK_civicrm_contribution_product_product_id` FOREIGN KEY (`product_id`) REFERENCES `civicrm_product` (`id`) ON DELETE CASCADE)]
```
I'm also getting a variation sometimes about receipt_date. Not sure the exact reproduction steps.
```
INSERT INTO `civicrm_contribution` (`contact_id` , `financial_type_id` , `contribution_page_id` , `payment_instrument_id` , `receive_date` , `total_amount` , `fee_amount` , `net_amount` , `trxn_id` , `invoice_id` , `currency` , `cancel_date` , `cancel_reason` , `receipt_date` , `thankyou_date` , `source` , `is_pay_later` , `contribution_status_id` , `check_number` , `campaign_id` , `creditnote_id` , `tax_amount` ) VALUES ( 193 , 1 , NULL , 4 , 20210903234000 , 12 , 0 , 12 , NULL , NULL , 'USD' , NULL , NULL , 19 , NULL , NULL , 0 , 1 , NULL , NULL , NULL , 0 ) [nativecode=1292 ** Incorrect datetime value: '19' for column `dmastercivi_g5lis`.`civicrm_contribution`.`receipt_date` at row 1]
```5.41.1https://lab.civicrm.org/dev/core/-/issues/2812CiviCRM 5.41.0 - WSOD crash with error PHP message: PHP Fatal error: Uncaught...2021-09-16T10:28:05Zjustinfreeman (Agileware)CiviCRM 5.41.0 - WSOD crash with error PHP message: PHP Fatal error: Uncaught Error: Class 'CRM_Contact_Form_Search_Custom_BaseWhen updating to CiviCRM 5.41.0. Site crashes (WSOD) with error, **PHP message: PHP Fatal error: Uncaught Error: Class 'CRM_Contact_Form_Search_Custom_Base**.
This is due to the **CRM_Contact_Form_Search_Custom_Base** class being moved ...When updating to CiviCRM 5.41.0. Site crashes (WSOD) with error, **PHP message: PHP Fatal error: Uncaught Error: Class 'CRM_Contact_Form_Search_Custom_Base**.
This is due to the **CRM_Contact_Form_Search_Custom_Base** class being moved to the **legacycustomsearches** (core distributed) extension which is not enabled.
A CiviCRM site which has any of the following extensions installed (this is not an exhaustive list) would be impacted:
- nz.co.fuzion.historicmembershipdata
- uk.co.vedaconsulting.gdpr
- org.civicoop.recurringcontributionsearch
- org.civicoop.dataprocessor
Any extension that extends CRM_Contact_Form_Search_Custom_Base would be impacted by this issue.
**Workaround**
The workaround for this issue would be:
1. Before the upgrade
1. Disable each of the extensions that extends CRM_Contact_Form_Search_Custom_Base
1. Perform the upgrade
1. Enable the legacycustomsearches extension
1. Re-enable each of the extensions that extends CRM_Contact_Form_Search_Custom_Base
Agileware Ref: CIVIBLD-2755.41.1https://lab.civicrm.org/dev/core/-/issues/2810CiviCRM A/B Mailing feature broken. CiviCRM now only sends Mailing A to all R...2021-09-18T01:29:49Zjustinfreeman (Agileware)CiviCRM A/B Mailing feature broken. CiviCRM now only sends Mailing A to all Recipients, not a percentage of the recipients. Mailing B and Final Mailing are not sent, they have zero recipients.CiviCRM A/B Mailing feature broken. CiviCRM now only sends Mailing A to all Recipients, not a percentage of the recipients. Mailing B and Final Mailing are not sent, they have zero recipients..
Regardless of whether the Final Mailing is...CiviCRM A/B Mailing feature broken. CiviCRM now only sends Mailing A to all Recipients, not a percentage of the recipients. Mailing B and Final Mailing are not sent, they have zero recipients..
Regardless of whether the Final Mailing is based on Mailing A or Mailing B, **no recipients are set** and the Final Mailing is not sent.
Using CiviCRM 5.40.4
Below is a series of screenshots of each step in the process.
Selecting the target group percentage.
![Screenshot_20210901_162830](/uploads/25ec6235f5b254f2ff7ce5182fd5a0e9/Screenshot_20210901_162830.png)
Mailing A and B scheduled.
![Screenshot_20210901_162944](/uploads/1a60aecd10487b95098cbb9614f7ff95/Screenshot_20210901_162944.png)
Mailing A and B sent.
![Screenshot_20210901_163011](/uploads/b8cac068f85033a31b147794c90d306c/Screenshot_20210901_163011.png)
Final mailing selected and sent.
![Screenshot_20210901_163602](/uploads/6bebe6684f90270063341ac1940aae8d/Screenshot_20210901_163602.png)
Related https://github.com/civicrm/civicrm-core/pull/20093 and dev/core#2100
Agileware Ref: CIVICRM-1828https://lab.civicrm.org/dev/core/-/issues/2807Contribution thank-you letters give Undefined index: contribution when you do...2021-08-31T21:40:26ZDaveDContribution thank-you letters give Undefined index: contribution when you don't have any contribution tokens in the message1. Search for contributions.
1. From actions choose thank-you letter.
1. Don't use any contribution tokens in the message.
```
0 ...\CRM\Contribute\BAO\Contribution.php(5121): "Undefined index: contribution"
1 ...\CRM\Contribute\Form\Ta...1. Search for contributions.
1. From actions choose thank-you letter.
1. Don't use any contribution tokens in the message.
```
0 ...\CRM\Contribute\BAO\Contribution.php(5121): "Undefined index: contribution"
1 ...\CRM\Contribute\Form\Task\PDFLetter.php(311): CRM_Contribute_BAO_Contribution::getContributionTokenValues("69", (Array:0))
2 ...\CRM\Contribute\Form\Task\PDFLetter.php(192): CRM_Contribute_Form_Task_PDFLetter->buildContributionArray(NULL, (Array:1), (Array:0), FALSE, FALSE, (Array:0), "CRM_Contribution_Form_Task_PDFLetterCommon", "****~~~~", FALSE)
3 ...\CRM\Core\Form.php(527): CRM_Contribute_Form_Task_PDFLetter->postProcess()
4 ...\CRM\Core\QuickForm\Action\Upload.php(152): CRM_Core_Form->mainProcess()
5 ...\CRM\Core\QuickForm\Action\Upload.php(119): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Task_PDFLetter), "upload")
6 ...\packages\HTML\QuickForm\Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Task_PDFLetter), "upload")
7 ...\packages\HTML\QuickForm\Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Task_PDFLetter), "upload")
8 ...\CRM\Core\Controller.php(352): HTML_QuickForm_Page->handle("upload")
9 ...\CRM\Core\Invoke.php(313): CRM_Core_Controller->run((Array:3), NULL)
10 ...\CRM\Core\Invoke.php(69): CRM_Core_Invoke::runItem((Array:14))
11 ...\CRM\Core\Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
12 ...\drupal\civicrm.module(458): CRM_Core_Invoke::invoke((Array:3))
13 ...\includes\menu.inc(527): civicrm_invoke("contribute", "task")
14 ...\index.php(21): menu_execute_active_handler()
15 {main}
```5.41.0https://lab.civicrm.org/dev/core/-/issues/2806Contribution custom field tokens are duplicated in the dropdown2021-09-01T23:18:32ZDaveDContribution custom field tokens are duplicated in the dropdownAlso there are a bunch showing up that say "Machine name: xxx".
1. Make a custom field for contributions.
1. Do a search for contributions.
1. From the actions choose thank-you letters.
1. Look in the tokens dropdown. There's duplicates...Also there are a bunch showing up that say "Machine name: xxx".
1. Make a custom field for contributions.
1. Do a search for contributions.
1. From the actions choose thank-you letters.
1. Look in the tokens dropdown. There's duplicates for the custom field and some "Machine Name" entries.
The custom fields seems to be only in master but the machine name stuff is in 5.41.5.42.0https://lab.civicrm.org/dev/core/-/issues/2791Membership start date ignores trxn_date/receive_date gets recalculated to today2021-10-27T08:58:08ZRichMembership start date ignores trxn_date/receive_date gets recalculated to todayOverview
----------------------------------------
https://chat.civicrm.org/civicrm/pl/5bwnarinz7y73nwdjri9oidyno
Reproduction steps
----------------------------------------
Do an Order.create call which includes:
- `receive_date`...Overview
----------------------------------------
https://chat.civicrm.org/civicrm/pl/5bwnarinz7y73nwdjri9oidyno
Reproduction steps
----------------------------------------
Do an Order.create call which includes:
- `receive_date`: `2020-01-01`
- entity `params` in the line item contain `2020-01-01` for `start_date`.
This works, a pending membership is created with the start date of `2020-01-01` but then the subsequent Payment.create which includes the same historical `trxn_date` updates the membership's `start_date` to today.
Expected behaviour
----------------------------------------
Membership start date should take the date of the transaction. (I belive this was the case up to and including 5.39 but not in 5.40)
Environment information
----------------------------------------
buildkit d7 Civi 5.40
Comments
----------------------------------------
<del>This was picked up by the test assertion at
https://lab.civicrm.org/extensions/gocardless/-/blob/main/tests/phpunit/GoCardlessTest.php#L915
After the work is done in
https://lab.civicrm.org/extensions/gocardless/-/blob/main/tests/phpunit/GoCardlessTest.php#L1913
and specifically the Payment.create at
https://lab.civicrm.org/extensions/gocardless/-/blob/main/tests/phpunit/GoCardlessTest.php#L1998
</del>
These tests have been completely rewritten. See https://lab.civicrm.org/extensions/gocardless/-/issues/1235.42.1https://lab.civicrm.org/dev/core/-/issues/2789Print/merge document has awkward filename if activity subject uses non-englis...2021-08-27T02:37:19ZDaveDPrint/merge document has awkward filename if activity subject uses non-english lettersFor example if the activity subject is entered in russian the filename now looks like:
`4hGbFjlOwHfeQx47ozW73rjd7qXWsDCm1BbViImz4fCo37Nu8577jElZKCx9swWWBnjEKX1sGMdMeaOKj6RjlRGZ9kBpgaAdME7LPEFWgV1tJQ01rhiYksubVULNej2OBxuaytIYl6WHe83wtEhb...For example if the activity subject is entered in russian the filename now looks like:
`4hGbFjlOwHfeQx47ozW73rjd7qXWsDCm1BbViImz4fCo37Nu8577jElZKCx9swWWBnjEKX1sGMdMeaOKj6RjlRGZ9kBpgaAdME7LPEFWgV1tJQ01rhiYksubVULNej2OBxuaytIYl6WHe83wtEhb9tMTzmK7HkG0tcCDaqz69UI6rfJdlRZeKRkcU2xckpqNOuKtnXct.pdf`
In french and similar it's not too bad but accents get replaced by `_`, e.g. `reçu` becomes `re_u.pdf`
It's from the use of munge() in https://github.com/civicrm/civicrm-core/pull/21006. It needs something to escape malicious input or avoid invalid filenames, but munge() might not be the best choice here.
That was just merged yesterday so only affects master.5.42.0https://lab.civicrm.org/dev/core/-/issues/2787CiviCRM Scheduled Reminders, Effective Start Date and Effective End Date are ...2021-08-27T05:05:06Zjustinfreeman (Agileware)CiviCRM Scheduled Reminders, Effective Start Date and Effective End Date are incorrectly evaluated if these fields contain a value '0000-00-00 00:00:00'CiviCRM Scheduled Reminders, Effective Start Date and Effective End Date are incorrectly evaluated if these fields contain a value '0000-00-00 00:00:00'. This causes the Scheduled Reminder to **not be sent**, because the Effective Start ...CiviCRM Scheduled Reminders, Effective Start Date and Effective End Date are incorrectly evaluated if these fields contain a value '0000-00-00 00:00:00'. This causes the Scheduled Reminder to **not be sent**, because the Effective Start Date and Effective End Date then are added to the query for the date comparison.
This has been observed on a CiviCRM system where the rows for Scheduled Reminders had values of '0000-00-00 00:00:00' for both the effective_start_date and effective_end_date columns. Using CiviCRM 5.40.1 and MariaDB 10.3.
There is no issue when effective_start_date and effective_end_date has null as the value.
This problem relates to this PR https://github.com/civicrm/civicrm-core/pull/19973
Agileware Ref: CIVICRM-18205.40.4https://lab.civicrm.org/dev/core/-/issues/2786Editing Existing Memberships Fails with PHP Error on non English Installs2021-08-29T18:42:34ZmarkoEditing Existing Memberships Fails with PHP Error on non English InstallsOverview
----------------------------------------
When you try to edit a membership (change dates or source for example) and and save the form there is an error. I tried this on two separate installations, two different versions.
Reprod...Overview
----------------------------------------
When you try to edit a membership (change dates or source for example) and and save the form there is an error. I tried this on two separate installations, two different versions.
Reproduction steps
----------------------------------------
1. Install CiviCRM with install scripts for German or Serbian
2. Add a Membersip
2. Edit a membership and click save
Current behaviour
----------------------------------------
Trows an error (I get from Drupal). TypeError: Return value of CRM_Financial_BAO_Order::getFinancialTypeID() must be of the type int, null returned in CRM_Financial_BAO_Order->getFinancialTypeID() (line 318 of .../sites/all/modules/civicrm/CRM/Financial/BAO/Order.php).
```
CiviCRM 5.39.1, 5.40.3 (still doesn't work, but no error)
PHP 7.3.28
MySQL 5.7.335.41.0https://lab.civicrm.org/dev/core/-/issues/2779OAuth token refresh broken2021-08-24T02:24:55ZufundoOAuth token refresh brokenOverview
----------------------------------------
OAuthSysToken.Refresh api action seems to be broken by recent change to BasicBatchAction Api4 class https://lab.civicrm.org/dev/core/-/commit/29ab318b684a79f4cdedde2bf0417775d4be5523
Re...Overview
----------------------------------------
OAuthSysToken.Refresh api action seems to be broken by recent change to BasicBatchAction Api4 class https://lab.civicrm.org/dev/core/-/commit/29ab318b684a79f4cdedde2bf0417775d4be5523
Reproduction steps
----------------------------------------
1. Enable OAuth module
1. Setup client (Gmail)
1. Add a mail account using that client
1. Click Save & Test
Current behaviour
----------------------------------------
MailStore lookup fails with message 'Expected to find one OAuthClient record, but there were zero. (See log for more details.)'
Error in the log is:
```
[warning] MailSettings: Failed to establish test connection
Array
(
[exception] => API_Exception: "Expected to find one OAuthClient record, but there were zero."
#0 .../sites/all/modules/civicrm/ext/oauth-client/Civi/Api4/Action/OAuthSysToken/Refresh.php(79): Civi\Api4\Generic\Result->single()
#1 .../sites/all/modules/civicrm/ext/oauth-client/Civi/Api4/Action/OAuthSysToken/Refresh.php(54): Civi\Api4\Action\OAuthSysToken\Refresh->getProvider(NULL)
#2 .../sites/all/modules/civicrm/Civi/Api4/Generic/BasicBatchAction.php(72): Civi\Api4\Action\OAuthSysToken\Refresh->doTask((Array:1))
#3 .../sites/all/modules/civicrm/Civi/Api4/Provider/ActionObjectProvider.php(68): Civi\Api4\Generic\BasicBatchAction->_run(Object(Civi\Api4\Generic\Result))
#4 .../sites/all/modules/civicrm/Civi/API/Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Action\OAuthSysToken\Refresh))
#5 .../sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php(232): Civi\API\Kernel->runRequest(Object(Civi\Api4\Action\OAuthSysToken\Refresh))
#6 .../sites/all/modules/civicrm/api/api.php(85): Civi\Api4\Generic\AbstractAction->execute()
#7 .../sites/all/modules/civicrm/ext/oauth-client/CRM/OAuth/MailSetup.php(155): civicrm_api4("OAuthSysToken", "refresh", (Array:3))
#8 .../sites/all/modules/civicrm/ext/oauth-client/oauth_client.php(207): CRM_OAuth_MailSetup::alterMailStore((Array:19))
#9 .../sites/all/modules/civicrm/CRM/Utils/Hook.php(271): oauth_client_civicrm_alterMailStore((Array:19))
#10 .../sites/all/modules/civicrm/CRM/Utils/Hook/DrupalBase.php(73): CRM_Utils_Hook->runHooks((Array:146), "civicrm_alterMailStore", 1, (Array:19), NULL, NULL, NULL, NULL, NULL)
#11 .../sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(237): CRM_Utils_Hook_DrupalBase->invokeViaUF(1, (Array:19), NULL, NULL, NULL, NULL, NULL, "civicrm_alterMailStore")
#12 .../sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(214): Civi\Core\CiviEventDispatcher::delegateToUF(Object(Civi\Core\Event\GenericHookEvent), "hook_civicrm_alterMailStore", Object(Civi\Core\CiviEventDispatcher))
#13 .../sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(44): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:1), "hook_civicrm_alterMailStore", Object(Civi\Core\Event\GenericHookEvent))
#14 .../sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(198): Symfony\Component\EventDispatcher\EventDispatcher->dispatch("hook_civicrm_alterMailStore", Object(Civi\Core\Event\GenericHookEvent))
#15 .../sites/all/modules/civicrm/CRM/Utils/Hook.php(167): Civi\Core\CiviEventDispatcher->dispatch("hook_civicrm_alterMailStore", Object(Civi\Core\Event\GenericHookEvent))
#16 .../sites/all/modules/civicrm/CRM/Utils/Hook.php(1245): CRM_Utils_Hook->invoke((Array:1), (Array:19), NULL, NULL, NULL, NULL, NULL, "civicrm_alterMailStore")
#17 .../sites/all/modules/civicrm/CRM/Mailing/MailStore.php(50): CRM_Utils_Hook::alterMailStore((Array:19))
#18 .../sites/all/modules/civicrm/Civi/Api4/Action/MailSettings/TestConnection.php(28): CRM_Mailing_MailStore::getStore(NULL)
#19 .../sites/all/modules/civicrm/Civi/Api4/Generic/BasicBatchAction.php(72): Civi\Api4\Action\MailSettings\TestConnection->doTask((Array:1))
#20 .../sites/all/modules/civicrm/Civi/Api4/Provider/ActionObjectProvider.php(68): Civi\Api4\Generic\BasicBatchAction->_run(Object(Civi\Api4\Generic\Result))
#21 .../sites/all/modules/civicrm/Civi/API/Kernel.php(149): Civi\Api4\Provider\ActionObjectProvider->invoke(Object(Civi\Api4\Action\MailSettings\TestConnection))
#22 .../sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php(232): Civi\API\Kernel->runRequest(Object(Civi\Api4\Action\MailSettings\TestConnection))
#23 .../sites/all/modules/civicrm/api/api.php(85): Civi\Api4\Generic\AbstractAction->execute()
#24 .../sites/all/modules/civicrm/CRM/Admin/Form/MailSettings.php(214): civicrm_api4("MailSettings", "testConnection", (Array:1))
#25 .../sites/all/modules/civicrm/CRM/Core/Form.php(526): CRM_Admin_Form_MailSettings->postProcess()
#26 .../sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(152): CRM_Core_Form->mainProcess()
#27 .../sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(119): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Admin_Form_MailSettings), "upload")
#28 .../sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Admin_Form_MailSettings), "upload")
#29 .../sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_MailSettings), "upload")
#30 .../sites/all/modules/civicrm/CRM/Core/Controller.php(352): HTML_QuickForm_Page->handle("upload")
#31 .../sites/all/modules/civicrm/CRM/Core/Page/Basic.php(395): CRM_Core_Controller->run()
#32 .../sites/all/modules/civicrm/CRM/Core/Page/Basic.php(140): CRM_Core_Page_Basic->edit(2, 1)
#33 .../sites/all/modules/civicrm/CRM/Core/Invoke.php(313): CRM_Core_Page_Basic->run((Array:3), NULL)
#34 .../sites/all/modules/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem((Array:15))
#35 .../sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#36 .../sites/all/modules/civicrm/drupal/civicrm.module(458): CRM_Core_Invoke::invoke((Array:3))
#37 .../includes/menu.inc(527): civicrm_invoke("admin", "mailSettings")
#38 .../index.php(21): menu_execute_active_handler()
#39 {main}
)
```
Expected behaviour
----------------------------------------
It should successfully connect to the IMAP mail store using OAuth authentication.
Environment information
----------------------------------------
* __CiviCRM:__ _5.40.2_
* __PHP:__ _7.3_
Comments
----------------------------------------
I think this fixes it: https://lab.civicrm.org/ufundo/core/-/commit/19a31b650b618282600c00629b8c6f3b80fadceb5.40.3https://lab.civicrm.org/dev/core/-/issues/2778Error when using search in 'Find and Merge Duplicate Contacts' page2021-08-25T13:27:16ZrupertraphaelError when using search in 'Find and Merge Duplicate Contacts' pageOverview
----------------------------------------
An datatables warning pops up as a result of a error on the server (500) when searching for duplicate contacts (after selecting a rule) in the 'Find and Merge Duplicate Contacts' page.
[...Overview
----------------------------------------
An datatables warning pops up as a result of a error on the server (500) when searching for duplicate contacts (after selecting a rule) in the 'Find and Merge Duplicate Contacts' page.
[Here's the CiviCRM StackExchange Question and it contains the problem and reproduction steps as well.](https://civicrm.stackexchange.com/questions/40157/datatables-warning-in-find-and-merge-page)
Reproduction steps
----------------------------------------
1. Go to the Find and Merge Duplicate Contacts page (route is civicrm/contact/deduperules?reset=1 or access it via Contacts > Find and Merge Duplicate Contacts).
2. Create a new rule for detecting duplicates using their first name and last name only. I added First Name and Last Name as the fields and they have the same weight and the sum of their weights is the Weight Threshold to Consider Contacts 'Matching'. For example, weight treshold for First Name and Last Name is both 1 and the Weight Threshold to Consider Contacts 'Matching' is 2.
![Screen_Shot_2021-08-11_at_1.07.03_PM](/uploads/224e34a79d5a458a19a823e97713920d/Screen_Shot_2021-08-11_at_1.07.03_PM.png)
3. Use the just recently created rule to look for duplicates. For the group, select 'All Contacts'.
![Screen_Shot_2021-08-11_at_1.08.16_PM](/uploads/ac640bbc88657b7910f7a3a028343e87/Screen_Shot_2021-08-11_at_1.08.16_PM.png)
4. Attempt a search using the search bar on the top right of the list of duplicates; you should get the following error:
Current behaviour
----------------------------------------
![Screen_Shot_2021-08-11_at_1.09.57_PM](/uploads/e1b522de4871198f454e55bdded14169/Screen_Shot_2021-08-11_at_1.09.57_PM.png)
![Screen_Shot_2021-08-09_at_2.56.17_PM](/uploads/5bf86d11c03c865b89008ac486ba427b/Screen_Shot_2021-08-09_at_2.56.17_PM.png)
Expected behaviour
----------------------------------------
Should be able to search among list of duplicate contacts.
Environment information
----------------------------------------
https://dmaster.demo.civicrm.org (5.42.alpha1) on Chrome on Mac (Version 92.0.4515.131)
and on our instance: 5.27 on Chrome on Mac (Version 92.0.4515.131).https://lab.civicrm.org/dev/core/-/issues/2777js break on Scheduled Reminder form when SMS provider is present2021-08-24T01:29:02Zjitendrajs break on Scheduled Reminder form when SMS provider is presentTo replicate -
- Add an SMS provider on https://dmaster.demo.civicrm.org/civicrm/admin/sms/provider?reset=1 by installing twilio.
- Open Reminder form in AJAX popup.
- The form looks borked (title & CKEditor missing).
![image](/upload...To replicate -
- Add an SMS provider on https://dmaster.demo.civicrm.org/civicrm/admin/sms/provider?reset=1 by installing twilio.
- Open Reminder form in AJAX popup.
- The form looks borked (title & CKEditor missing).
![image](/uploads/838a54f7668df9649f6a3e07370c9df9/image.png)
Console prints -
![image](/uploads/bb29ca6d2561e37a68b5f613c1e11f1e/image.png)
which seems to be related to this change - https://github.com/civicrm/civicrm-core/pull/202205.40.3https://lab.civicrm.org/dev/core/-/issues/2768APiv4 - where did getLanguage go?2021-08-26T02:06:48ZeileenAPiv4 - where did getLanguage go?I have an api that works on 5.39 but fails on 5.41 which was using `setLanguage` and `getLanguage` by inheritance
```
*
* @package Civi\Api4
*/
class Save extends \Civi\Api4\Generic\AbstractAction {
```
I will probably re-write the ...I have an api that works on 5.39 but fails on 5.41 which was using `setLanguage` and `getLanguage` by inheritance
```
*
* @package Civi\Api4
*/
class Save extends \Civi\Api4\Generic\AbstractAction {
```
I will probably re-write the code making this call & perhaps no-one else will hit it - but I'm a bit mystified at the disappearance5.41.0https://lab.civicrm.org/dev/core/-/issues/2763Caching issue on apiv4 + install2021-08-17T23:07:14ZeileenCaching issue on apiv4 + installI'm hitting issues updating to 5.41 with caching of api entities - the issue is that `init` is being called before the entities are added and then after - but it's early exiting after. I'm not 100% sure why it has changed but it is causi...I'm hitting issues updating to 5.41 with caching of api entities - the issue is that `init` is being called before the entities are added and then after - but it's early exiting after. I'm not 100% sure why it has changed but it is causing fatals when
registering managed entities - even though I check that SearchKit is installed before declaring search displays they fail to install as it failes to find the DAO
I assume this is related to caching work @colemanw did in some way
The issue is occurring with the command
```
cv en --ignore-missing search_kit wmf-civicrm
```
which is including a SearchDisplay but ONLY IF
```
civicrm_api3('Extension', 'getcount', [
'full_name' => 'org.civicrm.search_kit',
'status' => 'installed',
]
```
However, - the newly installed does not have a 'dao' SearchDisplay entity
The back trace is
![image](/uploads/34349b2c6efbf9abf8ac2915b7a98cfa/image.png)
![image](/uploads/3c34136e0b16e67e4e991c5772ac49fe/image.png)https://lab.civicrm.org/dev/core/-/issues/2758Membership Dashboard - Fatal Error starting with 5.41.beta12021-08-18T10:27:08ZkcristianoMembership Dashboard - Fatal Error starting with 5.41.beta1Go to Membership Dashboard - http://wpcvrc.test/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fmember&reset=1
Expected result is seeing recent memberships.
Actual result - Fatal Error
```
[15-Aug-2021 15:01:30 America/New_York] PHP Fatal...Go to Membership Dashboard - http://wpcvrc.test/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fmember&reset=1
Expected result is seeing recent memberships.
Actual result - Fatal Error
```
[15-Aug-2021 15:01:30 America/New_York] PHP Fatal error: Uncaught TypeError: Argument 1 passed to CRM_Core_Task::getTitlesFilteredByPermission() must be of the type array, null given, called in /srv/www/buildkit/wpcvrc/web/wp-content/plugins/civicrm/civicrm/CRM/Member/Task.php on line 154 and defined in /srv/www/buildkit/wpcvrc/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Task.php:204
Stack trace:
#0 /srv/www/buildkit/wpcvrc/web/wp-content/plugins/civicrm/civicrm/CRM/Member/Task.php(154): CRM_Core_Task::getTitlesFilteredByPermission(NULL, true)
#1 /srv/www/buildkit/wpcvrc/web/wp-content/plugins/civicrm/civicrm/CRM/Member/Form/Search.php(126): CRM_Member_Task::permissionedTaskTitles(1)
#2 /srv/www/buildkit/wpcvrc/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(642): CRM_Member_Form_Search->buildQuickForm()
#3 /srv/www/buildkit/wpcvrc/web/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#4 /srv/www/buildkit/wpcvrc/web/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM in /srv/www/buildkit/wpcvrc/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Task.php on line 204
```
This is a regression in the RC as this error does not occur on stable (5.40.1)5.41.0https://lab.civicrm.org/dev/core/-/issues/2756Money - Regression? Edit contribution not possible with "," as decimal separator2021-08-14T03:56:46ZDetlev SieberMoney - Regression? Edit contribution not possible with "," as decimal separatorOverview
----------------------------------------
Money brick has had a large discussion recently.
With 5.40 at least one problem reappeared: If we have "," as decimal separator, saving of edited contribution is not possible - unless yo...Overview
----------------------------------------
Money brick has had a large discussion recently.
With 5.40 at least one problem reappeared: If we have "," as decimal separator, saving of edited contribution is not possible - unless you enter a decimal point instead of comma.
Reproduction steps
----------------------------------------
1. Menu: Administer > Localisation > Languages ...
1. Enter Thousands Separator = "." and Decimal Delimiter = ","
1. Search for a contribution of type donation, click on "edit"
1. Without changing anything, click "save" -> php errors, save won't work
1. Redo step 1 - 3
1. Change total amount to something with "." as decimal delimiter, "save" -> correct amount will be saved.
Current behaviour
----------------------------------------
Saving an amount with the correct decimal delimiter is not possible
Expected behaviour
----------------------------------------
Saving an amount should be possible without hacking the decimal delimiter
Environment information
----------------------------------------
* __CiviCRM:__ This bug was reproducable on CiviCRM 5.40.1. It does not happen on CiviCRM 5.39.0
* __PHP:__ _7.3/7.4_
* __CMS:__ _WordPress_
Comments
----------------------------------------
(none)5.42.0https://lab.civicrm.org/dev/core/-/issues/2749[regression] Free membership pages fail with "No Payment Processor Selected"2021-08-14T03:55:50ZJonGold[regression] Free membership pages fail with "No Payment Processor Selected"This is a regression from wordpress#109/[PR 20929](https://github.com/civicrm/civicrm-core/pull/20929).
A contribution page configured solely to let users sign up for a free membership now fails with "A payment processor configured for ...This is a regression from wordpress#109/[PR 20929](https://github.com/civicrm/civicrm-core/pull/20929).
A contribution page configured solely to let users sign up for a free membership now fails with "A payment processor configured for this page might be disabled (contact the site administrator for assistance)."
The help text for the `is_monetary` box states, "Uncheck this box if you are using this contribution page for free membership signup..." and my understanding is that this has always been a supported configuration.
Reviewing the code, I think the easiest solution is to revert the fix. The alternative would be to determine at load time if a page has any price fields with a potential value > 0.5.40.2https://lab.civicrm.org/dev/core/-/issues/2743Performance regression in API3 related to campaign_id parameter2021-08-21T16:19:45ZPatrick Figelpfigel@greenpeace.orgPerformance regression in API3 related to campaign_id parameterWe found a performance regression related to API3 calls using the `campaign_id` parameter. It was introduced in 5.36 with [this](https://github.com/civicrm/civicrm-core/pull/19633). A particular workload we have (batching in CiviSEPA, wh...We found a performance regression related to API3 calls using the `campaign_id` parameter. It was introduced in 5.36 with [this](https://github.com/civicrm/civicrm-core/pull/19633). A particular workload we have (batching in CiviSEPA, which creates a few thousand contributions) went from 31 minutes to 116 minutes. This is probably due to the fact that `campaign_id` was previously treated as a PseudoConstant with caching, but is now loaded for every call to `_civicrm_api3_validate_integer` for `campaign_id`. This tends to get called a lot for us.
The issue probably only affect sites with a significant number of campaigns (>3k in our case) that create lots of entities linking to those campaigns using API3, so I'm not sure if there's interest in fixing this.
We went with a [simple hack](https://github.com/greenpeace-cee/civicrm-core/commit/dd22eb22e53dcaf0bf5b47c14c616730fe5d1559) where we only bother loading campaign names if the parameter is not an integer as integers are what our batch processes tend to use (though we do have other code where we pass in campaign names, so the original fix is definitely appreciated and necessary :sweat_smile:). I'm not sure if this has any side-effects on deployments that use numeric campaign names for some reason.
We could introduce caching somewhere in that code path, but I don't think there's much precedent for doing that on the API3 level and it feels a bit like I'd be opening the door to cache invalidation hell.5.40.2https://lab.civicrm.org/dev/core/-/issues/2740Contact Dashboard: relationships: wrong links appear if "Pledges" not displayed2021-08-09T20:34:01ZAllenShawContact Dashboard: relationships: wrong links appear if "Pledges" not displayed**Description:**
Very surprising behavior on the Contact Dashboard (q=civicrm/user):
If _Display Preferences_ > _Contact Dashboard_ does not include "Pledges", then the links for each relationship under "Your Contacts / Organizations" ...**Description:**
Very surprising behavior on the Contact Dashboard (q=civicrm/user):
If _Display Preferences_ > _Contact Dashboard_ does not include "Pledges", then the links for each relationship under "Your Contacts / Organizations" will not be the expected links "Edit Contact Information", "Dashboard", and "Disable"; instead those links will be to back-office features "View", "Edit", etc.
Reproduced on dmaster:
![anim](/uploads/c7c1cb008684618c6ab1073984226abf/anim.gif)
**Analysis:**
1. These links are defined in `CRM_Contact_BAO_Relationship::getContactRelationshipSelector()` around [line 2035](https://lab.civicrm.org/dev/core/-/blob/master/CRM/Contact/BAO/Relationship.php#L2035), based on the value of `$params['context']`, which ultimately is taken from $_REQUEST
2. On the Contact Dashboard, the relationships content is built via an xhr call to `/civicrm/ajax/contactrelationships?context=...` which will provide that `context` value; this value is set in Smarty template [templates/CRM/Contact/Page/View/RelationshipSelector.tpl](https://lab.civicrm.org/dev/core/-/blob/master/templates/CRM/Contact/Page/View/RelationshipSelector.tpl#L19) using whatever value is assigned to smarty variable `$context`.
3. This $context variable is assigned to the template as 'user' in [CRM_Core_Form_Search::loadStandardSearchOptionsFromUrl()](https://lab.civicrm.org/dev/core/-/blob/master/CRM/Core/Form/Search.php#L500) based on the value in the controller store, which is set to 'user' in [CRM_Pledge_Page_UserDashboard::listPledges()](https://lab.civicrm.org/dev/core/-/blob/master/CRM/Pledge/Page/UserDashboard.php#L33).
If the Pledges section is not included on the Contact Dashboard, then the value of Smarty variable `$context` is never set; therefore it's empty when passed via xhr to `CRM_Contact_BAO_Relationship::getContactRelationshipSelector()`; therefore that method will use the back-office links for each relationship row, instead of the user-context links that are expected on the Contact Dashboard.
**Possible fix:**
A patch equivalent to this one is solving this problem in local dev, simply by specifying `conteext="user"` in the Contact Dashboard when building the relationships section:
```
diff --git a/CRM/Contact/Page/View/UserDashBoard.php b/CRM/Contact/Page/View/UserDashBoard.php
index 8cba50b..868f0d1 100644
--- a/CRM/Contact/Page/View/UserDashBoard.php
+++ b/CRM/Contact/Page/View/UserDashBoard.php
@@ -132,6 +132,7 @@ class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
$contactRelationships = $selector = NULL;
CRM_Utils_Hook::searchColumns('relationship.columns', $columnHeaders, $contactRelationships, $selector);
$this->assign('columnHeaders', $columnHeaders);
+ $this->assign('context', 'user');
$dashboardElements[] = [
'class' => 'crm-dashboard-permissionedOrgs',
'templatePath' => 'CRM/Contact/Page/View/RelationshipSelector.tpl',
```
However:
1. Before submitting a PR, I'd be curious to hear feedback on what that might break -- i.e., thoughts on where additional test coverage might be warranted.
2. I'm also wondering if there's a better place to set `context`. Seems like it would be safe (and more broadly effective) to define `conteext="user"` throughout the scope of the Contact Dashboard, rather than only when Relationships section is included.5.40.1