CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-05-11T04:35:35Zhttps://lab.civicrm.org/dev/core/-/issues/3949SearchKit: no JOIN available for ContactReference custom fields2023-05-11T04:35:35ZherbdoolSearchKit: no JOIN available for ContactReference custom fieldsI have a ContactReference custom field and an EntityRef field defined in XML schema on an entity. [Update: both are storing a single contact id] In SK I'd like to add a join to the Contact entity via the custom field. There is one availa...I have a ContactReference custom field and an EntityRef field defined in XML schema on an entity. [Update: both are storing a single contact id] In SK I'd like to add a join to the Contact entity via the custom field. There is one available for the EntityRef field, but not ContactReference custom field. I can make the join in API4 just fine.
This looks like a missing piece of functionality. Or I'm just not looking in the right place.https://lab.civicrm.org/dev/core/-/issues/2072Why does composer.json contain `"include-path": ["vendor/tecnickcom"]`2023-05-10T12:51:31ZDaveDWhy does composer.json contain `"include-path": ["vendor/tecnickcom"]`As per https://lab.civicrm.org/extensions/cdntaxreceipts/-/issues/110#note_47514 it seems to cause issues with extensions that try to use TCPDF in drupal 8 since composer creates a vendor/composer/include_paths.php file that then makes t...As per https://lab.civicrm.org/extensions/cdntaxreceipts/-/issues/110#note_47514 it seems to cause issues with extensions that try to use TCPDF in drupal 8 since composer creates a vendor/composer/include_paths.php file that then makes the path relative to /vendor/civicrm/civicrm-core, instead of relative to just /vendor.
Maybe the line was from an early iteration of autoloading and using composer?https://lab.civicrm.org/dev/core/-/issues/2049use default membership status rule rather than hard-coded "New"2023-05-10T05:03:26Zlcdwebuse default membership status rule rather than hard-coded "New"In CRM_Contribute_BAO_Contribution::updateMembershipBasedOnCompletionOfContribution() we update the membership status when a linked contribution is completed (the method name says it all...). The code that determines the calculated statu...In CRM_Contribute_BAO_Contribution::updateMembershipBasedOnCompletionOfContribution() we update the membership status when a linked contribution is completed (the method name says it all...). The code that determines the calculated status defaults to a hard coded value of "New". I believe it should instead default to whatever status rule has been flagged as default... since that's kind of the point of having a default flag.
https://github.com/civicrm/civicrm-core/blob/master/CRM/Contribute/BAO/Contribution.php#L5190
I'd like to add a method "getDefaultStatus()" to CRM_Member_BAO_MembershipStatus to retrieve whichever status rule has been flagged as default. Interestingly, there's a class static "$_defaultMembershipStatus" that as far as I can see is never used. I'll populate that and return the value for some caching love.
Looking for concept approval.lcdweblcdwebhttps://lab.civicrm.org/dev/core/-/issues/2057Extraneous queries - activiies2023-05-09T05:03:25ZeileenExtraneous queries - activiiesPer #2033 when doing query analysis on creating 7 contacts with 7 contributions I found that around 10% of the queries were looking up activity contacts.
In other words 2 queries for each record type for each contribution. In fact these...Per #2033 when doing query analysis on creating 7 contacts with 7 contributions I found that around 10% of the queries were looking up activity contacts.
In other words 2 queries for each record type for each contribution. In fact these are new contributions so no existing records exist & that can hopefully be pre-determined
Examples
|timestamp|query|seconds|rows found|columns requested|
|----------|-------|-------|-------|-------|
| 15/09/20 2:54 | SELECT * FROM `civicrm_activity_contact` WHERE ( `civicrm_activity_contact`.`activity_id` = 112183025 ) AND ( `civicrm_activity_contact`.`contact_id` = 46011835 ) AND ( `civicrm_activity_contact`.`record_type_id` = 2 ) | 0.000549 | 0 | 0 |
| 15/09/20 2:54 | SELECT * FROM `civicrm_activity_contact` WHERE ( `civicrm_activity_contact`.`activity_id` = 112183025 ) AND ( `civicrm_activity_contact`.`record_type_id` = 1 ) | 0.000606 | 0 | 0 |
| 15/09/20 2:54 | SELECT * FROM `civicrm_activity_contact` WHERE ( `civicrm_activity_contact`.`activity_id` = 112183025 ) AND ( `civicrm_activity_contact`.`record_type_id` = 2 ) | 0.000725 | 0 | 0 |
| 15/09/20 2:54 | SELECT * FROM `civicrm_activity_contact` WHERE ( `civicrm_activity_contact`.`activity_id` = 112183025 ) AND ( `civicrm_activity_contact`.`record_type_id` = 2 ) | 0.000605 | 1 | 1 |
| 15/09/20 2:54 | SELECT * FROM `civicrm_activity_contact` WHERE ( `civicrm_activity_contact`.`activity_id` = 112183025 ) AND ( `civicrm_activity_contact`.`record_type_id` = 3 ) | 0.000636 | 0 | 0 |https://lab.civicrm.org/dev/core/-/issues/2010Contact Reference in profile display2023-05-09T05:03:24ZaniesshsethhContact Reference in profile displayI am trying to reference the contact reference field's email id in the civicrm group profile, but it is not going beyond level 2, that is it is happily referencing the field itself, but I cannot reference email from this contact referenc...I am trying to reference the contact reference field's email id in the civicrm group profile, but it is not going beyond level 2, that is it is happily referencing the field itself, but I cannot reference email from this contact reference. Is this a valid issue?!
And yes, I have tried this on the demo site as well
https://demo.circle-interactive.co.uk/civicrm/admin/uf/group/field?reset=1&new=1&gid=15&action=browse
[Image_2020-09-11_at_1.39.07_AM](/uploads/5f22a79c2b269c85948f227d98a04d8e/Image_2020-09-11_at_1.39.07_AM.png)https://lab.civicrm.org/dev/core/-/issues/4280FormBuilder: Form with required "Existing Contact" can't be submitted2023-05-08T07:53:11ZJonGoldFormBuilder: Form with required "Existing Contact" can't be submittedOverview
----------------------------------------
If you put an "Existing Contact" field on a FormBuilder form, and make it required, you can't submit the form.
Reproduction steps
----------------------------------------
1. See above. ...Overview
----------------------------------------
If you put an "Existing Contact" field on a FormBuilder form, and make it required, you can't submit the form.
Reproduction steps
----------------------------------------
1. See above. Here is sample HTML/JSON for a simple case:
```json
{
"type": "form",
"title": "EntityRef required test",
"icon": "fa-list-alt",
"server_route": "civicrm/entityref-req",
"permission": "access CiviCRM",
"create_submission": true,
"requires": [],
"description": "",
"is_dashlet": false,
"is_public": false,
"is_token": false,
"entity_type": null,
"join_entity": null,
"contact_summary": null,
"summary_contact_type": null,
"redirect": null,
"navigation": null
}
```
```html
<af-form ctrl="afform">
<af-entity data="{contact_type: 'Organization', source: 'EntityRef required test'}" type="Contact" name="Organization1" label="Organization 1" actions="{create: true, update: true}" security="RBAC" />
<fieldset af-fieldset="Organization1" class="af-container" af-title="Organization 1">
<div class="af-container">
<af-field name="id" defn="{required: true, input_attrs: {}}" />
</div>
</fieldset>
<button class="af-button btn btn-primary" crm-icon="fa-check" ng-click="afform.submit()">Submit</button>
</af-form>
```
Current behaviour
----------------------------------------
```
Form Error
Please fill all required fields.
```
Expected behaviour
----------------------------------------
Form is submitted if the field is populated.https://lab.civicrm.org/dev/core/-/issues/1007Donor Cannot update recurring payment or billing details!2023-05-08T05:03:26ZtapashDonor Cannot update recurring payment or billing details!Some of our donors have reported that they were not able to update the amount or cancel their recurring subscription payment using the standard email receipt that gets sent from CiviCRM. I am using Paypal pro with CiviCRM 5.13.5. When I ...Some of our donors have reported that they were not able to update the amount or cancel their recurring subscription payment using the standard email receipt that gets sent from CiviCRM. I am using Paypal pro with CiviCRM 5.13.5. When I have tried it myself, I get the following error. How can I fix this problem please? Thanks.
![Screenshot_2019-06-01_at_07.00.27](/uploads/7dcaf5c0b3f35176c32e4a08d2aaa729/Screenshot_2019-06-01_at_07.00.27.png)https://lab.civicrm.org/dev/core/-/issues/2062activity_contact.record_type_id should be required in the database?2023-05-08T05:03:25ZDaveDactivity_contact.record_type_id should be required in the database?Is there a use case where null in this field makes sense?
https://github.com/civicrm/civicrm-core/blob/6777cd9378333d3c4e38e7ce5ae7a396f6fb0a6e/xml/schema/Activity/ActivityContact.xml#L54Is there a use case where null in this field makes sense?
https://github.com/civicrm/civicrm-core/blob/6777cd9378333d3c4e38e7ce5ae7a396f6fb0a6e/xml/schema/Activity/ActivityContact.xml#L54https://lab.civicrm.org/dev/core/-/issues/2064Address inconsistencies on "Cleanup Caches and Reset Paths" page in UI2023-05-07T05:03:25ZJonGoldAddress inconsistencies on "Cleanup Caches and Reset Paths" page in UIThere's a few issues here that are tangentially related:
* "Cleanup Caches" and "Reset Paths" have identical UX - the buttons look the same, there's no additional "are you sure" dialogs on either. However, one is always a harmless opera...There's a few issues here that are tangentially related:
* "Cleanup Caches" and "Reset Paths" have identical UX - the buttons look the same, there's no additional "are you sure" dialogs on either. However, one is always a harmless operation, the other can break your instance. They should NOT have an identical UX. In fact, I think there's an argument that "Reset Paths" shouldn't exist anymore. Folks on Stack Exchange looking to fix their site will clear their cache based on some online advice, then click "Reset Paths" to see if it will help, and now they have two problems.
* "Cleanup Caches" should either a) function identically to `cv flush`, or b) additional operations should be added to this page so that all the actions of `cv flush` are available. I'm particularly thinking of reconciling managed entities.
* I don't think "Rebuild Menus" is part of `cv flush`, but that should also be an option on this page. The current approach for doing so is unfriendly.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/2050Can't search for deleted in new search2023-05-07T05:03:24ZeileenCan't search for deleted in new search@colemanw I just tried to do the following search (in the hope it's less slow than advanced search) - but is_deleted isn't searchable - I was looking for 'deleted contacts who have a contribution'
![Screen_Shot_2020-09-18_at_6.22.26_PM]...@colemanw I just tried to do the following search (in the hope it's less slow than advanced search) - but is_deleted isn't searchable - I was looking for 'deleted contacts who have a contribution'
![Screen_Shot_2020-09-18_at_6.22.26_PM](/uploads/7265737f0e5c16f01152bf4b8b1eb30d/Screen_Shot_2020-09-18_at_6.22.26_PM.png)https://lab.civicrm.org/dev/core/-/issues/2055Log error message instead of throwing exception while sending mailing2023-05-06T05:03:22ZyashodhaLog error message instead of throwing exception while sending mailingFor some reason if the mailing is stuck, we should log error message instead of throwing exception.
I recently encountered this
This is caused by because the details for contact id [x] are not returned for tokens for some reason
CiviMa...For some reason if the mailing is stuck, we should log error message instead of throwing exception.
I recently encountered this
This is caused by because the details for contact id [x] are not returned for tokens for some reason
CiviMail will not send an empty mail body, Skipping: email@email.com
All the required criteria are satisfied. It was strangely because of the limit of count passed to apiQuery which was 1 less than the contacts in the the query resulting in this unfortunate contact not getting any values and then causing the mailing job to fail. We should not have thrown the exception here.yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/2038When assigning a type to a smart group, empty spaces and commas appear when l...2023-05-06T05:03:21Zfreeform.stephWhen assigning a type to a smart group, empty spaces and commas appear when listed on the manage groups pageOverview
----------------------------------------
Unwanted commas and spaces are appearing under the group type column on the manage groups page.
Example use-case
----------------------------------------
1. Click on **Contacts -> Manage...Overview
----------------------------------------
Unwanted commas and spaces are appearing under the group type column on the manage groups page.
Example use-case
----------------------------------------
1. Click on **Contacts -> Manage Groups**.
1. Create a group and select type "Mailing List", save
Current behaviour
----------------------------------------
- On the manage groups page you now see under group type, "**, Mailing List,**"
- This is only for newly created Smart Groups (it doesn't happen when creating a new static group)
- Occurs even if there's only 1 option available
Proposed behaviour
----------------------------------------
It should simply say "**Mailing List**" without commas or spaces
![screenshot-staging.icvanetwork.org-2020.09.15-17_14_38](/uploads/0132d4de2435e39384383ec9d1fd990a/screenshot-staging.icvanetwork.org-2020.09.15-17_14_38.png)https://lab.civicrm.org/dev/core/-/issues/4103Event price sets: Admin-only text field amount is shown in event registration...2023-05-05T15:52:20ZlarsssandergreenEvent price sets: Admin-only text field amount is shown in event registration test driveThis is a minor issue, but potentially confusing as it makes the event registration test drive page incorrect and different from the live registration page.
Steps to replicate:
1. Start with an event with a price set for registration o...This is a minor issue, but potentially confusing as it makes the event registration test drive page incorrect and different from the live registration page.
Steps to replicate:
1. Start with an event with a price set for registration options
2. Add a Text / Numeric Quantity field to the price set with Visibility = Admin.
3. Open Registration (Test Drive) in an Incognito / Private window.
4. Open Registration (Live) in an Incognito / Private window.
Note that the amount of the field is shown on a line on the test drive page, but not on the live page. The input field itself is not shown, just the amount. Nothing should be shown on the test drive page as this option is admin only.
This only happens with text fields, other field types are correctly not shown if set to admin only.
Tested on dmaster (5.59).
I will look into this when I have some time available.5.63.0https://lab.civicrm.org/dev/core/-/issues/2048Rename crmStripAlternatives function and its friend CRM_Utils_String::stripAl...2023-05-05T14:13:30ZDaveDRename crmStripAlternatives function and its friend CRM_Utils_String::stripAlternativesIt's not used much at least in core, and it's not clear from the name what it does, and there's potential for it to be mistaken as a security function.
I'd suggest something like getFirstEmailMultipart or stripAlternativeEmailMultiparts.It's not used much at least in core, and it's not clear from the name what it does, and there's potential for it to be mistaken as a security function.
I'd suggest something like getFirstEmailMultipart or stripAlternativeEmailMultiparts.https://lab.civicrm.org/dev/core/-/issues/4029Around 5.49 pan_truncation and card_type_id (containing card type VISA/MC and...2023-05-05T13:23:07ZStoobAround 5.49 pan_truncation and card_type_id (containing card type VISA/MC and last 4 digits last four digits stopped getting recordedDoes anyone know the reasoning behind this and if it's deliberate or a bug? We used Authorize.net consistently. No change that I'm aware of the the config other than upgrade to 5.49, since then these 2 fields haven't been getting filled...Does anyone know the reasoning behind this and if it's deliberate or a bug? We used Authorize.net consistently. No change that I'm aware of the the config other than upgrade to 5.49, since then these 2 fields haven't been getting filled in with any online translations.
I checked these tables in the schema and confirmed it's not a display issue - _the data doesn't exist_ in table: `civicrm_financial_trxn` columns: `pan_truncation` and `card_type_id`
Example of what it looks like in the UI prior to 5.49
![yes](/uploads/3efbb6e78e2526d9525ec28d6cfa060c/yes.png)
And now after 5.49
![nope](/uploads/24429e375e0c3f708d10a38059d70eff/nope.png)5.60.0https://lab.civicrm.org/dev/core/-/issues/1852The multi-lingual multi-domain problem2023-05-05T05:03:20ZcolemanwThe multi-lingual multi-domain problemBackground
-------
- In a multi-lingual install, the schema is changed to add columns for all translatable fields.
- One column is added per language.
- The list of languages is stored in `civicrm_domain.locales`
- For unknown historical...Background
-------
- In a multi-lingual install, the schema is changed to add columns for all translatable fields.
- One column is added per language.
- The list of languages is stored in `civicrm_domain.locales`
- For unknown historical reasons, `locales` was only populated for domain 1. It was thus treated as a "master domain" although there doesn't appear to be any documentation of this.
- So in a multi-domain setup, domain 2 would inherit its language settings from domain 1.
Problem
-------
- Having `civicrm_domain.locales` be populated for domain 1 but `null` for domain 2+ is confusing to devs and leads to crashes when relying on that value from the current domain.
- Bug reported in #1800
Proposed solution
-------
1. Ensure all domains have `locales` populated when enabling multilingual: https://github.com/civicrm/civicrm-core/pull/17733
2. An upgrade script to ensure `locales` is the same for all domains: https://github.com/civicrm/civicrm-core/pull/17738
Related issues/PRs
--------
- https://github.com/civicrm/civicrm-core/pull/17646
- https://github.com/civicrm/civicrm-core/pull/17733
- https://github.com/civicrm/civicrm-core/pull/17650
Tough questions
----------
Once the relatively easy stuff is solved by merging the fixes above, we might consider:
1. What happens if the admin desires one domain to be single-language and another to be multi?
2. When reverting from multi-lingual back to single, are all domains affected?
3. What if different multi-lingual domains want to support different languages?
4. Is all of the above completely unreasonable and multilingual settings should just always be the same across domains?https://lab.civicrm.org/dev/core/-/issues/4278Import "fill" doesn't respect location type for email/phone2023-05-04T22:10:09ZJonGoldImport "fill" doesn't respect location type for email/phoneOverview
----------------------------------------
If you use the "Fill" strategy for duplicate records in Contact Import, phone and email will be skipped if *any* phone/email exists, regardless of location type. Addresses import correct...Overview
----------------------------------------
If you use the "Fill" strategy for duplicate records in Contact Import, phone and email will be skipped if *any* phone/email exists, regardless of location type. Addresses import correctly.
Reproduction steps
----------------------------------------
1. Create a contact with a Home phone number.
1. Create a CSV with two columns - that contact's ID, and a Work phone number.
1. Import with the "Fill" strategy for duplicate records, matching on contact ID.
Current behaviour
----------------------------------------
Work phone number isn't imported.
Expected behaviour
----------------------------------------
Work phone number is imported.
Comments
----------------------------------------
Similar to https://lab.civicrm.org/dev/core/-/issues/4269 but amazingly is not a regression. This was fixed years ago for addresses, but not phones/email.5.63.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4269Import "Fill" option doesn't work on email/phone fields2023-05-04T20:14:52ZJonGoldImport "Fill" option doesn't work on email/phone fieldsOverview
----------------------------------------
If you use the "Fill" strategy for duplicate records in Contact Import, it only sometimes fills email/phone numbers.
Reproduction steps
----------------------------------------
1. Create...Overview
----------------------------------------
If you use the "Fill" strategy for duplicate records in Contact Import, it only sometimes fills email/phone numbers.
Reproduction steps
----------------------------------------
1. Create a SearchKit query on demo data for individuals where Primary Email is empty and Primary Phone is empty.
1. Export their contact IDs.
1. Open the CSV, and a phone and email field. Populate the values.
1. Import with the "Fill" strategy for duplicate records, matching on contact ID
Current behaviour
----------------------------------------
Of 16 contacts, 4 were filled. The other 12 were not.
I left the email blank on one record. I received an import error for that record.
Expected behaviour
----------------------------------------
All contacts should get the phone and email filled. Leaving a non-match field blank should not result in an import error.
Comments
----------------------------------------
This is certainly a regression but I can't tell you exactly when.5.61.0JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4275pear/pear-core-minimal patch no longer needed2023-05-04T17:32:57Zcollinhainespear/pear-core-minimal patch no longer neededOverview
----------------------------------------
The pear/pear-core-minimal package has updated recently which included [this patch](https://lab.civicrm.org/dev/core/-/blob/master/composer.json#L283).
Reproduction steps
---------------...Overview
----------------------------------------
The pear/pear-core-minimal package has updated recently which included [this patch](https://lab.civicrm.org/dev/core/-/blob/master/composer.json#L283).
Reproduction steps
----------------------------------------
1. Create new composer project requiring civicrm/civicrm-core also ensuring that composer patches are allowed to be applied.
Current behaviour
----------------------------------------
The following exception is thrown when installing:
```
...
1 out of 1 hunk ignored
Could not apply patch! Skipping. The error was: Cannot apply patch https://patch-diff.githubusercontent.com/raw/pear/pear-core-minimal/pull/11.patch
In Patches.php line 331:
[Exception]
Cannot apply patch Apply patch to fix creation of dynamic properties in PEAR_Error class (https://patch-diff.githubusercontent.com/raw/pear/pear-core-minimal/pull/11.patch)!
```
Expected behaviour
----------------------------------------
Composer installs as expected.
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.60.0
* __PHP:__ 8.1
* __CMS:__ Drupal 9.5.x
Comments
----------------------------------------
I think the patch is no longer required.
[Related pear/pear-core-minimal pull request](https://github.com/pear/pear-core-minimal/pull/11).https://lab.civicrm.org/dev/core/-/issues/1897Profile with checkbox custom field fails2023-05-04T05:03:19ZMichael LabriolaProfile with checkbox custom field failsOverview
----------------------------------------
Using profile form generates error message.
Reproduction steps
----------------------------------------
1. Administer->Custom Data and Screens->Custom Fields
2. Add Set of Custom Fields:...Overview
----------------------------------------
Using profile form generates error message.
Reproduction steps
----------------------------------------
1. Administer->Custom Data and Screens->Custom Fields
2. Add Set of Custom Fields: Name = Test, Used For = Contacts, Save
3. Field Label = Test, Data and Input Field Type = Alphanumeric Checkbox, Test 1, Test 2, Save
4. Administer->Custom Data and Screens->Profiles
5. Add Profile: Profile Name = Test, Public Title = Test, Used For = Standalone Form or Directory, Save
6. Field Name = Contacts Test :: Test, Save
7. Administer->Custom Data and Screens->Profiles Test More->Use - Create Mode
Current behaviour
----------------------------------------
Warning: in_array() expects parameter 2 to be array, null given in CRM_Core_BAO_CustomField::setProfileDefaults() (line 1241 of /var/www/mcce_www/public/sites/all/modules/civicrm/CRM/Core/BAO/CustomField.php).
Expected behaviour
----------------------------------------
No error message.
Environment information
----------------------------------------
* __Browser: Chrome 84.0.4147.89
* __CiviCRM: Master/5.26.2
* __PHP: 7.3
* __CMS: Drupal 7.72
* __Database: MariaDB 10.3.22
* __Web Server: Apache 2.4
Comments
----------------------------------------
Line 1239 used to use PHP explode and it was changed to CRM_Utils_Array::explodePadded. I don't think PHP explode ever returned NULL, but CRM_Utils_Array::explodePadded does return NULL, which is the problem.