Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-08-09T14:16:02Zhttps://lab.civicrm.org/dev/core/-/issues/4360AdminUI: Redirect after Search Actions from Contacts in Group broken2023-08-09T14:16:02ZlarsssandergreenAdminUI: Redirect after Search Actions from Contacts in Group brokenIf you have AdminUI, if you do some Search Actions from Contacts in Group (Manage Groups - Contacts for a particular Group), instead of being taken back to Contacts in Group, you are taken to Find Contacts with all Contacts shown. Group ...If you have AdminUI, if you do some Search Actions from Contacts in Group (Manage Groups - Contacts for a particular Group), instead of being taken back to Contacts in Group, you are taken to Find Contacts with all Contacts shown. Group - add contacts is broken in this way, Add activity works as intended.
Related to replacing the [recent PR](https://github.com/civicrm/civicrm-core/pull/26381) replacing Find Contacts in AdminUI.
To reproduce:
1. Contacts - Manage Groups - click contacts beside any group
2. Select some or all contacts
3. Actions - Group - add contacts, then add the contacts to any group
Actual result: Contacts are added to the group, but the user is redirected to the Find Contacts search, showing all contacts.
Expected result: The user returns to Contacts in Group, where they were before.5.64.0https://lab.civicrm.org/dev/core/-/issues/4359Afforms fields are doubled2023-06-15T13:50:57ZlarsssandergreenAfforms fields are doubled![image](/uploads/90aba1ad0e2fe411ce44f9240c6089c4/image.png)
Caused by this [recent PR](https://github.com/civicrm/civicrm-core/pull/26496).![image](/uploads/90aba1ad0e2fe411ce44f9240c6089c4/image.png)
Caused by this [recent PR](https://github.com/civicrm/civicrm-core/pull/26496).5.64.0https://lab.civicrm.org/dev/core/-/issues/4355New Activity with custom radio field gives fatal error2023-07-06T22:45:12ZDaveDNew Activity with custom radio field gives fatal error1. Create a radio field for activities.
2. Go to Contacts - New Activity.
3. Red alert box "network error" and the custom fields don't display. `TypeError: Cannot access offset of type string on string in include() (line 31 of .../templa...1. Create a radio field for activities.
2. Go to Contacts - New Activity.
3. Red alert box "network error" and the custom fields don't display. `TypeError: Cannot access offset of type string on string in include() (line 31 of .../templates_c/en_US/%%1D/1DB/1DB03A28%%CustomField.tpl.php).`
Using php 8. Doesn't happen in php 7.
Works ok in 5.61.5.64.0https://lab.civicrm.org/dev/core/-/issues/4353Review request for legacycode extension2023-06-12T10:55:36ZBjörn EndresReview request for legacycode extensionWe created a helper extension to provide in-line (i.e. same signature) replacements for deprecated CiviCRM Core functions used by other extensions.
Even though this approach might seem odd to you, it will make keeping our 100+ extensio...We created a helper extension to provide in-line (i.e. same signature) replacements for deprecated CiviCRM Core functions used by other extensions.
Even though this approach might seem odd to you, it will make keeping our 100+ extensions up to date much more manageable and safe.
Please review, because automatic availability/distribution in CiviCRM would help to resolve the extensions' new dependency a lot more comfortable and intuitive.
With this in mind, it should be pretty quick and straighforward to review this extension.
You can find the extension [HERE](https://civicrm.org/extensions/legacy-code) and [HERE](https://lab.civicrm.org/extensions/legacycode)https://lab.civicrm.org/dev/core/-/issues/43525.62.0: Automatic CiviDiscount discount for renewal no longer shown in prices...2023-06-19T04:03:31Zcomposerjk5.62.0: Automatic CiviDiscount discount for renewal no longer shown in prices on Membership Signup and Renewal contribution pageOverview
----------------------------------------
On Member Signup and Renewal contribution page with automatic CiviDiscount set, the discount is not being shown for the membership prices.
Issue first appeared in 5.61.0 or 5.61.1 and th...Overview
----------------------------------------
On Member Signup and Renewal contribution page with automatic CiviDiscount set, the discount is not being shown for the membership prices.
Issue first appeared in 5.61.0 or 5.61.1 and then was fixed in 5.61.2, as noted in [this thread](https://chat.civicrm.org/civicrm/pl/6o68trstpigk7dx9p5dd6ncyky). Fix seemed okay through 5.61.4.
Issue re-appeared in 5.62.0. Used the same images posted earlier, but the incorrect output is the same in 5.62.0.
Related issues: #4272 & #4282.
Reproduction steps
----------------------------------------
1. Set up automatically-applied CiviDiscount for fixed amount, renewal (current, grace, expired).
2. Member Signup and Renewal contribution page with basic membership types included; no price sets.
3. Attempt to renew using that contribution page (live or test mode).
Current behaviour
----------------------------------------
What we see in 5.62.0 (and previously in 5.61.1 when it was broken) -- it still mentions the discount in the text above `Membership*` but not in the price buttons:
![image](/uploads/8c1276f1b7f7aa9256b7242bc7b37fd2/image.png)
Expected behaviour
----------------------------------------
What we expect to see (and saw in 5.60 and 5.61.2):
![image](/uploads/c1d816e789f1d761695cef49605c79ea/image.png)
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. -->
* __Browser:__ Safari 16.5 (16615.2.9.11.6, 16615)
* __CiviCRM:__ 5.62.0 <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ 8.0.28
* __CMS:__ WordPress 6.2.2
* __Database:__ MariaDB 10.6
* __Web Server:__ Apache 2.4.57 / Nginx 1.21.3
Comments
----------------------------------------
Let me know if you need more specific steps or detail.
/cc @eileen5.62.0https://lab.civicrm.org/dev/core/-/issues/4348SearchKit: two displays on dashboard using similar search incorrectly share T...2023-09-12T22:43:47ZcomposerjkSearchKit: two displays on dashboard using similar search incorrectly share Total value -- variable leakage?Overview
----------------------------------------
Following text posted here: https://chat.civicrm.org/civicrm/pl/qp6ssaudj3875qroobpkkciiao
For SearchKit Table Display, it looks like the Totals in the footer is not unique to the indivi...Overview
----------------------------------------
Following text posted here: https://chat.civicrm.org/civicrm/pl/qp6ssaudj3875qroobpkkciiao
For SearchKit Table Display, it looks like the Totals in the footer is not unique to the individual display.
In other words, if you have two membership summary displays and select `Show Totals in Footer` then put both of them on your dashboard, they'll show the same total for whichever table was refreshed last.
Reproduction steps
----------------------------------------
1. Create two membership summary displays in SearchKit that are enabled to be displayed on the dashboard.
1. On the dashboard, drag both of them to display.
1. Notice the total will be the same for both.
2. Refresh the one with the wrong total.
3. Notice that both totals change to that updated total.
#### SearchKit with form and display for Active Memberships
```json
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "Current_Active_Members",
"label": "Current Active Members Summary",
"form_values": null,
"mapping_id": null,
"search_custom_id": null,
"api_entity": "Membership",
"api_params": {
"version": 4,
"select": [
"membership_type_id:label",
"COUNT(id) AS COUNT_id",
"GROUP_CONCAT(DISTINCT status_id:label) AS GROUP_CONCAT_status_id_label"
],
"orderBy": [],
"where": [
[
"status_id:name",
"IN",
[
"New",
"Grace",
"Current"
]
],
[
"Membership_Contact_contact_id_01.is_deleted",
"=",
false
]
],
"groupBy": [
"membership_type_id"
],
"join": [
[
"Contact AS Membership_Contact_contact_id_01",
"LEFT",
[
"contact_id",
"=",
"Membership_Contact_contact_id_01.id"
],
[
"Membership_Contact_contact_id_01.is_deleted",
"=",
false
]
]
],
"having": []
},
"expires_date": null,
"description": "Display current active members. With new, grace, current."
}
],
"match": [
"name"
]
}
],
[
"SearchDisplay",
"save",
{
"records": [
{
"name": "Current_Active_Members_Table_1",
"label": "Current Active Members Table 1",
"saved_search_id.name": "Current_Active_Members",
"type": "table",
"settings": {
"description": "Display current active members summary. With new, grace, current.",
"sort": [],
"limit": 50,
"pager": [],
"placeholder": 5,
"columns": [
{
"type": "field",
"key": "membership_type_id:label",
"dataType": "Integer",
"label": "Membership Type",
"sortable": true,
"tally": {
"fn": null
}
},
{
"type": "field",
"key": "COUNT_id",
"dataType": "Integer",
"label": "Count",
"sortable": true,
"tally": {
"fn": "SUM"
}
},
{
"type": "field",
"key": "GROUP_CONCAT_status_id_label",
"dataType": "Integer",
"label": "(List) Status",
"sortable": true,
"tally": {
"fn": null
}
}
],
"actions": false,
"classes": [
"table",
"table-striped"
],
"headerCount": false,
"tally": {
"label": "Total"
}
},
"acl_bypass": false
}
],
"match": [
"name",
"saved_search_id"
]
}
],
[
"Afform",
"save",
{
"records": [
{
"name": "afsearchMembersCurrentActiveTable",
"requires": [],
"title": "Members: Current Active Summary",
"description": "Display current active members. With new, grace, current.",
"is_dashlet": true,
"is_public": false,
"is_token": false,
"permission": "access CiviCRM",
"type": "search",
"entity_type": null,
"join_entity": null,
"contact_summary": null,
"summary_contact_type": null,
"icon": "fa-list-alt",
"server_route": "civicrm/member/summary-current",
"redirect": null,
"create_submission": false,
"navigation": {
"parent": "Membership Reports",
"label": "Members: Current Active Summary",
"weight": 9
},
"layout": "<div af-fieldset=\"\">\n <crm-search-display-table search-name=\"Current_Active_Members\" display-name=\"Current_Active_Members_Table_1\"></crm-search-display-table>\n</div>\n"
}
]
}
]
]
```
#### SearchKit with form and display for Not Active Memberships
```json
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "Not_Active_Members",
"label": "Members: Not Active (Pending, Expired, Deceased)",
"form_values": null,
"mapping_id": null,
"search_custom_id": null,
"api_entity": "Membership",
"api_params": {
"version": 4,
"select": [
"membership_type_id:label",
"COUNT(id) AS COUNT_id",
"GROUP_CONCAT(DISTINCT status_id:label) AS GROUP_CONCAT_status_id_label"
],
"orderBy": [],
"where": [
[
"status_id:name",
"NOT IN",
[
"New",
"Grace",
"Current"
]
],
[
"Membership_Contact_contact_id_01.is_deleted",
"=",
false
]
],
"groupBy": [
"membership_type_id"
],
"join": [
[
"Contact AS Membership_Contact_contact_id_01",
"LEFT",
[
"contact_id",
"=",
"Membership_Contact_contact_id_01.id"
]
]
],
"having": []
},
"expires_date": null,
"description": "Members that do not have a membership status of New, Grace, or Current. Includes at least Pending, Expired, Deceased."
}
],
"match": [
"name"
]
}
],
[
"SearchDisplay",
"save",
{
"records": [
{
"name": "Not_Active_Members_Table_1",
"label": "Not Active Members Table 1",
"saved_search_id.name": "Not_Active_Members",
"type": "table",
"settings": {
"description": "Members: Not Active (Pending, Expired, Deceased)",
"sort": [],
"limit": 50,
"pager": [],
"placeholder": 5,
"columns": [
{
"type": "field",
"key": "membership_type_id:label",
"dataType": "Integer",
"label": "Membership Type",
"sortable": true,
"tally": {
"fn": null
}
},
{
"type": "field",
"key": "COUNT_id",
"dataType": "Integer",
"label": "Count",
"sortable": true,
"tally": {
"fn": "SUM"
}
},
{
"type": "field",
"key": "GROUP_CONCAT_status_id_label",
"dataType": "Integer",
"label": "(List) Status",
"sortable": true,
"tally": {
"fn": null
}
}
],
"actions": false,
"classes": [
"table",
"table-striped"
],
"tally": {
"label": "Total"
}
},
"acl_bypass": false
}
],
"match": [
"name",
"saved_search_id"
]
}
],
[
"Afform",
"save",
{
"records": [
{
"name": "afsearchMembersNotActivePendingExpiredDeceased",
"requires": [],
"title": "Members: Not Active (Pending, Expired, Deceased)",
"description": "",
"is_dashlet": true,
"is_public": false,
"is_token": false,
"permission": "access CiviCRM",
"type": "search",
"entity_type": null,
"join_entity": null,
"contact_summary": null,
"summary_contact_type": null,
"icon": "fa-list-alt",
"server_route": "civicrm/member/summary-notactive",
"redirect": null,
"create_submission": false,
"navigation": {
"parent": "Membership Reports",
"label": "Members: Not Active (Pending, Expired, Deceased)",
"weight": 10
},
"layout": "<div af-fieldset=\"\">\n <crm-search-display-table search-name=\"Not_Active_Members\" display-name=\"Not_Active_Members_Table_1\"></crm-search-display-table>\n</div>\n"
}
]
}
]
]
```
Current behaviour
----------------------------------------
Total incorrect for one of the displays, showing the same value for both. Seems like the variable name may not be unique between the two SearchKit displays. Described above.
Expected behaviour
----------------------------------------
Total should be correct value.
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. -->
* __Browser:__ Safari 16.5 (16615.2.9.11.6, 16615)
* __CiviCRM:__ 5.61.2
* __PHP:__ 8.0.28
* __CMS:__ WordPress 6.2.2
* __Database:__ MariaDB 10.6
* __Web Server:__ Apache 2.4.57 / Nginx 1.21.3
Comments
----------------------------------------
Apologies for the long code sections for the exported SearchKit settings.
@colemanw asked to be tagged during the SearchKit meeting, today.https://lab.civicrm.org/dev/core/-/issues/4347Word Replacements Case insensitive2023-06-28T06:57:11ZtreseroWord Replacements Case insensitiveI need to change all instances of SMS to text message (this really needs to be changed in core, most of our 20k plus members have no idea what SMS is).
Using Word Replacements, I put in SMS and Texts. Enabled and cleared caches, no chan...I need to change all instances of SMS to text message (this really needs to be changed in core, most of our 20k plus members have no idea what SMS is).
Using Word Replacements, I put in SMS and Texts. Enabled and cleared caches, no changes to words. And yes I tried with exact match as well. If I add Sms (which shows as well), it removes SMS but still doesn't change anything.
![Screenshot_2023-06-08_094430](/uploads/1b51070f8220c42f7093e1bbf4a82f5d/Screenshot_2023-06-08_094430.jpg)
![image](/uploads/09b4451a3c5bd95a30555e63a78f9498/image.png)
**After Save**
![image](/uploads/7c73249f6845a86cf2d9cceafc5fe12b/image.png)
**Nothing changed**
![image](/uploads/e5ebb044e5ff205c2c8ace631d971821/image.png)https://lab.civicrm.org/dev/core/-/issues/4345SearchKit: Escaped text appearing in dropdown2023-06-08T03:10:06ZcstoneSearchKit: Escaped text appearing in dropdownOverview
----------------------------------------
Not sure if this is a bug or a feature, but the top two fields show up as escaped, the ones under them all look fine.
![friendlyescaping](/uploads/87f99e4f8f53f8fa2f6f573c92679303/friend...Overview
----------------------------------------
Not sure if this is a bug or a feature, but the top two fields show up as escaped, the ones under them all look fine.
![friendlyescaping](/uploads/87f99e4f8f53f8fa2f6f573c92679303/friendlyescaping.png)
{ts escape="sql"}Recurring Frequency Units{/ts}
The full HTML is:
`<div class="select2-result-label" id="select2-result-label-1943" role="option" title="{ts escape="sql"}Recurring Frequency Units{/ts}">{ts escape="sql"}Recurring Frequency Units{/ts}<div class="crm-select2-row-description"><p>{ts escape="sql"}Recurring Frequency Units{/ts}</p></div></div>`
Reproduction steps
----------------------------------------
1. I chose the searches in the screenshot above.
Current behaviour
----------------------------------------
It is displaying the first two options escaped.
Expected behaviour
----------------------------------------
The <ts> doesn't show up on the drop down.
Environment information
----------------------------------------
* __CiviCRM:__ 5.61.beta1https://lab.civicrm.org/dev/core/-/issues/4343SearchKit: Directive Filters can fail with non-privileged user2023-06-07T09:56:20ZJonGoldSearchKit: Directive Filters can fail with non-privileged userIt's possible to get a "Authorization Failed" error as a non-privileged user, even when ACL bypass is enabled. It requires you filter on an entity that has a `labelField` defined in the XML schema.
Steps to replicate:
Import the SK/Aff...It's possible to get a "Authorization Failed" error as a non-privileged user, even when ACL bypass is enabled. It requires you filter on an entity that has a `labelField` defined in the XML schema.
Steps to replicate:
Import the SK/Afform below. Or manually:
* Create a SK query of an entity that contains a labelField. "Countries" works well. No added WHERE, columns, etc. are necessary.
* Create a table display of this SK query. Enable ACL bypass.
* Create an Afform of the table display. Give it a path, make accessible on the front end, use a permission available to anonymous users (e.g. "make online contributions").
* On the second tab of the Afform, add a filter on the id, getting it from the URL.
---
* Once you have the afform in place, visit it as both an admin and anonymous user, both with and without filters.
Admin users get all results without a filter, and a single result with a filter.
Anonymous users can (correctly) get all results without a filter, but adding a filter results in an "Authorization failed" error on the API call.
This happens because there's an API call made where `checkPermissions` is set to whether the SK query should check permissions, but doesn't consider whether an ACL bypass is in place.
```json
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "d2_test",
"label": "d2 test",
"form_values": null,
"mapping_id": null,
"search_custom_id": null,
"api_entity": "Country",
"api_params": {
"version": 4,
"select": [
"id",
"name"
],
"orderBy": [],
"where": [],
"groupBy": [],
"join": [],
"having": []
},
"expires_date": null,
"description": null
}
],
"match": [
"name"
]
}
],
[
"SearchDisplay",
"save",
{
"records": [
{
"name": "d2_test_Table_1",
"label": "d2 test Table 1",
"saved_search_id.name": "d2_test",
"type": "table",
"settings": {
"description": null,
"sort": [],
"limit": 50,
"pager": [],
"placeholder": 5,
"columns": [
{
"type": "field",
"key": "id",
"dataType": "Integer",
"label": "Country ID",
"sortable": true
},
{
"type": "field",
"key": "name",
"dataType": "String",
"label": "Country",
"sortable": true
}
],
"actions": true,
"classes": [
"table",
"table-striped"
]
},
"acl_bypass": true
}
],
"match": [
"name",
"saved_search_id"
]
}
],
[
"Afform",
"save",
{
"records": [
{
"name": "afsearchD2TestAfform",
"requires": [],
"title": "d2 test afform",
"description": "",
"is_dashlet": false,
"is_public": true,
"is_token": false,
"permission": "make online contributions",
"type": "search",
"icon": "fa-list-alt",
"server_route": "civicrm/d2",
"entity_type": null,
"join_entity": null,
"contact_summary": null,
"summary_contact_type": null,
"redirect": null,
"create_submission": null,
"navigation": null,
"layout": "<div af-fieldset=\"\">\n <crm-search-display-table search-name=\"d2_test\" display-name=\"d2_test_Table_1\" filters=\"{id: routeParams.id}\"></crm-search-display-table>\n</div>\n"
}
]
}
]
]
```JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4338Prevent people from sneakily adding fields to your extension's reserved custo...2023-06-15T22:56:03ZDaveDPrevent people from sneakily adding fields to your extension's reserved custom groups by using the Move action1. Make an extension that makes a reserved custom field group.
2. Someone adds a field to some other non-reserved custom field group.
3. Then they sneakily use the Move link from the links on the right to move it into your reserved group...1. Make an extension that makes a reserved custom field group.
2. Someone adds a field to some other non-reserved custom field group.
3. Then they sneakily use the Move link from the links on the right to move it into your reserved group.
4. You make some code update that then crashes or mangles the data in that field because it's not expecting it to be there.
The UI currently goes out of its way to prevent you even seeing that reserved groups exist, and bouncing if you try to hack an edit link to a field. It should also prevent moving a field into the group.5.64.0https://lab.civicrm.org/dev/core/-/issues/4337Dedupe using length doesn't appear to be working2023-06-05T21:12:43ZStoobDedupe using length doesn't appear to be workingTo reproduce on dmaster
1. create a rule that checks email, postal code, or street address on first X characters
2. run dedupe rule and see random (or perhaps name dedupe) certainly not by email
This is [how 'length' feature in dedupe i...To reproduce on dmaster
1. create a rule that checks email, postal code, or street address on first X characters
2. run dedupe rule and see random (or perhaps name dedupe) certainly not by email
This is [how 'length' feature in dedupe is documented](https://docs.civicrm.org/user/en/latest/common-workflows/deduping-and-merging/#configuring-rules) pretty clear it is intended to work this way, and IIRC worked as recently as two years ago @eileen please tag as regression if appropriate
![rule](/uploads/cdbcfacd21f3bc646ccabb9a073c4125/rule.png)
![f](/uploads/f221b72a0c1d1a8f816bf1bba330f1fa/f.png)
![result](/uploads/8ac18e3fcd72de10404db512356b0357/result.png)https://lab.civicrm.org/dev/core/-/issues/4335Create User Record systematically create an account with just the e-mail address2023-06-26T13:28:47ZolivierCreate User Record systematically create an account with just the e-mail addressOverview
----------------------------------------
Create User Record (civicrm/contact/view/useradd?reset=1&action=add&cid=xxxx)
![image](/uploads/4ce580a31d1c0f9f3d30548e245e8a12/image.png)
don't find existing contact, and create a new ...Overview
----------------------------------------
Create User Record (civicrm/contact/view/useradd?reset=1&action=add&cid=xxxx)
![image](/uploads/4ce580a31d1c0f9f3d30548e245e8a12/image.png)
don't find existing contact, and create a new one with only email adress of the existing contact
Reproduction steps
----------------------------------------
1. On view contact, click **Actions** and **Create User Record**
2. Complete form with username and password, then validate
3. Search contact with the same email address than the existing contact
- You will find the existing contact, and a new one
- UFid is set on the new account
Expected behaviour
----------------------------------------
UFid should be set to existing account, and no new one should be created
Environment information
----------------------------------------
* __CiviCRM:__ 5.61.4 and the problem must have existed for quite a few previous versions
* __PHP:__ 8.1.15
* __CMS:__ Drupal 9.5.9
* __Database:__ MariaDB 10.5.16
* __Web Server:__ Apache/2.4.53
Comments
----------------------------------------
It seems to me that the problem lies in UFMatch.php, in the synchronizeUFMatch() function, which doesn't retrieve the contact_id if it exists.
As a workaround, I propose replacing lines 252 and 253
```
$contactID = civicrm_api3('Contact', 'create', $contactParameters)['id'];
$ufmatch->contact_id = $contactID;
```
with
```
// If contactID exist, user exist and use it
if (isset($dedupeParameters['contact_id'])) {
$ufmatch->contact_id = $dedupeParameters['contact_id'];
}
else {
// Conatct does not exist, so create a new one
$contactID = civicrm_api3('Contact', 'create', $contactParameters)['id'];
$ufmatch->contact_id = $contactID;
}
```5.63.0https://lab.civicrm.org/dev/core/-/issues/4333Attachment uploader information is missing in case attachments2023-06-04T15:14:55Zahed_compucorpAttachment uploader information is missing in case attachmentsOverview
----------------------------------------
The Case attachments don't have the uploader information. The `created_id` is not supposed to be empty regardless of how you uploaded the attachments i.e. when creating new cases or creat...Overview
----------------------------------------
The Case attachments don't have the uploader information. The `created_id` is not supposed to be empty regardless of how you uploaded the attachments i.e. when creating new cases or creating/editing the related activities.
For the records, the `created_id` field was added in the [#11739](https://github.com/civicrm/civicrm-core/pull/11739) PR / [#CRM-19948](https://issues.civicrm.org/jira/browse/CRM-19948) issue, but they didn't consider the case attachments scenario.
Reproduction steps
----------------------------------------
![attachment-uploader-issuee](/uploads/4e0b28319155ed0b34e477a1a7e793ac/uploader-issue.mp4)
1. Click on **Cases -> New Case**.
2. Under Attachments, upload a file and click **Save**.
3. In the case details page, click on any activity.
4. Under Attachments, upload a file and click **Save**.
Current behaviour
----------------------------------------
Files uploaded in steps two and four, don't have the uploader information i.e. the created_id value is empty.
Expected behaviour
----------------------------------------
Files uploaded in steps two and four should have the uploader information.
Environment information
----------------------------------------
* __CiviCRM:__ _Master/5.61.0/.../5.3.0 (since adding the [created_id field/feature](https://github.com/civicrm/civicrm-core/pull/11739/commits/ae2c7e000bf9548adbf8afd355d2127b0030e670))_
Proposed Solution
----------------------------------------
In the old [#11739](https://github.com/civicrm/civicrm-core/pull/11739) PR, it uses the current logged-in `$contact_id` for the created_id field when calling the method [create](https://github.com/civicrm/civicrm-core/blob/5.61.0/CRM/Core/BAO/File.php#L50):
```php
/**
* BAO object for crm_log table
*/
class CRM_Core_BAO_File extends CRM_Core_DAO_File {
...
public static function create($params) {
$fileDAO = new CRM_Core_DAO_File();
...
if (empty($params['id']) && empty($params['created_id'])) {
$fileDAO->created_id = CRM_Core_Session::getLoggedInContactID();
}
```
For case attachments, another method is called to create the File which is [filePostProcess](https://github.com/civicrm/civicrm-core/blob/5.61.0/CRM/Core/BAO/File.php#L100) :
```php
public static function filePostProcess(...) {
...
$fileDAO = new CRM_Core_DAO_File();
$op = 'create';
if (isset($dao->cfID) && $dao->cfID) {
$op = 'edit';
$fileDAO->id = $dao->cfID;
unlink($directoryName . DIRECTORY_SEPARATOR . $dao->uri);
}
if (!empty($fileParams)) {
$fileDAO->copyValues($fileParams);
}
```
The proposed solution is to set the `$created_id` inside the [filePostProcess](https://github.com/civicrm/civicrm-core/blob/5.61.0/CRM/Core/BAO/File.php#L100) method :
```diff
$fileDAO = new CRM_Core_DAO_File();
$op = 'create';
if (isset($dao->cfID) && $dao->cfID) {
$op = 'edit';
$fileDAO->id = $dao->cfID;
unlink($directoryName . DIRECTORY_SEPARATOR . $dao->uri);
}
+ else if (empty($fileParams['created_id'])) {
+ $fileDAO->created_id = CRM_Core_Session::getLoggedInContactID();
+ }
```
I've created the PR https://github.com/civicrm/civicrm-core/pull/26409 to check the proposed solution.5.63.0https://lab.civicrm.org/dev/core/-/issues/4331SearchKit: Adjusting page size does not adjust number of rows2023-06-01T18:10:50ZlarsssandergreenSearchKit: Adjusting page size does not adjust number of rowsOverview
----------------------------------------
Adjust the page size for a Search Display doesn't change the number of rows shown.
Reproduction steps
----------------------------------------
1. Edit a Search Display.
2. Show Pager
3. ...Overview
----------------------------------------
Adjust the page size for a Search Display doesn't change the number of rows shown.
Reproduction steps
----------------------------------------
1. Edit a Search Display.
2. Show Pager
3. Change Pager to a number less than the number of rows
Current behaviour
----------------------------------------
Number of rows show is not changed. Pager itself is adjusted, but the actual table is not.
Expected behaviour
----------------------------------------
Number of rows shown should be changed.
Environment information
----------------------------------------
masterhttps://lab.civicrm.org/dev/core/-/issues/4330API4 error "Column in order clause is ambiguous"2023-06-07T00:21:50ZsamuelsovAPI4 error "Column in order clause is ambiguous"I have a specific query that used to work but seems to be broken since around CiviCRM 5.60.
I was able to reproduced in master.
This is the api4 call:
```php
$addresses = \Civi\Api4\Address::get()
->addJoin('Contact AS contact', 'LEF...I have a specific query that used to work but seems to be broken since around CiviCRM 5.60.
I was able to reproduced in master.
This is the api4 call:
```php
$addresses = \Civi\Api4\Address::get()
->addJoin('Contact AS contact', 'LEFT', ['master_id.contact_id', '=', 'contact.id'])
->addOrderBy('location_type_id:label', 'ASC')
->setLimit(25)
->execute();
```
`location_type_id` is in Address and as it it doing a join for another address to get the master_id address, it is ambiguous.
Looking at the generated query, we can see that the table prefix is not added in the order by :
```sql
SELECT `a`.`id` AS `id`, `contact`.`display_name` AS `contact.display_name`
FROM civicrm_address a
LEFT JOIN `civicrm_address` `master_id_1` ON `a`.`master_id` = `master_id_1`.`id`
LEFT JOIN `civicrm_contact` `contact` ON `master_id_1`.`contact_id` = `contact`.`id`
ORDER BY FIELD(`location_type_id`,'16','14','1','19','3','15','4','12','2','17','18','20','21','5','11') ASC;
```
Giving the error :
```
ERROR 1052 (23000): Column 'location_type_id' in order clause is ambiguous
```https://lab.civicrm.org/dev/core/-/issues/4329description is wrong for permission to view notes that are marked for author ...2023-06-05T05:06:28Ztpokorradescription is wrong for permission to view notes that are marked for author onlyOverview
----------------------------------------
I am wondering if the label in https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Permission.php#LL785C46-L785C46 is correct.
It is about the permission for viewing all notes. I...Overview
----------------------------------------
I am wondering if the label in https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Permission.php#LL785C46-L785C46 is correct.
It is about the permission for viewing all notes. It says: "even if they're marked admin only", but I would expect: "even if they're marked author only".
according to https://github.com/civicrm/civicrm-core/blob/master/sql/civicrm_data/civicrm_option_group/note_privacy.sqldata.php#L17
see https://chat.civicrm.org/civicrm/pl/ye4bu5w87b81mennu3at5ifcrr
Reproduction steps
----------------------------------------
1. Go to User Permissions in Drupal (/admin/people/permissions)
1. See the permission "CiviCRM: view all notes"
Current behaviour
----------------------------------------
The description says: View notes (for visible contacts) even if they're marked admin only
Expected behaviour
----------------------------------------
The description should say: View notes (for visible contacts) even if they're marked author only
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_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _8.1__
* __CMS:__ Drupal 9.8.5_
Comments
----------------------------------------
see the labels for the options for the notes: None or Author only.
https://github.com/civicrm/civicrm-core/blob/master/sql/civicrm_data/civicrm_option_group/note_privacy.sqldata.php#L17
There is nothing about "admin only"5.63.0https://lab.civicrm.org/dev/core/-/issues/4327GroupTest occasionally failing due to new test2023-06-12T22:23:38ZlarsssandergreenGroupTest occasionally failing due to new testI've noted a [test failure here](https://github.com/civicrm/civicrm-core/blob/40728fa72022780372b2728315e323a55cab76bf/tests/phpunit/api/v4/Entity/GroupTest.php#L234) a couple times over the last few days, e.g. [here](https://test.civicr...I've noted a [test failure here](https://github.com/civicrm/civicrm-core/blob/40728fa72022780372b2728315e323a55cab76bf/tests/phpunit/api/v4/Entity/GroupTest.php#L234) a couple times over the last few days, e.g. [here](https://test.civicrm.org/job/CiviCRM-Core-Matrix-PR/2442/) or [here](https://test.civicrm.org/job/CiviCRM-Core-Matrix-PR/2434/). It looks like the two child groups get flipped sometimes.
This was just added a [few days ago](https://github.com/civicrm/civicrm-core/commit/187159263745660bac548b5cf2b5d30e1b8b9412), so tagging @colemanw.https://lab.civicrm.org/dev/core/-/issues/4326Notice errors on backoffice event registration2023-06-09T23:38:52ZJoeMurrayNotice errors on backoffice event registrationOverview
----------------------------------------
_Register a participant in backoffice. See notice errors._
Reproduction steps
----------------------------------------
1. On dmaster, click on **Events -> Register Event Participant**.
1...Overview
----------------------------------------
_Register a participant in backoffice. See notice errors._
Reproduction steps
----------------------------------------
1. On dmaster, click on **Events -> Register Event Participant**.
1. Select a contact, event fall fundraiser dinner, click **Save**.
1. Get three copies for different line numbers of "Notice: Trying to get property '_id' of non-object in CRM_Event_Form_Participant::formRule()".
Current behaviour
----------------------------------------
![2023-05-31_12-59-37](/uploads/b2ec1cad1728b29ecc09742cd557d759/2023-05-31_12-59-37.png)
```
Notice: Trying to get property '_id' of non-object in CRM_Event_Form_Participant::formRule() (line 825 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Event/Form/Participant.php).
Notice: Trying to get property '_id' of non-object in CRM_Event_Form_Participant::formRule() (line 828 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Event/Form/Participant.php).
Notice: Trying to get property '_action' of non-object in CRM_Event_Form_Participant::formRule() (line 836 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Event/Form/Participant.php).
```
Note: happens when recording payment and when not recording payment.
Expected behaviour
----------------------------------------
_No notice errors_
Environment information
----------------------------------------
dmaster
Comments
----------------------------------------
_Anything else you would like the reviewer to note._5.63.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/4325Extra `<br>` tags inserted into rich text fields2023-06-01T13:38:11ZdtwExtra `<br>` tags inserted into rich text fieldsOverview
----------------------------------------
Extra `<br>` tags being inserted between HTML elements in rich-text fields, including between list items! And two being inserted between paragraphs. The html is clean in the editor, but t...Overview
----------------------------------------
Extra `<br>` tags being inserted between HTML elements in rich-text fields, including between list items! And two being inserted between paragraphs. The html is clean in the editor, but this is how it's being rendered on the front-end.
https://civicrm.stackexchange.com/questions/31535/br-tags-inserted-in-rich-text-fields-custom-fieldsets-when-displayed-as-tabs
Reproduction steps
----------------------------------------
"I added a custom field set to contacts, which I set to appear in a tab, then a 'note' type field and set it to be rich text. On a contact record, I added a couple of paragraphs (by hitting return between them) - looks good on the backend, but 2 x `<br>` tags between each `<p>` appearing on the front-end."
Current behaviour
----------------------------------------
Extra `<br>` tags are added
![CiviCRM_Screenshot_2023-05-31_152744](/uploads/7d62b59e050c00c5b9405a2268685eaf/CiviCRM_Screenshot_2023-05-31_152744.png)
![CiviCRM_Screenshot_2023-05-31_152938](/uploads/182e333899f70faa9405c5fe64e154e8/CiviCRM_Screenshot_2023-05-31_152938.png)
Maybe related to this change: https://issues.civicrm.org/jira/browse/CRM-11598
Expected behaviour
----------------------------------------
Extra `<br>` tags should not be added. Spacing should be handled with CSS.
Comments
----------------------------------------
_Anything else you would like the reviewer to note._5.63.0https://lab.civicrm.org/dev/core/-/issues/4323Date is incorrect when editing a contribution2023-11-09T19:36:12ZJDrueryDate is incorrect when editing a contributionWhen editing a contribution, Date Received is always set 05/30/2013 in the edit dialog. Under Payment Details, the date is correct (see first and second images below). When adding a new date in the Edit Contribution dialog, the popup cal...When editing a contribution, Date Received is always set 05/30/2013 in the edit dialog. Under Payment Details, the date is correct (see first and second images below). When adding a new date in the Edit Contribution dialog, the popup calendar always defaults to May of 2013. The year selector doesn't allow selecting anything after 2013 (third and fourth images).
A workaround is to change Date Preferences for activityDateTime. Changing the end offset from the default setting of 10 to 0 allows for dates up to the current year. I suspect this bug is caused by the end offset being interpreted as number of years before the current year, instead of number of years after the current year. Setting the end offset to -10 has the same effect as setting it to +10 (only dates 10 years before the current year are allowed).
![image](/uploads/68cdb261f247a35c092d34cab44e8f52/image.png)
![image](/uploads/501943aeba9f96ff61e9a0cd5c7449d5/image.png)
![image](/uploads/cba0d6b5a42f2b81ec28cd8e77890062/image.png)
![image](/uploads/d4d9340b4c377ef828a4a4cadf3a09ac/image.png)5.66.0