CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2022-12-08T09:42:33Zhttps://lab.civicrm.org/dev/core/-/issues/4023Check Clean URLs check: Frequent error noise when no contribution pages and p...2022-12-08T09:42:33ZJonGoldCheck Clean URLs check: Frequent error noise when no contribution pages and public can't access events#### Replication Steps
* Be on WordPress.
* Have no contribution pages.
* Have at least 1 active event.
* Remove "CiviEvent: register for events" permission from anonymous user.
Get a bunch of these errors:
```
[error]
$Fatal Error De...#### Replication Steps
* Be on WordPress.
* Have no contribution pages.
* Have at least 1 active event.
* Remove "CiviEvent: register for events" permission from anonymous user.
Get a bunch of these errors:
```
[error]
$Fatal Error Details = array:3 [
"message" => "You do not have permission to access this page."
"code" => null
"exception" => CRM_Core_Exception {#8688
#message: "You do not have permission to access this page."
#code: 0
#file: "/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php"
#line: 615
#cause: null
-_trace: null
-errorData: array:1 [
"error_code" => 0
]
trace: {
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:615 {
› $civicrm_wp_title = ts('You do not have permission to access this page.');
› throw new CRM_Core_Exception(ts('You do not have permission to access this page.'));
› }
}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php:62 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Event/Page/EventInfo.php:42 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/civicrm.php:1199 { …}
/home/jon/local/nmysite/web/wp-content/plugins/civicrm/includes/civicrm.basepage.php:380 { …}
/home/jon/local/nmysite/web/wp-includes/class-wp-hook.php:308 { …}
/home/jon/local/nmysite/web/wp-includes/class-wp-hook.php:332 { …}
/home/jon/local/nmysite/web/wp-includes/plugin.php:565 { …}
/home/jon/local/nmysite/web/wp-includes/class-wp.php:797 { …}
/home/jon/local/nmysite/web/wp-includes/functions.php:1332 { …}
/home/jon/local/nmysite/web/wp-blog-header.php:16 { …}
/home/jon/local/nmysite/web/index.php:17 { …}
}
}
]
```
I want to ping Eli Lisseck but I don't think they're pingable?https://lab.civicrm.org/dev/core/-/issues/4019Contribution page with recurring payment and Separate membership payment fail...2023-11-23T06:52:26ZshaneonabikeContribution page with recurring payment and Separate membership payment fails to pass contributionRecurIDOverview
----------------------------------------
_Sorry for the long title_
Contribution pages which are setup with recurring memberships, additional contribution amounts, and separate membership payment result in no ```contributionRec...Overview
----------------------------------------
_Sorry for the long title_
Contribution pages which are setup with recurring memberships, additional contribution amounts, and separate membership payment result in no ```contributionRecurID``` being setup and therefore (in the case of [iATS](https://github.com/iATSPayments/com.iatspayments.civicrm/issues/397)) no recurring payment setup.
In the case of iATS, and probably other payment processors, this ID is actually used to setup the recurring payment. Ironicaly, the is_recur is being passed so this seems clearly a bug.
Reproduction steps
----------------------------------------
1. Create a Membership Contribution page
2. Check-off Contribution Amounts section enabled
2. Add a few additional contribution amounts
3. Don't set recurring for the Contribution Amounts (although another interesting testing scenario)
4. Add a Membership with the option to renew
5. Check off Separate Membership payment_ <== this is the key
6. Use this form (test or live)
7. Choose not to add an additional contribution
8. Choose your membership and check-off auto-renew
9. Process the form
10. No client code is returned, client is set as auto-renew but there is no payment token setup (```contributionRecurID```)
![201234614-daaba710-a38d-4628-a843-951a2152dcf8](/uploads/886562673d42fb45f1e1ebb38903b971/201234614-daaba710-a38d-4628-a843-951a2152dcf8.png)
Current behaviour
----------------------------------------
The following occurs:
+ Membership transaction is made with ```is_recur``` set, but no ```contributionRecurID``` set
+ Transaction completes, but no recurring account is created (at least for iATS) because of missing ID
Ironically, turning off the ```Separate Contribution Amount``` results in the ID to be created, and everything runs smoothly. The problem with this scenario is there are loads of people who might want to do a one-time donation, but not have that repeat each year.
```
nov. 10 19:06:12 [warning] params array (
'qfKey' => 'cut',
'entryURL' => 'cut',
'email-Primary' => 'cut',
'first_name' => 'Administrateur',
'last_name' => 'SymbioTIC',
'street_address-1' => '312312',
'city-1' => '312',
'postal_code-1' => '312',
'country-1' => '1039',
'state_province-1' => '1110',
'phone-Primary-1' => '321312',
'preferred_language' => 'fr_CA',
0 => '',
1 => '',
'group' =>
array (
2 => '',
3 => '',
),
'custom_11' => 'test',
'contact_sub_type_hidden' => 'Membre_ami',
'hidden_processor' => '1',
'credit_card_number' => 'testcc',
'cvv2' => '123',
'credit_card_exp_date' =>
array (
'm' => '5',
'Y' => '2032',
),
'credit_card_type' => 'Visa',
'billing_first_name' => 'Administrateur',
'billing_middle_name' => '',
'billing_last_name' => 'SymbioTIC',
'billing_street_address-5' => '312312',
'billing_city-5' => '312',
'billing_state_province_id-5' => '1110',
'billing_postal_code-5' => '312',
'billing_country_id-5' => '1039',
'payment_processor_id' => '4',
'auto_renew' => true,
'priceSetId' => '9',
'price_16' => '60',
'price_18' => '-1',
'selectProduct' => '',
'MAX_FILE_SIZE' => '83886080',
'ip_address' => 'cut',
'amount' => '30.000000000',
'amount_level' => 'null',
'selectMembership' => '4',
'year' => '2032',
'month' => '5',
'card_type_id' => 1,
'pan_truncation' => '2220',
'currencyID' => 'CAD',
'is_pay_later' => 0,
'is_recur' => 1,
'frequency_interval' => '1',
'frequency_unit' => 'year',
'invoiceID' => 'cut',
'is_quick_config' => 1,
'email-5' => 'cut',
'description' => 'Contribution en ligne: Adhésion Membre Ami',
'accountingCode' => NULL,
'is_test' => 1,
'campaign_id' => NULL,
'middle_name' => '',
'email' => 'cut',
'street_address' => '312312',
'city' => '312',
'state_province' => 'QC',
'postal_code' => '312',
'country' => 'CA',
'cms_contactID' => '2',
'skipLineItem' => 1,
'total_amount' => '30.000000000',
'tax_amount' => 0.0,
'contactID' => '2',
'financialTypeID' => '2',
'trxn_id' => NULL,
'contributionID' => 384,
)
nov. 10 19:06:12 [warning] is_recur: false
```
Expected behaviour
----------------------------------------
+ Choosing ```Separate Contribution Amount``` should not lead to a missing ContributionRecurID
+ ID is passed and a recurring account is created properlyhttps://lab.civicrm.org/dev/core/-/issues/4011Formbuilder: Error in date selection of grouped activities2022-11-30T08:39:02ZjmargrafFormbuilder: Error in date selection of grouped activitiesOverview
----------------------------------------
The data range picker of the Formbuilder does not work for Activities grouped by acitivity_type.
It should show the sum of activities per activity_type in a defined data range.
Instead th...Overview
----------------------------------------
The data range picker of the Formbuilder does not work for Activities grouped by acitivity_type.
It should show the sum of activities per activity_type in a defined data range.
Instead the result always shows the total sum of activities per activitiy_type - no matter what date range i select.
Reproduction steps
----------------------------------------
1. create a new Packaged Search with Searchkit. [saved-search.txt](/uploads/ecc2154067e2c15e2993679fd645ff54/saved-search.txt) with the following API Query Info:
```
{
"version": 4,
"select": [
"COUNT(subject) AS COUNT_subject",
"activity_type_id:label"
],
"orderBy": [],
"where": [],
"groupBy": [
"activity_type_id"
],
"join": [],
"having": []
}
```
2. Create an Table to view the Saved Search in a Table
3. Create a new Search Form with Formbuilder using this Saved Search Table
```
<div af-fieldset="">
<af-field name="activity_date_time" defn="{input_type: 'Select', search_range: true, input_attrs: {}}" />
<crm-search-display-table search-name="debug_activity" display-name=""></crm-search-display-table>
</div>
```
4. Add the date picker "date of the activity"
5. Use the Formbuilder and search for grouped data in a certain time range
Current behaviour
----------------------------------------
`COUNT_subject` does always show the same sum, no matter what date selection i choose
![data-range-2](/uploads/7612612fbe53450efee51373fa9f6000/data-range-2.png)
![issue-data-range-no-selection](/uploads/9dd3650f48840c5e1405db15433003c5/issue-data-range-no-selection.png)
![issue-data-range](/uploads/840e2efea6d12f4a6baf15b55bddf833/issue-data-range.png)
Expected behaviour
----------------------------------------
`COUNT_subject` should show the number of activities of a certain actitity_type in the defined data range.
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:__ _Firefox 107.0
* __CiviCRM:__ 5.50.4
* __PHP:__ 7.4.33
* __CMS:__ Drupal 9.4.8
* __Database:__ MySQL 5.7.7/MariaDB 10.4/..._
* __Web Server:__ _Apache 2.4/Nginx 1.16/..._
Comments
----------------------------------------
_Anything else you would like the reviewer to note._https://lab.civicrm.org/dev/core/-/issues/4003Adding contacts via profile should reflect in source2023-01-24T16:14:59ZyashodhaAdding contacts via profile should reflect in source It would be helpful to have source field reflect the date of creation of contact and profile used.
**Proposal**
When a contact is created via a standalone profile, this information is added to the source field of the contact.
It shou... It would be helpful to have source field reflect the date of creation of contact and profile used.
**Proposal**
When a contact is created via a standalone profile, this information is added to the source field of the contact.
It should show : Profile *'profile name'* on *added date*.
This would be helpful in searches and very relevant to source field.yashodhayashodhahttps://lab.civicrm.org/dev/core/-/issues/3996Event Registration that has error in Profile should continue to propagate Lin...2022-11-22T14:36:05ZshaneonabikeEvent Registration that has error in Profile should continue to propagate Line ItemsTo be honest I didn't know how to clearly define this title so feel free to change it.
## Problem
We encountered an interesting situation whereby during an Event registration the actual payment went through, but the Line items were mis...To be honest I didn't know how to clearly define this title so feel free to change it.
## Problem
We encountered an interesting situation whereby during an Event registration the actual payment went through, but the Line items were missing. When I looked further I discovered that there was an error due to missing / incorrectly configured fields in a Profile that was part of the Event registration.
This Profile was throwing an Exception, because it could not insert the record into the DB. I realize it makes sense to actually return that Exception, but what I question is whether the line items shouldn't be recorded. In this case, the transaction is completed (below), but the line items aren't there because of the exception.
![Selection_002](/uploads/45666402495106c8814a8de1d2837f1b/Selection_002.png)
## Recreate
1. Create a Custom Field set associated to a Contact, and add several fields
2. Create profile and add those fields
3. Create an Event
4. Add that Profile to the Event
5. Add a custom Price Set with several fields
6. Save
From this point, I'm not certain how this came about but I'm guessing the next steps would be:
1. Create a new set of Custom Fields identical to above and recreate associated to Participant and your Event type
1. Delete the first original Custom Field set, but not the profile
2. Register for the Event
I think where this happens is when the actual ```entity_id``` clashes (well in my case it was). So you would need to register multiple times to make this happen. In the DB teh value table for us was
```
civicrm_value_collector_det_16 | CREATE TABLE `civicrm_value_collector_det_16` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Default MySQL primary key',
`entity_id` int(10) unsigned NOT NULL COMMENT 'Table that this extends',
`name_of_individual_collecting_th_50` varchar(255) DEFAULT NULL,
`is_someone_collecting_this_order_51` tinyint(4) DEFAULT NULL,
`phone_number_52` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_entity_id` (`entity_id`),
KEY `INDEX_phone_number_52` (`phone_number_52`),
KEY `INDEX_name_of_individual_collecting_th_50` (`name_of_individual_collecting_th_50`),
CONSTRAINT `FK_civicrm_value_collector_det_16_entity_id` FOREIGN KEY (`entity_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=140 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci |
```
## Actual Error
_DB Error: Constraint_ via
```
[debug_info] => INSERT INTO civicrm_value_collector_det_16 ( `is_someone_collecting_this_order_51`,
`name_of_individual_collecting_th_50`,`phone_number_52`,`entity_id` ) VALUES ( 0,'','',128 )
ON DUPLICATE KEY UPDATE `is_someone_collecting_this_order_51` = 0,
`name_of_individual_collecting_th_50` = '',`phone_number_52` = ''
[nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails
(`sitesite`.`civicrm_value_collector_det_16`, CONSTRAINT
`FK_civicrm_value_collector_det_16_entity_id` FOREIGN KEY (`entity_id`)
REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
```
## Possible improvements
1. Process the transaction
2. Process line items
3. Save to DB
4. Process Profiles after?
or
1. Process transaction
2. Process Profile (if an exception cache it)
3. Continue as before
4. Throw Exception at end?
I'm not sure, but the fact that the transaction is passed we should ensure that the line items are saved too.
Sorry for the long text!https://lab.civicrm.org/dev/core/-/issues/3987Scheduled reminders can't be used with memberships with autorenewal disabled2022-11-17T07:21:23Zaydunsaidan.saunders@squiffle.ukScheduled reminders can't be used with memberships with autorenewal disabledAs described in https://civicrm.stackexchange.com/q/42905/225 scheduled reminders can't be used for memberships where autorenewal is not offered. Autorenewal has to be optional or required.As described in https://civicrm.stackexchange.com/q/42905/225 scheduled reminders can't be used for memberships where autorenewal is not offered. Autorenewal has to be optional or required.https://lab.civicrm.org/dev/core/-/issues/3971SearchKit data segmentation: add Clone and Export actions2022-11-10T07:04:03ZherbdoolSearchKit data segmentation: add Clone and Export actionsCurrently there are Edit and Delete actions. It would be useful to also have Clone and Export actions, just like the main SearchKit tab.Currently there are Edit and Delete actions. It would be useful to also have Clone and Export actions, just like the main SearchKit tab.https://lab.civicrm.org/dev/core/-/issues/3970SearchKit data segmentation: ability to AND/OR conditions per item2022-11-10T16:53:45ZherbdoolSearchKit data segmentation: ability to AND/OR conditions per itemI'm guessing that the conditions are currently AND. I have a use case for needing an OR if this is possible.
For example, a field either has a specific string OR that same field is blank.I'm guessing that the conditions are currently AND. I have a use case for needing an OR if this is possible.
For example, a field either has a specific string OR that same field is blank.https://lab.civicrm.org/dev/core/-/issues/3969Notice: Undefined offset: 1 in /var/www/html/civicirm/wp-content/plugins/civi...2023-01-17T02:01:54ZyodatakNotice: Undefined offset: 1 in /var/www/html/civicirm/wp-content/plugins/civicrm/civicrm/CRM/Utils/Date.php on line 908Overview
----------------------------------------
I got this error showing in civicrm on PHP7.4 and civicrm 5.55.0, Wordpres 6.1 , Nginx
Reproduction steps
----------------------------------------
Go to a report and on top this show
N...Overview
----------------------------------------
I got this error showing in civicrm on PHP7.4 and civicrm 5.55.0, Wordpres 6.1 , Nginx
Reproduction steps
----------------------------------------
Go to a report and on top this show
Notice: Undefined offset: 1 in /var/www/html/civicrm/wp-content/plugins/civicrm/civicrm/CRM/Utils/Date.php on line 908https://lab.civicrm.org/dev/core/-/issues/3959Event Scheduled Reminder Behavior2022-11-10T07:20:20ZLKuttnerEvent Scheduled Reminder BehaviorI am wondering if this behavior has been changed-- I did not see any online mention of a change with Scheduled Reminders.
Scenario: A schedule event reminder was set for 24 hours before the event start time 4:00 PM Tuesday.
On Monday at...I am wondering if this behavior has been changed-- I did not see any online mention of a change with Scheduled Reminders.
Scenario: A schedule event reminder was set for 24 hours before the event start time 4:00 PM Tuesday.
On Monday at 4:00 PM, 24 Hours before the event, the reminder is successfully sent to registered attendees.
On Tuesday, the day of the event, additional contacts register.
Expected behavior: The scheduled reminder that was sent on the previous day is NOT sent to new registrants.
Experienced behavior: The reminder scheduled for the previous day is sent ten minutes after a new contact registered.
I do not find any explanation for the later sent reminder emails.
This is with CiviCRM 5.45.7 on Drupal 7 with PHP 7.3.29https://lab.civicrm.org/dev/core/-/issues/3930Managed entity: creating custom fields with same label causes fatal error bec...2022-10-24T09:18:16ZherbdoolManaged entity: creating custom fields with same label causes fatal error because of db index.Overview
----------------------------------------
It seems a bit over the top to have fatal errors when custom field labels are not unique. This would (likely) only appear if someone had a managed entity for the custom field. Or if they...Overview
----------------------------------------
It seems a bit over the top to have fatal errors when custom field labels are not unique. This would (likely) only appear if someone had a managed entity for the custom field. Or if they were using the API directly.
Example use-case
----------------------------------------
1. Create a custom group. Add a custom field.
2. Go to API4, choose CustomField, create. Create a new custom field with the same label.
Current behaviour
----------------------------------------
> DB Error: already exists
Proposed behaviour
----------------------------------------
Remove the index from the database for the label. The custom field index on the name should be enough. The UI will still have validation to prevent duplicate labels, but that's necessary because there's no way to specify the label and name separately in the UI.https://lab.civicrm.org/dev/core/-/issues/3924Afform linter has only been running on core-core2022-10-20T07:29:10ZtottenAfform linter has only been running on core-coreOverview
----------------------------------------
There is a linting test for Civi's Angular-HTML files (`tests/phpunit/Civi/Angular/PartialSyntaxTest.php`). However, the linting is not applied consistently, and several files are not in...Overview
----------------------------------------
There is a linting test for Civi's Angular-HTML files (`tests/phpunit/Civi/Angular/PartialSyntaxTest.php`). However, the linting is not applied consistently, and several files are not in compliance.
Having files which pass the linter ensures that:
* Modified/forked files can be easily compared to their originals.
* Files can be filtered/processed via `hook_alterAngular`.
Current behaviour
----------------------------------------
`PartialSyntaxTest` scans all available Angular modules at the time of test. In effect, it scans `civicrm-core:ang/**.html`.
When the test runs, `search_kit` and `afform` are not active, so not `civicrm-core:ext/search_kit/ang/**.html` and `civicrm-core:ext/afform/*/ang/**.html` are not scanned.
NOTE: This mechanism is built on top of PHP's `DOMDocument` (generally) and `phpQuery` (specifically). To test an HTML partial, we basically say:
```php
$doc = (new DOMDocument(...))->loadHTML($inputString);
$outputString = $doc->saveHTML();
assert $inputString === $outputString
```
So a document is considered good if it is stable/consistent across reads+writes.
Expected behaviour
----------------------------------------
All Angular HTML in `civicrm-core.git` should be scanned by a linter.
All files should pass.
Comments
----------------------------------------
There is a helper script `tools/scripts/check-angular.php` which can validate+reformat file. The script is not super-sophisticated -- but just to get a sense of it, one might call:
```
php tools/scripts/check-angular.php --colordiff $PWD/ext/search_kit/ang/crmSearchTasks/crmSearchTaskUpdate.html
```
In principal, we could run this on all the HTML files and simply commit the reformatted version. Then we might rework `PartialSyntaxTest` to plug the hole in the workflow.
But...
There's the issue of the actual changes in the formatting. It is important to note that PHP's `DOMDocument` has two formatting modes -- HTML and XML. The parser here has to use one or the other. These differ in several small ways -- eg some notations work the same in both, but some notations are rejected by one while accepted by the other. Going from memory (*based on testing yesterday*), here are some notable differences:
| Topic | Example | HTML Mode Support | XML Mode Support | Comment |
| -- | -- | -- | -- | -- |
| Standard tag, text | `<div>Hello</div>` | :white_check_mark: Read-write | :white_check_mark: Read-write | `div`, `span`, `p`, etc |
| Standard tag, empty-text | `<div></div>` | :white_check_mark: Read-write | :warning: Read-only<br/> (Prefer `<div/>`) | `div`, `span`, `p`, etc |
| Standard tag, self-closing | `<div/>` | :warning: Read-only<br/> (Prefer `<div></div>`) | :white_check_mark: Read-write | `div`, `span`, `p`, etc |
| Standard tag, self-closing, implicit | `<input>` | :white_check_mark: Read-write | :octagonal_sign: Error | `input`, `img`, `hr`, `br`, etc |
| Standard tag, self-closing, explicit | `<input/>` | :warning: Read-only<br/>(Prefer `<input>`) | :white_check_mark: Read-write | |
| Custom tag, text | `<custom>my text</custom>` | :white_check_mark: Read-write | :white_check_mark: Read-write | |
| Custom tag, empty-text | `<custom></custom>` | :white_check_mark: Read-write | :warning: Read-only<br/>(Prefer `<custom/>`) | |
| Custom tag, self-closing | `<custom/>` | :warning: Read-only<br/>(Prefer `<custom></custom>`) | :white_check_mark: Read-write | |
| Value-less attributes (custom or standard) | `<foo ng-list>` | :white_check_mark: Read-write | :octagonal_sign: Error | |
| Value for `disabled` | `<foo disabled="abcd">` | :octagonal_sign: Discard value | :white_check_mark: Read-write | |
(*I wanted to see this table because I had the nagging feeling that we were boxed in somehow -- and this does show that there are errors in either case. But these can be worked through...*)
I believe that running the auto-format (*at this moment*) would pose a few issues:
* For HTML mode (status-quo), it would discard the `disabled="..."` that appears in ~5 components. (*I suspect that this status-quo is actually a bug -- but only symptomatic when using `alterAngular`.*) We could update affected files. This may require changing some contracts.
* For XML mode, it would fail to parse `<input>`, `<foo ng-list>`, and similar. We could update these (`<input/>` and `<foo ng-list=",">`), though this would affect many more lines of code.
* In either mode, some files need to flip between `<foo></foo>` and `<foo/>`. Regex can control this a bit more tightly, though. We would need to choose which form we like.
There's also the possibility (out of left field) to replace the current parser or formatter or validator. But that feels like an even bigger rabbit hole.https://lab.civicrm.org/dev/core/-/issues/3919User-selected Field Transformations in Search Kit can cause a DB constraint v...2022-10-20T07:30:18ZbrienneUser-selected Field Transformations in Search Kit can cause a DB constraint violation errorOverview
----------------------------------------
Within Search Kit, a user is not always limited to what type of Field Transformation they can use on a particular column, which can result in a DB constraint violation error.
Reproductio...Overview
----------------------------------------
Within Search Kit, a user is not always limited to what type of Field Transformation they can use on a particular column, which can result in a DB constraint violation error.
Reproduction steps
----------------------------------------
1. Go to **Search > Search Kit** and click **NEW SEARCH**
1. Create a Search with *Contributions* as the primary Entity. Name and Save the search.
1. Click **Entity+** to add *Contribution Contacts* as a second Entity
1. Click **Group By** and select **Contact ID**
1. Expand *Field Transformations* and select **Sum** from the drop down menu on the Contact ID column
1. Click **+Add** underneath the highlighted *Compose Search* block, and select **Smart Group**
1. Give the group a title and make sure the *Contact Column* has **Contact ID** selected
1. Go to **Contacts > Manage Groups** and click on **Contacts** in the row of your test Smart Group
1. Got an error "**Fatal error: DB error**".
Current behaviour
----------------------------------------
This issue was discovered when a client set a transformation of "Sum" on the Contact ID field within a Search Kit search with Contributions as the primary entity, Grouped By Contact Id, and then created a Smart Group from that search. When the user went to **Manage Groups** and clicked on **Contacts** next to the Smart Group in question, they received an error screen with a DB constraint violation. Within the ConfigandLog, the error was as follows:
```json
+message: "DB Error: constraint violation"
+userinfo: """
INSERT INTO civicrm_group_contact_cache (contact_id, group_id)\n
SELECT contact_id, group_id FROM civicrm_tmp_e_gccache_bcc919fe8bd625701eed1c8b83638db1\n
GROUP BY contact_id,group_id\n
[nativecode=1452 ** Cannot add or update a child row: a foreign key constraint fails (`client_civi`.`civicrm_group_contact_cache`, CONSTRAINT `FK_civicrm_group_contact_cache_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `civicrm_contact` (`id`) ON DELETE CASCADE)]
```
This happened because the the Sum transformation was selected on the Contact ID field, as shown within Search Kit below:
![Selection_068](/uploads/b4c5bfd830ccdcc6e719e698daa02a3e/Selection_068.png)
![Selection_069](/uploads/1e09d9de5bc15ba1a88ebed3b23bc2ce/Selection_069.png)
Expected behaviour
----------------------------------------
Field Transformations on columns that should only return a singe value (i.e. Contact ID) should be restricted so that a user does not inadvertently cause a constraint violation via Search Kit.
Environment information
----------------------------------------
* __CiviCRM:__ _Master/5.53.0https://lab.civicrm.org/dev/core/-/issues/3917Incorrect currency displayed for contribution2023-11-23T07:47:00ZKurund JalmiIncorrect currency displayed for contributionCreate a contribution page and set the currency other than default currency.
Confirm and thank you page displays default currency instead of one that's configured.Create a contribution page and set the currency other than default currency.
Confirm and thank you page displays default currency instead of one that's configured.Kurund JalmiKurund Jalmihttps://lab.civicrm.org/dev/core/-/issues/3914Missing getRoleNames() method in WordPress System Utility2022-11-01T08:51:34ZBastien HoMissing getRoleNames() method in WordPress System UtilityOverview
----------------------------------------
Some extensions use the `CRM_Core_Config::singleton()->userSystem->getRoleNames()` method, which is not implemented for WordPressOverview
----------------------------------------
Some extensions use the `CRM_Core_Config::singleton()->userSystem->getRoleNames()` method, which is not implemented for WordPresshttps://lab.civicrm.org/dev/core/-/issues/3912Recreate core screens as Search Displays2024-03-01T22:32:39ZwmortadaRecreate core screens as Search DisplaysSee also dev/core#3761 for the SK/FB roadmap.
This is a meta issue for the work required to recreate many core screens using SearchKit and FormBuilder.
These new screens are in one of three locations:
1. Directly in core ([list](#core...See also dev/core#3761 for the SK/FB roadmap.
This is a meta issue for the work required to recreate many core screens using SearchKit and FormBuilder.
These new screens are in one of three locations:
1. Directly in core ([list](#core-replacements)): these screens replace the old screens, and often the old code is removed. There is no option to revert to the old versions.
2. In the [CiviCRM Administration UI](https://github.com/civicrm/civicrm-core/tree/master/ext/civicrm_admin_ui) extension ([list](#adminui)): these screens replace the old screens but administrators can either disable the extension, or disable individual screens (by removing the URL in FormBuilder). These will eventually become the standard screens and old code removed - but need a bit more testing and verification.
3. In the [CiviCRM Search UI](https://github.com/civicrm/civicrm-core/tree/master/ext/civicrm_search_ui) extension ([list](#searchui)): these screens don't have the full functionality of the screens they will eventually replace. In some cases, new features in SK are needed before they can fully replace existing screens. They are still useful and are a basis for further development. These may eventually migrate into AdminUI.
We welcome contributions from anyone who wants to get involved with this. If you need any help getting started, ask in the \~AdminUI channel on Mattermost.
It builds on the work started by Coleman to create the [CiviCRM Administration UI](https://github.com/civicrm/civicrm-core/tree/master/ext/civicrm_admin_ui) extension. Many more screens were created during the Manchester Sprint in October 2022.
Notes:
1. Join the \~AdminUI channel on Mattermost.
2. If you want to work on any of these, please add your name to the item and keep it updated as work progresses.
3. Look at the screens that have already been converted and try to follow a similar format.
4. The aim is to include all the functionality of the existing screens but without twisting SK in knots to exactly reproduce an existing screen.
5. Each screen will have at least three files: `.aff.html` and `.aff.json` copied from the `<civicrm.files>/ang` directory and `.mgd.php` exported from API Explorer.
6. If you can't reproduce some aspect of an existing screen, create a WIP (Work in Progress) PR and note it below. Someone else may know how to do that, or it may need a new feature adding to SK.
7. Some people found creating the PR harder than creating the new screen. We don't want that to be a barrier to getting these screens converted so if you don't want to create the PR, just [email me](mailto:aidan.saunders@squiffle.uk?subject=%22AdminUI%22) with the 3 files to and I'll do the PR.
8. There are more screens to do than those below. If you want to do something else, please add it to this page.
## AdminUI pages
| Form | URL | Status | PR | Who | Notes |
|------|-----|--------|----|-----|-------|
| Profiles | `civicrm/admin/uf/group` | Merged | [24715](https://github.com/civicrm/civicrm-core/pull/24725) | Alain | |
| Location Types | `civicrm/admin/locationType` | Merged | [24722](https://github.com/civicrm/civicrm-core/pull/24722) | @wmortada | |
| Financial Types | `civicrm/admin/financial/financialType` | Submitted | [24720](https://github.com/civicrm/civicrm-core/pull/24720) | Nicolas | |
| Financial Accounts | `civicrm/admin/financial/financialAccount` | Merged | [24730](https://github.com/civicrm/civicrm-core/pull/24730) | Dave J | |
| Relationship Types | `/civicrm/admin/reltype` | Merged | [24709](https://github.com/civicrm/civicrm-core/pull/24709) | Damilare | |
| Grant Status Options | `/civicrm/admin/options/grant_status` | Submitted | [24729](https://github.com/civicrm/civicrm-core/pull/24729) | Damilare | |
| Grant Type | `/civicrm/admin/options/grant_type` | Submitted | [24729](https://github.com/civicrm/civicrm-core/pull/24729) | Damilare | |
| Option Values | `civicrm/admin/options` | Blocked | | Patrick | To be used for all option values |
| Import/Export Mappings | civicrm/admin/mapping | Submitted | [28509](https://github.com/civicrm/civicrm-core/pull/28509) | @pradeep | |
| Label Formats | civicrm/admin/labelFormats | Done | [28513](https://github.com/civicrm/civicrm-core/pull/28513) | @dewymercerais | |
| Manage Premiums | civicrm/admin/contribute/managePremiums | Submitted | [28540](https://github.com/civicrm/civicrm-core/pull/28540) | @AllenShaw | |
| Personal Campaign Pages | civicrm/admin/pcp | Done | [29541](https://github.com/civicrm/civicrm-core/pull/29541) | @kcristiano | |
| Print Page (PDF) Formats | civicrm/admin/pdfFormats | done | [28520](https://github.com/civicrm/civicrm-core/pull/28520) | @usha.makoa | |
| Settings - SMS Provider | civicrm/admin/sms/provider | Submitted | [28512](https://github.com/civicrm/civicrm-core/pull/28512) | @pradeep | |
| Event Templates | civicrm/admin/eventTemplate | Submitted | [28514](https://github.com/civicrm/civicrm-core/pull/28514) | @pradeep | |
| Event Name Badge Layouts | civicrm/admin/badgelayout | Done | [28518](https://github.com/civicrm/civicrm-core/pull/28518) | @dewymercerais | |
| Settings - Payment Processor | civicrm/admin/paymentProcessor | done | | | |
| Headers, Footers, and Automated Messages | civicrm/admin/component | | [28484](https://github.com/civicrm/civicrm-core/pull/28484) | @kcristiano @19ATF72 | |
| Message Templates | civicrm/admin/messageTemplates | done | | | |
| Membership Types | civicrm/admin/member/membershipType | WIP | | @ayduns | |
| Membership Status Rules | civicrm/admin/member/membershipStatus | Done | [28480](https://github.com/civicrm/civicrm-core/pull/28480) | @usha.makoa | |
| Campaigns | the search doesn't exist in core (the dashboard does and is already in SearchUI) | abandonned | | | |
| Discounts | civicrm/cividiscount | | | Coleman | [CiviDiscount MR](https://lab.civicrm.org/extensions/cividiscount/-/merge_requests/284 "Convert all tables to SearchKit displays") |
| Dedupe Exceptions | civicrm/dedupe/exception | | | | see [comment](https://github.com/civicrm/civicrm-core/pull/25522#issue-1575266329) |
| Contact Types | civicrm/admin/option/subtype | done | | | |
| Joblogs | civicrm/admin/joblog | Merged | [26732](https://github.com/civicrm/civicrm-core/pull/26732) | @ayduns | |
| Mail Accounts | civicrm/admin/mailSettings | Merged | [26733](https://github.com/civicrm/civicrm-core/pull/26733) | @ayduns | Does not yet support oauth-client method to add mail accounts |
| Participant Status | civicrm/admin/participant_status | | | @ayduns | see [conditional in-place edit](https://lab.civicrm.org/dev/core/-/issues/4406 "SearchKit: make 'inplace edit' conditional") |
| Payment Processor Type | civicrm/admin/paymentProcessorType | | | | Doesn't exist in menus. Don't think this is needed as processor types added by extensions, not UI. |
| Date Preferences | civicrm/admin/setting/preferences/date | | [28483](https://github.com/civicrm/civicrm-core/pull/28483) | @pradpnayak | |
| ACL Assign Users to Roles | civicrm/admin/acl/entityrole | Merged | [26925](https://github.com/civicrm/civicrm-core/pull/26925) | @ayduns | |
More challenging:
| Form | URL | Status | PR | Who | Notes |
|------|-----|--------|----|-----|-------|
| Message Templates | civicrm/admin/messageTemplates | On hold | [24981](https://github.com/civicrm/civicrm-core/pull/24981) | @ayduns | There is a new Message Admin Core extension. See comments on PR |
| Option Groups/Values | civicrm/admin/options | In progress | [25387](https://github.com/civicrm/civicrm-core/pull/25387) | @colemanw | |
| Schedule Reminders | civicrm/admin/scheduleReminders | Merged | [26896](https://github.com/civicrm/civicrm-core/pull/26896) | @colemanw | |
| Settings - Scheduled Jobs | civicrm/admin/job | Merged | [26060](https://github.com/civicrm/civicrm-core/pull/26060) | @ayduns | |
| Price Sets | civicrm/admin/price | WIP | | @ayduns | |
| Price set fields | civicrm/admin/price/field | WIP | | @ayduns | |
| Manage Contribution Pages | civicrm/admin/contribute | Merged | [24937](https://github.com/civicrm/civicrm-core/pull/24937) | @ayduns | |
| Manage Events | civicrm/event/manage | Merged | [28476](https://github.com/civicrm/civicrm-core/pull/28476) | @alainb (Alain Benbassat) | |
| CiviCRM Reports | civicrm/report/list | WIP - need PR (see wip [28511](https://github.com/civicrm/civicrm-core/pull/28511)) to add a pseudo field with components list | [28480](https://github.com/civicrm/civicrm-core/pull/28480) | @usha.makoa | |
| Create New Report from Template | civicrm/admin/report/template/list | | | | The Report Templates Entity lacks in SK |
| Manage Groups | civicrm/group | Merged | [26261](https://github.com/civicrm/civicrm-core/pull/26261) | @samuelsov | |
Other Option Values (when main Option Values is done):
| Form | URL | Status | PR | Who | Notes |
|------|-----|--------|----|-----|-------|
| Accepted Credit Cards Options | civicrm/admin/options/accept_creditcard | | | | |
| Activity Type Options | civicrm/admin/options/activity_type | | | | |
| Addressee Type Options | civicrm/admin/options/addressee | | | | |
| Communication Style Options | civicrm/admin/options/communication_style | | | | |
| Custom Search Options | civicrm/admin/options/custom_search | | | | |
| Email Greeting Type Options | civicrm/admin/options/email_greeting | | | | |
| From Email Address Options | civicrm/admin/options/from_email_address | | | | |
| Gender Options | civicrm/admin/options/gender | | | | |
| Individual contact suffixes Options | civicrm/admin/options/individual_suffix | | | | |
| Instant Messenger (IM) screen-names Options | civicrm/admin/options/instant_messenger_service | | | | |
| Languages Options | civicrm/admin/options/languages | | | | |
| Mobile Phone Providers Options | civicrm/admin/options/mobile_provider | | | | |
| Payment Methods Options | civicrm/admin/options/payment_instrument | | | | |
| Phone Type Options | civicrm/admin/options/phone_type | | | | |
| Postal Greeting Type Options | civicrm/admin/options/postal_greeting | | | | |
| Preferred Communication Method Options | civicrm/admin/options/preferred_communication_method | | | | |
| Soft Credit Types Options | civicrm/admin/options/soft_credit_type | | | | |
| Website Type Options | civicrm/admin/options/website_type | | | | |
| Word Replacements | civicrm/admin/options/wordreplacements | | | | |
## SearchUI
These searches should be placed in the SearchUI extension rather than AdminUI. When the new search fully replaces the functionality of the core page it can override the existing URL. Otherwise, create an alternate URL and place a menu entry under Experimental.
<table>
<tr>
<th>Form</th>
<th>URL</th>
<th>Status</th>
<th>PR</th>
<th>Who</th>
<th>Notes</th>
</tr>
<tr>
<td>Find Contacts</td>
<td>civicrm/contact/search</td>
<td>Merged</td>
<td>
[26381](https://github.com/civicrm/civicrm-core/pull/26381)
</td>
<td>
@samuelsov
</td>
<td>
</td>
</tr>
<tr>
<td>Advanced Search</td>
<td>civicrm/contact/search/advanced</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>it doesn't make sense since we can create appropriate searches with SK</td>
</tr>
<tr>
<td>Find Contributions</td>
<td>civicrm/contribute/search</td>
<td>Merged, needs more work</td>
<td>
[26746](https://github.com/civicrm/civicrm-core/pull/26746)
</td>
<td>
@ayduns
</td>
<td>
</td>
</tr>
<tr>
<td>Find Mailings</td>
<td>civicrm/mailing civicrm/mailing/browse/scheduled civicrm/mailing/browse/archived civicrm/mailing/browse/unscheduled</td>
<td>WIP</td>
<td>
[26532](https://github.com/civicrm/civicrm-core/pull/26532)
</td>
<td>
@samuelsov
</td>
<td>
</td>
</tr>
<tr>
<td>Find Memberships</td>
<td>civicrm/membership/search</td>
<td>Submitted</td>
<td>
[29064](https://github.com/civicrm/civicrm-core/pull/29064)
</td>
<td>
@jitendra
</td>
<td>
</td>
</tr>
<tr>
<td>Find Participants</td>
<td>civicrm/event/search</td>
<td>Done</td>
<td>
[28477](https://github.com/civicrm/civicrm-core/pull/28477)
</td>
<td>
@breheret
</td>
<td>
it's staying :
- Add the 'fee level' field which I was unable to put
- Add custom group fields linked to an event/participant
- Add actions that are not native to Searchkit:
- Cancel registration
- Email - send now
- Group - add contacts
- Group - create smart group
- Name badges - print
- PDF letter - print for participants
- Participant status - change
- Print selected rows
- Update multiple participants
</td>
</tr>
<tr>
<td>Find Activities</td>
<td>civicrm/activity/search</td>
<td>Done</td>
<td>
[28480](https://github.com/civicrm/civicrm-core/pull/28480)
</td>
<td>
@usha.makoa
</td>
<td>
</td>
</tr>
<tr>
<td>Cases Dashboard</td>
<td>civicrm/case</td>
<td>Done</td>
<td>
</td>
<td>
@ayduns and @simon.hermann
</td>
<td>
https://lab.civicrm.org/extensions/casesummary/-/merge_requests/3
</td>
</tr>
<tr>
<td>Single Case View</td>
<td>civicrm/contact/view/case</td>
<td>WIP</td>
<td>
</td>
<td>
@simon.hermann
</td>
<td>
</td>
</tr>
</table>
## Core replacements
| Form | URL | Status | PR | Who | Notes |
|------|-----|--------|----|-----|-------|
| Contact summary: Notes tab | civicrm/note | Merged | [27610](https://github.com/civicrm/civicrm-core/pull/27610) | @colemanw | |
| Contact summary: Relationships tab | civicrm/contact/view/rel | Merged | [27701](https://github.com/civicrm/civicrm-core/pull/27701) | @colemanw | |
| Campaign Dashboard | civicrm/campaign, civicrm/petition, civicrm/survey | Merged | [27271](https://github.com/civicrm/civicrm-core/pull/27271) | @colemanw | |
| Contact summary: Membership tab | civicrm/ | Merged | [28810](https://github.com/civicrm/civicrm-core/pull/28810) | @jitendra | |
| Contact summary: Event tab | civicrm/ | Submitted | [29570](https://github.com/civicrm/civicrm-core/pull/29570)| @guyiac | |https://lab.civicrm.org/dev/core/-/issues/3911civix upgrade fails on afform extension with mgd mixin incompatible version e...2022-10-21T07:23:20Zaydunsaidan.saunders@squiffle.ukcivix upgrade fails on afform extension with mgd mixin incompatible version errorOn master, go to `civicrm/ext/afform/core` run `civix upgrade`
Error:
```
General upgrade
===============
In Mixlib.php line 147:
Received incompat...On master, go to `civicrm/ext/afform/core` run `civix upgrade`
Error:
```
General upgrade
===============
In Mixlib.php line 147:
Received incompatible version (expected="mgd-php@1.1.0", actual="mgd-php@1.0.0")
```
`info.xml` includes:
```
<mixin>mgd-php@1.1.0</mixin>
```tottentottenhttps://lab.civicrm.org/dev/core/-/issues/3910afform: Support url-params and other config options for Values in Submmission...2022-11-03T17:23:57ZAllenShawafform: Support url-params and other config options for Values in Submmission formsPer conversations with @kurund , @totten , and @colemanw at the 2022 Manchester sprint:
Submission forms currently offer configuration of Values as a way to ensure a certain value is submitted for a given property of the submitted entit...Per conversations with @kurund , @totten , and @colemanw at the 2022 Manchester sprint:
Submission forms currently offer configuration of Values as a way to ensure a certain value is submitted for a given property of the submitted entity, without displaying a field to the form user. Currently it's only possible to specify a static value for each Value. This issue covers work to increase this functionality by allowing the specification of more options for each value. As a start, we're aiming to support these: a default value; and a value defined by URL parameter (overriding the default value). Future efforts may allow for defining a mechanism for on-page calculation of the value; specifying that the submitted value should not be applied if updating an existing entity (could be useful e.g. for Source field); and more.
## New attributes:
At the start we aim to support only these:
- `default`: the default value
- `urlparam`: the name of a URL parameter from which the value can be taken (which value, if given, will override the `default` value)
We're also aiming to make decisions now which would facilitate adding other attributes in the future.
## UI changes:
- Move the Values section out of the "pallette" pane in the left, to a new "Values" tab in the "canvas" pane on the right:
![values](/uploads/4a5fb8bd7c29c136ddb18ebc191e7201/values.png)
- For each defined Value, support configuration of various attributes, probably through a pop-up accessed through a gear icon, similar to that already in use under for fields under the Fields tab:
![gear2](/uploads/6c850f34b123efd4651720ff50ef30e1/gear2.png)
Rationale:
- We currently have the "Values" configuration appearing at the top of the left-side "pallette" pane. This leaves limited space for configuration options on each Value, whereas there will be more room for that in the "canvas" pane.
- It would make for a more consisten user experience to treat the left-side "pallette" only as a pool of available entity properties (fields), and the right-side "canvas" as the place for configuring those properties which one has selected for use in the form.
## Form storage/schema changes:
Values are currently stored in the form markup within the `data` attribute of each `<af-entity>` tag; e.g. this line indicates that the do_not_email field should be forced to "yes":
```
<af-entity data="{contact_type: 'Individual', do_not_email: '1'}" type="Contact" name="Individual1" label="Individual 1" actions="{create: true, update: true}" security="RBAC" />
```
To store these additional config options, we make some changes to this schema:
- Values will be stored as an `<af-field>` element within the `<af-entity>` container, so that the above-mentioned `<af-entity>` tag would be represented like so:
```
<af-entity data="{contact_type: 'Individual'}" type="Contact" name="Individual1" label="Individual 1" actions="{create: true, update: true}" security="RBAC">
<af-field name="do_not_email" default="1" />
</af-entity>
```
Rationale:
- The `<af-field>` tag is appropriate here because these "entity properties" are in fact fields -- though they won't be presented as _form_ fields, they will be submitted as _API_ fields (consider the "getFields" api action).
- Storing as attributes of an `<af-field>` tag is an alternative to cramming arrays of increasing complexity into the `data` attribute of the `<af-entity>` tag, and this alternative facilitates easier validation.
- When parsing the stored form markup for display, it should be pretty easy to identify `<af-field>` tags within an `<af-entity>` container, then avoid formatting them as displayed form fields, and ensure they're attributed to the correct entity upon submission.https://lab.civicrm.org/dev/core/-/issues/3906FormBuilder URL Filter dropdown with multiple values are only filterd with fi...2022-10-21T07:28:15ZdavidFormBuilder URL Filter dropdown with multiple values are only filterd with first valueOverview
----------------------------------------
If a URL filter with multiple values is used in formbuilder, all values are picked up and shown in the multiselect, but the search is only filterd with the first value.
e.g. /civicrm/for...Overview
----------------------------------------
If a URL filter with multiple values is used in formbuilder, all values are picked up and shown in the multiselect, but the search is only filterd with the first value.
e.g. /civicrm/forms/fzt-suche/#?event_type_id=2,3,4
![Unbenannt](/uploads/10a0f5f22f4acd9aaa2a2912743ae71a/Unbenannt.JPG)
Environment information
----------------------------------------
* __Browser:__ Firefox 105
* __CiviCRM:__ 5.54.0
* __PHP:__ 7.3
* __CMS:__ Drupal 7https://lab.civicrm.org/dev/core/-/issues/3903FormBuilder - Unable to set default values for date ranges default values (UI...2024-03-13T17:16:43ZfrancescbassasFormBuilder - Unable to set default values for date ranges default values (UI problem)It's not possible to define date range default values when "Search by range" is selected in a config date filter options for an Afform.
![date-ranges](/uploads/00d838cdd6e6a5daa9a740e2eeb2612c/date-ranges.png)
I think it should be poss...It's not possible to define date range default values when "Search by range" is selected in a config date filter options for an Afform.
![date-ranges](/uploads/00d838cdd6e6a5daa9a740e2eeb2612c/date-ranges.png)
I think it should be possible to define two default date values corresponding the first with the start of the range and the second with the end.