CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-12-12T19:08:26Zhttps://lab.civicrm.org/dev/core/-/issues/4556"Check number" field isn't shown on Pending check payments (workaround exists)2023-12-12T19:08:26ZAllenShaw"Check number" field isn't shown on Pending check payments (workaround exists)(Similar to behavior described in https://lab.civicrm.org/dev/core/-/issues/60)
**One way to repro this on dmaster.demo.civicrm.org:**
1. Log in and navigate to any contact record.
2. Create and save a contribution with these attributes...(Similar to behavior described in https://lab.civicrm.org/dev/core/-/issues/60)
**One way to repro this on dmaster.demo.civicrm.org:**
1. Log in and navigate to any contact record.
2. Create and save a contribution with these attributes:
- Status: Pending
- Payment method: Check
3. Observe this contribution is displayed in the contact's Contributions tab.
4. Open the contribution for viewing, and select the "Record Payment" link or button; this opens the New Payment form.
5. In the New Payment form, observe that the Payment Method is pre-selected as "Check".
6. Observe expected vs actual (bad) behavior:
- Expected behavior: Because the Payment Method is "Check", the field "Check Number" should be displayed for data entry
- **Actual (bad) behavior:** "Check Number" field is not displayed.
**Workaround:**
Continuing from Step 6 above: Change the Payment Method to anything other than "Check", then change it back to "Check". Observe that the "Check Number" field is now available for data entry.
Screencap of problem and workaround from dmaster.demo.civicrm.org today:
![anim](/uploads/f951056d3c2c0c91aaff0d6f17a8b1b4/anim.gif)
(Joinery reference: F#1220)https://lab.civicrm.org/dev/core/-/issues/4484Feature request: New contact buttons on the API 4 autocomplete widget2023-11-01T18:20:41ZbrienneFeature request: New contact buttons on the API 4 autocomplete widgetOverview
----------------------------------------
For using the APIv4 autocomplete widget, such as for the *Existing Contact* field, it would be useful to be able to create new contacts, as is possible with the Select2 drop downs, such a...Overview
----------------------------------------
For using the APIv4 autocomplete widget, such as for the *Existing Contact* field, it would be useful to be able to create new contacts, as is possible with the Select2 drop downs, such as for selecting a Contributor on a backend contribution.
![Selection_015](/uploads/30fc0ecdd3268ebc5906ce0aa06dae9a/Selection_015.png)
Example use-case
----------------------------------------
1. Add the *Existing Contact* field to a FormBuilder form
1. A user can look up a contact to select, but if there are no results/a new one is needed, they can click a **New Individual** button to add one without being redirected from the original form
Current behaviour
----------------------------------------
The APIv4 autocomplete widget does not allow for creating new contacts.
![Selection_014](/uploads/d97659f7dddfd4858bd316acb0dda2b6/Selection_014.png)
Proposed behaviour
----------------------------------------
The APIv4 autocomplete widget should have feature parity when it comes to creating new contacts on the spot as the Select2 optionhttps://lab.civicrm.org/dev/core/-/issues/4414CiviCRM 5.62.1 - CiviCRM core extension: Greenwich, Bootstrap CSS tries to lo...2023-08-08T22:21:55Zjustinfreeman (Agileware)CiviCRM 5.62.1 - CiviCRM core extension: Greenwich, Bootstrap CSS tries to load glyphicons fonts from the incorrect paths returns 404 and icons do not displayCiviCRM core extension: Greenwich, Bootstrap CSS tries to load glyphicons fonts from the incorrect paths returns 404 and icons do not display.
- civicrm/ext/greenwich/fonts/glyphicons-halflings-regular.woff2
- civicrm/ext/greenwich/font...CiviCRM core extension: Greenwich, Bootstrap CSS tries to load glyphicons fonts from the incorrect paths returns 404 and icons do not display.
- civicrm/ext/greenwich/fonts/glyphicons-halflings-regular.woff2
- civicrm/ext/greenwich/fonts/glyphicons-halflings-regular.woff
- civicrm/ext/greenwich/fonts/glyphicons-halflings-regular.ttf
Correct path is:
civicrm/ext/greenwich/extern/bootstrap3/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf
This error is shown in the Web Console when loading the Mosaico Template Editor to create or edit a Mailing.
civicrm/ext/greenwich/dist/bootstrap3.css
```
@font-face {
font-family: "Glyphicons Halflings";
src: url("../fonts/glyphicons-halflings-regular.eot");
src: url("../fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"), url("../fonts/glyphicons-halflings-regular.woff2") format("woff2"), url("../fonts/glyphicons-halflings-regular.woff") format("woff"), url("../fonts/glyphicons-halflings-regular.ttf") format("truetype"), url("../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg");
}
```
Version: CiviCRM 5.62.1
Agileware Ref: CIVICRM-2149https://lab.civicrm.org/dev/core/-/issues/4204Direct Debit agreement is always/never shown depending on which payment proce...2023-04-25T18:46:28ZbgmDirect Debit agreement is always/never shown depending on which payment processor is the defaultTo reproduce:
- Enable the Credit Card dummy processor
- Enable a Direct Debit processor (such as CiviSepa? or iATS)
- Enable both on a Contribution Page
Depending on which Payment Processor is set as the default, that will influence i...To reproduce:
- Enable the Credit Card dummy processor
- Enable a Direct Debit processor (such as CiviSepa? or iATS)
- Enable both on a Contribution Page
Depending on which Payment Processor is set as the default, that will influence if the "direct debit agreement" is displayed on the contribution page. It should only be shown if a Direct Debit payment method was selected.
Screenshots by @Andreas in #4189:
![screenshot1](/uploads/06edccccf03f105e07263906e06ed4a4/screenshot1.png)
![screenshot2](/uploads/97f048b7788ea9672fb4b2584e8d9962/screenshot2.png)
Initially reported by @romy5.61.0https://lab.civicrm.org/dev/core/-/issues/4097CRM_Utils_Number::formatLocaleNumeric() method throws fatal error with empty ...2023-01-30T21:07:08ZbenmoreassyntCRM_Utils_Number::formatLocaleNumeric() method throws fatal error with empty string parameter.Overview
----------------------------------------
CRM_Utils_Number::formatLocaleNumeric() method throws fatal error due to string parameter.
Reproduction steps
----------------------------------------
1. Generate a report that uses cust...Overview
----------------------------------------
CRM_Utils_Number::formatLocaleNumeric() method throws fatal error due to string parameter.
Reproduction steps
----------------------------------------
1. Generate a report that uses custom fields with numeric values. In my case the custom fields were storing simple integer counts of family members.
1. The following fatal error is thrown: "Fatal error: Uncaught Error: NumberFormatter::format(): Argument #1 ($num) must be of type int|float, string given
in /path/to/civicrm/civicrm/CRM/Utils/Number.php on line 123"
Current behaviour
----------------------------------------
Fatal error is thrown. Error affects multiple reports. Full output follows.
```
Fatal error: Uncaught Error: NumberFormatter::format(): Argument #1 ($num) must be of type int|float, string given
in /path/to/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/Number.php on line 123
Call stack:
NumberFormatter::format()
wp-content/plugins/civicrm/civicrm/CRM/Utils/Number.php:123
CRM_Utils_Number::formatLocaleNumeric()
wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php:1282
CRM_Core_BAO_CustomField::formatDisplayValue()
wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomField.php:1116
CRM_Core_BAO_CustomField::displayValue()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php:2388
CRM_Report_Form::alterCustomDataDisplay()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php:3293
CRM_Report_Form::sectionTotals()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php:2578
CRM_Report_Form::formatDisplay()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Contact/Summary.php:154
CRM_Report_Form_Contact_Summary::postProcess()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form.php:956
CRM_Report_Form::preProcess()
wp-content/plugins/civicrm/civicrm/CRM/Report/Form/Contact/Summary.php:125
CRM_Report_Form_Contact_Summary::preProcess()
wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:668
CRM_Core_Form::buildForm()
wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php:76
CRM_Core_QuickForm_Action_Display::perform()
wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203
HTML_QuickForm_Controller::handle()
wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103
HTML_QuickForm_Page::handle()
wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355
CRM_Core_Controller::run()
wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php:98
CRM_Utils_Wrapper::run()
wp-content/plugins/civicrm/civicrm/CRM/Report/Page/Instance.php:74
CRM_Report_Page_Instance::run()
wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319
CRM_Core_Invoke::runItem()
wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69
CRM_Core_Invoke::_invoke()
wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36
CRM_Core_Invoke::invoke()
wp-content/plugins/civicrm/civicrm.php:1199
CiviCRM_For_WordPress::invoke()
wp-includes/class-wp-hook.php:308
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:332
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-admin/admin.php:259
```
Expected behaviour
----------------------------------------
A CiviCRM report of custom fields and data should be shown.
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 neccessary. -->
* __CiviCRM:__ 5.57.1
* __PHP:__ reproduced in 8.1 and 8.0
* __CMS:__ WordPress 6.6.1
* __Database:__ reproduced in MySQL 5.7 and MySQL 8.0
* __Web Server:__ Apache 2.4
Comments
----------------------------------------
Possible fix (submitted via pull request):
CRM/Utils/Number.php Insert the following after line 122.
```php
if ((int) $amount == $amount) {
$amount = intval($amount);
} else {
$amount = floatval($amount);
}
```5.59.0https://lab.civicrm.org/dev/core/-/issues/4096Proposal - change title for all `is_primary` fields to 'Is Primary'2023-02-06T03:57:46ZeileenProposal - change title for all `is_primary` fields to 'Is Primary'I just got REALLY confused trying to import to `Primary Email` - which turns out to be the `is_primary` field - I think we should maybe change to `Is Primary` - @colemanw ?I just got REALLY confused trying to import to `Primary Email` - which turns out to be the `is_primary` field - I think we should maybe change to `Is Primary` - @colemanw ?5.59.0https://lab.civicrm.org/dev/core/-/issues/4092Resubscribe request processing crashes, blocks cron job2023-01-31T08:29:15ZBobSResubscribe request processing crashes, blocks cron jobOverview
----------------------------------------
When CiviCRM performs bounce processing, a resubscribe request email results in a call to CRM_Mailing_Event_BAO_Resubscribe::resub_to_mailing() which fails as that class does not exist. A...Overview
----------------------------------------
When CiviCRM performs bounce processing, a resubscribe request email results in a call to CRM_Mailing_Event_BAO_Resubscribe::resub_to_mailing() which fails as that class does not exist. As the error occurs before the offending email is removed from the Inbox, subsequent invocations of "civicrm-api job.execute" continue to fail.
Reproduction steps
----------------------------------------
1. Unsubscribe from an email list.
2. Receive confirmation email with the message ```You can re-subscribe by mailing mailto:bounce+e.[redacted]@mydomain.org```
3. Send an email to that address.
In addition, clicking the link in the email fails for the same reason.
Current behaviour
----------------------------------------
* Popup indicating "Cron not running".
* Mail processing (and presumably other scheduled jobs) not running.
* Drupal log entry: ```Error: Class 'CRM_Mailing_Event_BAO_Resubscribe' not found in civicrm_api3_mailing_event_resubscribe_create() (line 29 of /var/www/clients/client1/web3/web/drupal/sites/all/modules/civicrm/api/v3/MailingEventResubscribe.php).```
Expected behaviour
----------------------------------------
Contact resubscribed.
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. -->
* __CiviCRM:__ _5.57.0_
* __PHP:__ _7.4.33_
* __CMS:__ _Drupal 7.91_
* __Database:__ _MariaDB 10.4_
* __Web Server:__ _Apache 2.4_
Comments
----------------------------------------
* Most recent bounce+e email we've received before this one was in 11/21, and that caused no issues.
* Marking this Confidential as it could be used in a type of Denial of Service attack, preventing CiviCRM sites from sending email/SMS.5.57.3https://lab.civicrm.org/dev/core/-/issues/4090Managed Entity reconciliation fails if entity exists without Managed entity2023-06-08T16:37:28Zaydunsaidan.saunders@squiffle.ukManaged Entity reconciliation fails if entity exists without Managed entityOverview
----------------------------------------
Follow along now: "Managed Entities" involve both a `Managed` entity and the entity being managed. If the managed entity exists but the corresponding `Managed` entity does not, errors a...Overview
----------------------------------------
Follow along now: "Managed Entities" involve both a `Managed` entity and the entity being managed. If the managed entity exists but the corresponding `Managed` entity does not, errors are thrown.
For example, if an extension provides a `.mgd.php` file specifying a `PaymentProcessorType` entity, the reconciliation process will create the `PaymentProcessorType` entity and a `Managed` entity and then manage updates or deletion when the extension is updated or uninstalled.
In some (unknown) circumstances, the `Managed` entity does not exist but the managed (eg `PaymentProcessorType`) entity does exist. `CRM_Core_ManagedEntities::reconcile()` does not check for the existence of the `PaymentProcessorType` entity and so attempts to create a duplicate which fails. This happens any time a cache clear occurs.
Reproduction steps
----------------------------------------
I don't know how this has occurred on live systems, but to simulate:
1. Install Stripe (or other extension with `.mgd.php`)
2. Delete the `Managed` entity for Stripe: `cv api4 Managed.delete +w 'name = "Stripe"'`
3. `cv flush`
Current behaviour
----------------------------------------
```
$ cv flush
Flushing system caches
Error: API Call Failed: Array
(
[entity] => System
[action] => flush
[params] => Array
(
[debug] => 1
[version] => 3
)
[result] => Array
(
[trace] => #0 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(192): CRM_Core_ManagedEntities->onApiError()
#1 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(152): CRM_Core_ManagedEntities->insertNewEntity()
#2 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php(113): CRM_Core_ManagedEntities->reconcileEntities()
#3 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(417): CRM_Core_ManagedEntities->reconcile()
#4 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/api/v3/System.php(33): CRM_Core_Invoke::rebuildMenuAndCaches()
#5 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_system_flush()
#6 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(158): Civi\API\Provider\MagicFunctionProvider->invoke()
#7 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest()
#8 /opt/buildkit/build/dmaster/web/sites/all/modules/civicrm/api/api.php(22): Civi\API\Kernel->runSafe()
#9 phar:///opt/buildkit/bin/cv/src/Command/BaseCommand.php(63): civicrm_api()
#10 phar:///opt/buildkit/bin/cv/src/Command/FlushCommand.php(37): Civi\Cv\Command\BaseCommand->callApiSuccess()
#11 phar:///opt/buildkit/bin/cv/vendor/symfony/console/Command/Command.php(255): Civi\Cv\Command\FlushCommand->execute()
#12 phar:///opt/buildkit/bin/cv/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#13 phar:///opt/buildkit/bin/cv/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#14 phar:///opt/buildkit/bin/cv/src/Application.php(82): Symfony\Component\Console\Application->doRun()
#15 phar:///opt/buildkit/bin/cv/vendor/symfony/console/Application.php(149): Civi\Cv\Application->doRun()
#16 phar:///opt/buildkit/bin/cv/src/Application.php(49): Symfony\Component\Console\Application->run()
#17 phar:///opt/buildkit/bin/cv/bin/cv(27): Civi\Cv\Application::main()
#18 /opt/buildkit/bin/cv(14): require('phar:///opt/bui...')
#19 {main}
[is_error] => 1
[error_message] => API error: DB Error: already exists on PaymentProcessorType.create( entity name Stripe)
)
)
```
Expected behaviour
----------------------------------------
No error - or at least a helpful error message.
I think `reconcile()` could just create the missing `Managed` entity but there may be other ramifications of doing that.
Environment information
----------------------------------------
* __CiviCRM:__ _Master_
Comments
----------------------------------------
_Anything else you would like the reviewer to note._https://lab.civicrm.org/dev/core/-/issues/4081API v.3 Event.create used for update will change Event Template to ordinary E...2023-01-16T15:26:05Zniels_erik_andersenAPI v.3 Event.create used for update will change Event Template to ordinary EventWhen API v.3 Event.create is used for update event template, it will set is_template to false so that the template is changed to an ordinary event.
To reproduce:
cv api Event.create id=nnn template_title="New Title"
Where nnn is id for...When API v.3 Event.create is used for update event template, it will set is_template to false so that the template is changed to an ordinary event.
To reproduce:
cv api Event.create id=nnn template_title="New Title"
Where nnn is id for Event Template
To fix:
In
CRM_Event_BAO_Event::create(&$params) {
$transaction = new CRM_Core_Transaction();
if (empty($params['is_template'])) {
$params['is_template'] = 0;
}
Change
if (empty($params['is_template'])) {
to:
if (empty($params['id']) && empty($params['is_template'])) {5.59.0https://lab.civicrm.org/dev/core/-/issues/4080system workflow templates do not respect the selected pdf format anymore2023-02-15T05:27:10ZMariaVsystem workflow templates do not respect the selected pdf format anymoreI have noticed that system workflow templates no longer respect the formats.
pdf formats can be configured via communication > pdf formats.
In my case there are 2 pdf formats (and the default_invoice_pdf_format came together with an upd...I have noticed that system workflow templates no longer respect the formats.
pdf formats can be configured via communication > pdf formats.
In my case there are 2 pdf formats (and the default_invoice_pdf_format came together with an update probably a few months ago):
![grafik](/uploads/e7bce57400c26a7488c20f64a1d2b64d/grafik.png)
When I edit a system workflow template and choose - Standard - or DIN A4 it still chooses the default_invoice_pdf_format.
![grafik](/uploads/07affeecea4693e191b517e16700a854/grafik.png)
It is hardcoded in the code as you can see here:
https://lab.civicrm.org/dev/core/-/blob/master/CRM/Contribute/Form/Task/Invoice.php (line 236).
I do not know why this has been implemented. There might be a reason for it.
But it seems like a bug for me.
If I choose - Standard - in the system workflow templates I expect that this format will be choosed.
Such a change (without notice) could also led to major problems when sending invoices automatically.
Workaround for us for now was to change the default_invoice_pdf_format to the same values as our standard format.
(noticed on CiviCRM version 5.56.2)5.58.1https://lab.civicrm.org/dev/core/-/issues/4076Split up CRM_Utils_System_Base::theme2023-02-14T01:13:59ZherbdoolSplit up CRM_Utils_System_Base::themeSplit up this method into the different classes so it's specific per CMS.Split up this method into the different classes so it's specific per CMS.https://lab.civicrm.org/dev/core/-/issues/4070FlexMailer: Default Return Path not respected2023-02-27T13:47:09ZJonGoldFlexMailer: Default Return Path not respectedIn **Administer » CiviMail » Mail Accounts**, you can specify a default return path for your CiviMail mailings. This is important when, for instance, your bounce address's mailhost does not support VERP. This forces the `Return-Path` h...In **Administer » CiviMail » Mail Accounts**, you can specify a default return path for your CiviMail mailings. This is important when, for instance, your bounce address's mailhost does not support VERP. This forces the `Return-Path` header to a specific email address. The bounce processing code will find the `X-CiviMail-Bounce` header and process that instead of the bounce address.
However, this functionality was not ported to Flexmailer. You can see it at the very top of `CRM_Utils_Mail::send()` but not in `Civi\FlexMailer\Listener\BounceTracker::onCompose()`.
This causes the return-path to have the VERP address.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4065Upgrade Error 5.56.1 to 5.57.0 duplicate Search Kit UI_name2023-01-10T12:26:09ZkcristianoUpgrade Error 5.56.1 to 5.57.0 duplicate Search Kit UI_nameEnviornment:
WP 6.1.1
php 7.4
apache 2.4
Search Kit has a search created in 2021 called 'Top Donors'
on upgrade I get the error:
`[nativecode=1062 ** Duplicate entry 'Top_Donors' for key 'UI_name']`
```
[Error: Finish core DB update...Enviornment:
WP 6.1.1
php 7.4
apache 2.4
Search Kit has a search created in 2021 called 'Top Donors'
on upgrade I get the error:
`[nativecode=1062 ** Duplicate entry 'Top_Donors' for key 'UI_name']`
```
[Error: Finish core DB updates 5.57.0]
Error Field Error Value
Type DB_Error
Code -5
Message DB Error: already exists
Mode 16
UserInfo INSERT INTO `civicrm_saved_search` (`name` , `label` , `form_values` , `mapping_id` , `search_custom_id` , `api_entity` , `api_params` , `created_id` , `modified_id` , `expires_date` , `description` ) VALUES ('Top_Donors' , 'Top Donors' , NULL , NULL , NULL , 'Contribution' , '{\"version\":4,\"select\":[\"GROUP_CONCAT(DISTINCT Contribution_Contact_contact_id_01.display_name) AS GROUP_CONCAT_Contribution_Contact_contact_id_01_display_name\",\"SUM(total_amount) AS SUM_total_amount\",\"COUNT(id) AS COUNT_id\",\"AVG(total_amount) AS AVG_total_amount\"],\"orderBy\":[],\"where\":[[\"contribution_status_id:name\",\"=\",\"Completed\"]],\"groupBy\":[\"contact_id.display_name\"],\"join\":[[\"Contact AS Contribution_Contact_contact_id_01\",\"LEFT\",[\"contact_id\",\"=\",\"Contribution_Contact_contact_id_01.id\"]]],\"having\":[]}' , 202 , 202 , NULL , NULL ) [nativecode=1062 ** Duplicate entry 'Top_Donors' for key 'UI_name']
DebugInfo INSERT INTO `civicrm_saved_search` (`name` , `label` , `form_values` , `mapping_id` , `search_custom_id` , `api_entity` , `api_params` , `created_id` , `modified_id` , `expires_date` , `description` ) VALUES ('Top_Donors' , 'Top Donors' , NULL , NULL , NULL , 'Contribution' , '{\"version\":4,\"select\":[\"GROUP_CONCAT(DISTINCT Contribution_Contact_contact_id_01.display_name) AS GROUP_CONCAT_Contribution_Contact_contact_id_01_display_name\",\"SUM(total_amount) AS SUM_total_amount\",\"COUNT(id) AS COUNT_id\",\"AVG(total_amount) AS AVG_total_amount\"],\"orderBy\":[],\"where\":[[\"contribution_status_id:name\",\"=\",\"Completed\"]],\"groupBy\":[\"contact_id.display_name\"],\"join\":[[\"Contact AS Contribution_Contact_contact_id_01\",\"LEFT\",[\"contact_id\",\"=\",\"Contribution_Contact_contact_id_01.id\"]]],\"having\":[]}' , 202 , 202 , NULL , NULL ) [nativecode=1062 ** Duplicate entry 'Top_Donors' for key 'UI_name']
PEAR_Exception: DB Error: already exists in /home/wpmaybe/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php on line 945
DB_Error: DB Error: already exists in unknown on line unknown
```
I edited the label and name in DB and re-ran the upgrade:
Success
I also now have a packaged Search with the same label and name as one that was created previously. Perhaps we should have a more unique name (not label) to indicated it's a core/packaged search?
EDIT: The affected sites all have the extension 'SearchKit Reports' enabled.https://lab.civicrm.org/dev/core/-/issues/4063Pagination and counts for soft credits on contact contribution tab are broken2023-01-31T04:22:10ZlarsssandergreenPagination and counts for soft credits on contact contribution tab are broken![image](/uploads/bb821970b38d324542ed222f854986c7/image.png)
![image](/uploads/6f7546327ec73b18a8811048bcf59d92/image.png)
If the total number of soft credits on a contact's contribution tab exceeds the number set in Show N entries, th...![image](/uploads/bb821970b38d324542ed222f854986c7/image.png)
![image](/uploads/6f7546327ec73b18a8811048bcf59d92/image.png)
If the total number of soft credits on a contact's contribution tab exceeds the number set in Show N entries, then the count is broken as above and the Next and Last links are disabled. You can use the page numbers to get to other pages, but it will always show five pages no matter how many actual soft credits are found.
Is this something that's worth digging into or is it anticipated that this will be replaced with SearchKit relatively soon?
To reproduce, add soft credit for 11 contributions to one contact, then go to that contact's contributions tab and select Show 10 entries.https://lab.civicrm.org/dev/core/-/issues/4060On 5.57.0 Joomla3, cv fails with 'Failed to start application'2023-01-11T13:56:44Zaydunsaidan.saunders@squiffle.ukOn 5.57.0 Joomla3, cv fails with 'Failed to start application'Overview
----------------------------------------
On a 5.57.0 Joomla 3.10.9 system, the `cv` command fails with 'Failed to start application'
(Logging against core rather than cv since the problem appears to be here)
Reproduction steps...Overview
----------------------------------------
On a 5.57.0 Joomla 3.10.9 system, the `cv` command fails with 'Failed to start application'
(Logging against core rather than cv since the problem appears to be here)
Reproduction steps
----------------------------------------
1. Try running various commands such as `cv vars:show`, `cv api Contact.get`
Current behaviour
----------------------------------------
```
In Factory.php line 137:
Failed to start application
vars:show [--out OUT] [--flat [FLAT]] [--level LEVEL] [--hostname HOSTNAME] [-t|--test] [-U|--user USER]
```
Expected behaviour
----------------------------------------
No error!
Environment information
----------------------------------------
* __CiviCRM:__ _5.57.0_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _7.3__
* __CMS:__ _Joomla 3.10.9._5.57.1aydunsaidan.saunders@squiffle.ukaydunsaidan.saunders@squiffle.ukhttps://lab.civicrm.org/dev/core/-/issues/4056Replace hard-coded call to legacyCustomSearch framework with a hook2023-06-25T18:31:24ZeileenReplace hard-coded call to legacyCustomSearch framework with a hookWe should get the legacy custom search frame work out of our `GroupContactCache` BAO and eventually out of core code (and unhide the extension, with a view to not shipping enabled).
In order to do this I think we need a hook to get the ...We should get the legacy custom search frame work out of our `GroupContactCache` BAO and eventually out of core code (and unhide the extension, with a view to not shipping enabled).
In order to do this I think we need a hook to get the sql when loading a contact group
![image](/uploads/9ca4de13d7127a957e988ccea1a5c43b/image.png)
It might potentially wind up like this
![image](/uploads/6eebfb49b84cb35210c17de5a7eaf5e2/image.png)
I see there is handling for the sql being empty - which seems weird - but we could probably assume that if anything ever needs no sql it is not a custom search
Note that `CRM_Contact_BAO_SearchCustom` could be moved to the extension with the hook once as part of this as nothing else calls it
The other place where the legacy custom search framework returns sql is
![image](/uploads/e99dfdf4ba2fb66ac6e78c9f1cffc3b6/image.png)
Internally the first query calls the same `contactIDs`
![image](/uploads/88c6ff1481188c0f666b6309cb01b25b/image.png)
@colemanw @seamuslee @DaveDhttps://lab.civicrm.org/dev/core/-/issues/4055Extension cannot found its own classes during install when opcache is enabled2023-03-16T13:12:50ZkainukExtension cannot found its own classes during install when opcache is enabledI start with the following configuration:
* PHP 8.1.7 _Using the docker image FROM php:8.1.7-apache-buster_
* OPCache enabled _standard configuration_
* Buildkit _CiviCRM install for Drupal 9_ see below:
````
civibuild create patch \
...I start with the following configuration:
* PHP 8.1.7 _Using the docker image FROM php:8.1.7-apache-buster_
* OPCache enabled _standard configuration_
* Buildkit _CiviCRM install for Drupal 9_ see below:
````
civibuild create patch \
--type drupal9-demo \
--civi-ver master \
--url http://patch.kainuk \
--cms-ver 9.5
````
Now, when I enable the Action Provider extension (just from the extension screen), the following error is thrown.
````
Error: Class "Civi\ActionProvider\Symfony\Component\DependencyInjection\DefinitionAdapter" not found in action_provider_civicrm_container() (line 15 of /buildkit/build/patch/web/sites/default/files/civicrm/ext/action-provider/action_provider.php)
````
`cv flush` lets the problem disappear, and for the Action Provider that is no problem because only code is installed (it does not change the database). However, other extensions can have more problems because the installation is interrupted, and possible incomplete.
The problem is, however, reproducible. When I disable the extension, and uninstall it, the error reappears after installing.
I did some duty time in the debugger and found the following code in the extension class loader (CRM_Extension_ClassLoader)
````php
$file = $this->getCacheFile();
if (file_exists($file)) {
$this->loader = require $file;
}
else {
$this->loader = $this->buildClassLoader();
$ser = serialize($this->loader);
file_put_contents($file,
sprintf("<?php\nreturn unserialize(%s);", var_export($ser, 1))
);
}
````
`$this->buildClassLoader()` is an expensive procedure, so after calculation the result is saved for reuse. When a new extension is installed, the saved file is removed because it does not contain the new extension configuration. A new classloader with all the extension stuff is calculated and an updated file is written.
For loading the class, the PHP construct `require` is used. This construct was designed for loading PHP code. The assumption is that PHP code does not change much, and OPCache used this assumption, to store the file in memory. The risk is here is that not the newly written configuration is used, but an old one from memory. On my configuration, I observed with the PHP debugger, that when the `hook_civicrm_container` the old classloader is loaded with require. Just put a breakpoint before the `$this->loader = require $file` line.
When the OPCache is disabled, the problem does not appear.5.59.0https://lab.civicrm.org/dev/core/-/issues/4052Problem with custom group fields when cache get returns NULL from 'CRM_Core_D...2024-03-18T23:41:32ZLeanderJCCProblem with custom group fields when cache get returns NULL from 'CRM_Core_DAO_CustomGroup_QueryMultipleFields *' cache keyOverview
----------------------------------------
We had a problem where we did an APIv3 call on participants where it would cause an error resulting in a 500 response.
Some stack tracing showed us that in CRM/Core/BAO/CustomGroup.php t...Overview
----------------------------------------
We had a problem where we did an APIv3 call on participants where it would cause an error resulting in a 500 response.
Some stack tracing showed us that in CRM/Core/BAO/CustomGroup.php the code `$multipleFieldGroups = $cache->get($multipleFieldGroupCacheKey);` returned NULL (line 576). Since there is no check that says that it should not be NULL the code continues and errors on `if (in_array($table, $multipleFieldGroups) &&` because
> Argument #2 ($haystack) must be of type array, null given in in_array().
Reproduction steps
----------------------------------------
Could not specifically reproduce this with a clean install.
Current behaviour
----------------------------------------
Our page where the APIv3 Participant call was made would return a 500.
```
TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 611 of /var/www/html/vendor/civicrm/civicrm-core/CRM/Core/BAO/CustomGroup.php)
#0 /var/www/html/vendor/civicrm/civicrm-core/CRM/Core/BAO/CustomGroup.php(611): in_array('civicrm_value_r...', NULL)
#1 /var/www/html/vendor/civicrm/civicrm-core/api/v3/utils.php(1449): CRM_Core_BAO_CustomGroup::getTree('Participant', Array, 1982, NULL, Array, NULL, true, NULL, true, false)
#2 /var/www/html/vendor/civicrm/civicrm-core/api/v3/Participant.php(154): _civicrm_api3_custom_data_get(Array, NULL, 'Participant', '1982', NULL)
#3 /var/www/html/vendor/civicrm/civicrm-core/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_participant_get(Array)
#4 /var/www/html/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke(Array)
#5 /var/www/html/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest(Array)
#6 /var/www/html/vendor/civicrm/civicrm-core/api/api.php(133): Civi\API\Kernel->runSafe('Participant', 'get', Array)
```
Expected behaviour
----------------------------------------
The page should load as normal.
Environment information
----------------------------------------
* __CiviCRM:__ _5.55.1_
* __PHP:__ _8.0.24_
* __CMS:__ _Drupal 9.4.8_
* __Database:__ _8.0.26_
* __Web Server:__ _nginx/1.20.2_
Comments
----------------------------------------
We fixed this issue by switching to APIv4 so it would no longer automatically get the custom groups and fields for the participant, but this still seemed a general issue to report.
I believe an if, at line 578 after settings the variable, would fix this issue.
```
if ($multipleFieldGroups === NULL) {
$multipleFieldGroups = [];
}
```https://lab.civicrm.org/dev/core/-/issues/4028CMS Database Integration - Per-table prefixes are no longer supported2023-02-06T22:26:31ZolivierCMS Database Integration - Per-table prefixes are no longer supportedOverview
----------------------------------------
Since Drupal 8.2 per-table prefixes are no longer supported, so System Settings / CMS Database Integration menu should no longer display the 'Drypal 7' mapping table
Example use-case
---...Overview
----------------------------------------
Since Drupal 8.2 per-table prefixes are no longer supported, so System Settings / CMS Database Integration menu should no longer display the 'Drypal 7' mapping table
Example use-case
----------------------------------------
1. Click on **System Settings -> CMS Database Integration**.
Current behaviour
----------------------------------------
$databases['default']['default']['prefix']= [
'default' => 'drupal_',
'civicrm_acl' => '',
'civicrm_acl_cache' => '',
'civicrm_acl_contact_cache' => '',
'civicrm_acl_entity_role' => '',
'civicrm_action_log' => '',
'civicrm_action_mapping' => '',
'civicrm_action_schedule' => '',
'civicrm_activity' => '',
'civicrm_activity_contact' => '',
....
Proposed behaviour
----------------------------------------
$databases['civicrm']['default'] = [
'database' => 'xxxxxx',
'username' => 'xxxxxx',
'password' => 'set your db password',
'host' => '127.0.0.1',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
'namespace' => 'Drupal\Core\Database\Driver\mysql',
'collation' => 'utf8mb4_general_ci',
];
Comments
----------------------------------------
_Anything else you would like the reviewer to note._5.60.0https://lab.civicrm.org/dev/core/-/issues/4026Custom field value not saved first time after membership type changed2024-03-15T01:10:51ZdanmurrayCustom field value not saved first time after membership type changedOverview
----------------------------------------
Membership type B has a custom field set but Membership type A does not. When a membership of type A is edited and changed to type B, the custom field set appears in the editor and value...Overview
----------------------------------------
Membership type B has a custom field set but Membership type A does not. When a membership of type A is edited and changed to type B, the custom field set appears in the editor and values can be set for the custom fields. However when the membership is saved, the custom field values are not remembered. The values are only remembered if the membership is edited a second time, and the custom fields are set and saved again.
Reproduction steps
----------------------------------------
Go to https://dmaster.demo.civicrm.org/
Add new custom field set used for Memberships -> General
Add new field to field set: a dropdown field with option 1 and option 2
Find any membership of type Student and edit it
Change membership type from Student to General, the new custom field appears for editing
![image](/uploads/2eae0c3199111e0605609f82408c7961/image.png)
Select option 1 in the custom field and save the membership
![image](/uploads/6863ef5c318c458537b090be791cfde6/image.png)
View the membership - the custom field value is not set
![image](/uploads/ddb4b7fc4f85ca0b9c1ceeaee751e449/image.png)
Edit the membership again, again select option 1 in the custom field and save the membership
View the membership again - the custom field value is now set
![image](/uploads/61578005173f4af4c10fb784446e4cd2/image.png)
Current behaviour
----------------------------------------
The first time a custom field value is set after a membership type is changed, the value is not remembered. It is only remembered after the second time it is saved.
Expected behaviour
----------------------------------------
The custom field value should be remembered the first time it is saved.
Environment information
----------------------------------------
Reproduced on https://dmaster.demo.civicrm.org/ 9th Dec 2022
Comments
----------------------------------------5.72.0