Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-01-05T01:40:51Zhttps://lab.civicrm.org/dev/core/-/issues/4013Regression: Error when editing search preferences2023-01-05T01:40:51ZJonGoldRegression: Error when editing search preferencesTo replicate:
* Go to **Administer » Customize Data and Screens » Search Preferences**.
* Change the default pager limit to anything and save.
* Visit the **Search Preferences** page again.
Expected Result:
No errors.
Actual Result:
``...To replicate:
* Go to **Administer » Customize Data and Screens » Search Preferences**.
* Change the default pager limit to anything and save.
* Visit the **Search Preferences** page again.
Expected Result:
No errors.
Actual Result:
```
Warning: array_flip() expects parameter 1 to be array, string given in CRM_Admin_Form_Setting::reorderSortableOptions() (line 380 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Admin/Form/SettingTrait.php).
Warning: array_merge(): Expected parameter 1 to be an array, null given in CRM_Admin_Form_Setting::reorderSortableOptions() (line 380 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Admin/Form/SettingTrait.php).
Warning: array_flip() expects parameter 1 to be array, null given in CRM_Admin_Form_Setting->addFieldsDefinedInSettingsMetadata() (line 224 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Admin/Form/SettingTrait.php).
Warning: Invalid argument supplied for foreach() in CRM_Core_Form->addCheckBox() (line 1418 of /srv/buildkit/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Form.php).
```
Note that this is on dmaster.demo.c.o, running PHP 7.4. PHP 8+ will throw a fatal error here.
I don't have time to work on this today but if no one else has a minute, I can devote some of Brienne's time Thursday/Friday.5.57.0https://lab.civicrm.org/dev/translation/-/issues/80Recurring contributions: ThankYou page does not translate the membership cont...2023-05-18T23:59:42ZshaneonabikeRecurring contributions: ThankYou page does not translate the membership contribution unitRelated to #32
To reproduce:
* Configure CiviCRM to non-English (ex: French)
* Setup a recurring membership contribution page
* Choose a membership and choose recurring option
Result:
> Cette adhésion sera renouvelée automatiquement ...Related to #32
To reproduce:
* Configure CiviCRM to non-English (ex: French)
* Setup a recurring membership contribution page
* Choose a membership and choose recurring option
Result:
> Cette adhésion sera renouvelée automatiquement tous les year.
(i.e. the frequency unit is not translated)
From the string:
> This membership will be renewed automatically every %1.
Like @mathieu I will ignore for now this string:
> This recurring contribution will be automatically processed every %1 %2s.
(which assumes that all plurals end with an 's', in every language of the world.)https://lab.civicrm.org/dev/core/-/issues/4012Contribution Page credit card expiry months are incorrectly offset when the t...2022-12-17T23:11:48ZbgmContribution Page credit card expiry months are incorrectly offset when the timezone is WhitehorseFound an interesting bug that only happens with users who have chose the America/Whitehorse timezone (-0700). It does not happen if we chose another similar timezone (America/Vancouver, America/Yellowknife, etc).
To reproduce on dmaster...Found an interesting bug that only happens with users who have chose the America/Whitehorse timezone (-0700). It does not happen if we chose another similar timezone (America/Vancouver, America/Yellowknife, etc).
To reproduce on dmaster / drupal7:
- login as the demo user
- change the user's timezone to America/Whitehorse
Then go to a contribution page:
https://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=2
![image](/uploads/ea61f948003f258501391a3c90e2a6e3/image.png)5.58.0https://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/4010Proposal: SearchKit add optional labels to joins2022-11-30T08:39:20Zaydunsaidan.saunders@squiffle.ukProposal: SearchKit add optional labels to joinsOverview
----------------------------------------
Proposal: Add an optional label after a 'With' and use that in the Add dropdown. For Calculated Fields, this might another element in `FieldSpec`
Rationale
----------
1. If you add the...Overview
----------------------------------------
Proposal: Add an optional label after a 'With' and use that in the Add dropdown. For Calculated Fields, this might another element in `FieldSpec`
Rationale
----------
1. If you add the same entity multiple times you get eg:
![image](/uploads/c4a12ab363c6fae415a8028ad2575797/image.png)
with an Add dropdown of:
![image](/uploads/c09359051f68512ebf1f992c1f42fb60/image.png)
'Contact Contributions' and 'Contact Contributions 2' would be easier to use if you could add an optional label 'Completed contributions', 'Cancelled contributions', and then have those appear in the dropdown instead.
2. If you have several layers of joins, the titles get unwieldy. Those can be replaced by shorter, more meaningful labels.https://lab.civicrm.org/dev/core/-/issues/4009Proposal: SearchKit show Calculated Field entity refs as joins2022-11-30T08:39:36Zaydunsaidan.saunders@squiffle.ukProposal: SearchKit show Calculated Field entity refs as joinsOverview
----------------------------------------
If you join an entity using 'With' then it appears in the 'Add' dropdown as an expandable entity: - see 'Contact Contributions' in this image:
![image](/uploads/78451866fa4f155fb32594879e...Overview
----------------------------------------
If you join an entity using 'With' then it appears in the 'Add' dropdown as an expandable entity: - see 'Contact Contributions' in this image:
![image](/uploads/78451866fa4f155fb32594879efb754d/image.png)
However entities that are joined via Calculated Fields show differently so we get fields like 'Address (billing) Country' rather than a dropdown for Address providing access to all the address fields.
With the recently merged https://github.com/civicrm/civicrm-core/pull/25056, the `master_id` field appears in the list but none of its fields.
So can we make those entities show in the same way as those joined via 'With' ? (APIv4 Explorer does this).https://lab.civicrm.org/dev/core/-/issues/4008Regression - lotsa noise on Searchkit screen if Form code editor enabled2022-12-08T02:47:10ZeileenRegression - lotsa noise on Searchkit screen if Form code editor enabledOn upgrading a dev site with Form Code Editor enabled from 5.54 to 5.56 the search kit screen went 'haywire'. Doing the same on dmaster gave a more modest error display (but the difference is the other site has some aggressive xdebug err...On upgrading a dev site with Form Code Editor enabled from 5.54 to 5.56 the search kit screen went 'haywire'. Doing the same on dmaster gave a more modest error display (but the difference is the other site has some aggressive xdebug error display stuff going on)
![image](/uploads/6a20d0e4ecde37ff138a54381401feb7/image.png)
![image](/uploads/f1d0812dc9daf2ca176e2389c0487432/image.png)
@totten @colemanw unless we are actively deprecating that extension we need to fix (I can disable on the site in question)5.56.0https://lab.civicrm.org/dev/core/-/issues/4007Proposal: SearchKit Templates2022-12-05T23:15:19ZcolemanwProposal: SearchKit TemplatesBackground
-------------
Olly is working on a new Extension called [SearchKit Reports](https://lab.civicrm.org/extensions/search_kit_reports) which is a collection of SavedSearches. The idea is to reproduce most of CiviReport using Searc...Background
-------------
Olly is working on a new Extension called [SearchKit Reports](https://lab.civicrm.org/extensions/search_kit_reports) which is a collection of SavedSearches. The idea is to reproduce most of CiviReport using SearchKit, and people can then use those packaged searches to get a jump-start on building their own searches.
Since these searches are intended to be used as templates, why not actually make them templates.
Rationale
-------------
I think this would benefit the SK UI because because so far, the "Packaged Searches" tab contains stuff the average user shouldn't mess with unless they know what they're doing; searches like "Administer Custom Fields" provide critical functionality to various CiviCRM screens that could potentially be broken if messed with.
Now the [SearchKit Reports](https://lab.civicrm.org/extensions/search_kit_reports) extension is introducing a bunch of packaged searches with the opposite intention. They provide *no* functionality out of the box and we *want* the user to mess with them & experiment as much as they want. We also want to encourage a workflow where they don't directly edit the packaged version but save a copy.
Design
-----------
I'm thinking that SavedSearchTemplates would:
1. Appear on their own tab in SearchKit
2. Not be runnable outside the SearchKit Admin UI - clicking on one would pull up a new pre-configured search (the same as clicking the "Clone" button on a SavedSearch)
3. Stored in their own table `civicrm_saved_search_template`
4. Can be created, updated & packaged like regular saved searches
To point 3, I thought about adding an `is_template` column like we do in the `civicrm_event` table, and then thought about what a PITA that column is, and is it really so hard to create a new table? No, not hard at all.https://lab.civicrm.org/dev/core/-/issues/4006PHP 8 - Undefined variable warnings in compiled Smarty templates2023-07-28T18:28:40ZAdam WoodPHP 8 - Undefined variable warnings in compiled Smarty templatesHave just upgraded to PHP 8.1 and CiviCRM 5.55.2.
We can now see a bunch of warnings about undeclared variables / array keys in the `error_log`, all of which seem to come from compiled Smarty template files in `templates_c`.
Below are ...Have just upgraded to PHP 8.1 and CiviCRM 5.55.2.
We can now see a bunch of warnings about undeclared variables / array keys in the `error_log`, all of which seem to come from compiled Smarty template files in `templates_c`.
Below are the most common repeat offenders (from a quick scan of the log), but there are probably more:
```
[Sun Nov 27 08:35:34.862647 2022] [fcgid:warn] [pid 62763] [client 92.2.56.169:60387] mod_fcgid: stderr: PHP Warning: Undefined array key "class" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%11/11A/11A32C94%%UserDashboard.tpl.php on line 13, referer: https://cses.org.uk/membership/login
[Sun Nov 27 08:35:34.862655 2022] [fcgid:warn] [pid 62763] [client 92.2.56.169:60387] mod_fcgid: stderr: PHP Warning: Undefined array key "fields" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%D2/D27/D2748E2E%%GrantApplicationDashboard.tpl.php on line 27, referer: https://cses.org.uk/membership/login
[Sun Nov 27 09:21:17.286322 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key "sidebarLeft" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%EA/EAA/EAA96A89%%joomla.tpl.php on line 19
[Sun Nov 27 09:21:17.294758 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key "localTasks" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%EA/EAA/EAA96A89%%joomla.tpl.php on line 56
[Sun Nov 27 09:21:17.294768 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key "registerClosed" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%8E/8EE/8EE20E00%%EventInfo.tpl.php on line 6
[Sun Nov 27 09:21:17.294772 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key "summary" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%8E/8EE/8EE20E00%%EventInfo.tpl.php on line 82
[Sun Nov 27 09:21:17.294774 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key "summary" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%8E/8EE/8EE20E00%%EventInfo.tpl.php on line 97
[Sun Nov 27 09:21:17.294777 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key "profileGID" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%77/771/771F796E%%Google.tpl.php on line 36
[Sun Nov 27 09:21:17.294780 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key 1 in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%8E/8EE/8EE20E00%%EventInfo.tpl.php on line 148
[Sun Nov 27 09:21:17.294783 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Trying to access array offset on value of type null in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%8E/8EE/8EE20E00%%EventInfo.tpl.php on line 148
[Sun Nov 27 09:21:17.294786 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key 1 in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%8E/8EE/8EE20E00%%EventInfo.tpl.php on line 148
[Sun Nov 27 09:21:17.294789 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Trying to access array offset on value of type null in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%8E/8EE/8EE20E00%%EventInfo.tpl.php on line 148
[Sun Nov 27 09:21:17.294791 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key "groupId" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%FD/FD4/FD481315%%CustomDataView.tpl.php on line 176
[Sun Nov 27 09:21:17.294794 2022] [fcgid:warn] [pid 64736] [client 66.249.76.73:54724] mod_fcgid: stderr: PHP Warning: Undefined array key "emailMode" in /home/cses_org_uk/public_html/media/civicrm/templates_c/en_GB/%%79/79B/79BBF2EC%%SocialNetwork.tpl.php on line 11
```
Looking into one case in further detail (missing "summary" on line 82 of `EventInfo.tpl.php`), we see that the following Smarty code:
```smarty
<div class="vevent crm-event-id-{$event.id} crm-block crm-event-info-form-block">
<div class="event-info">
{* Display top buttons only if the page is long enough to merit duplicate buttons *}
{if $event.summary or $event.description}
```
Compiles into the following PHP:
```php
<div class="vevent crm-event-id-<?php echo $this->_tpl_vars['event']['id']; ?>
crm-block crm-event-info-form-block">
<div class="event-info">
<?php if ($this->_tpl_vars['event']['summary'] || $this->_tpl_vars['event']['description']): ?>
```
(i.e. there is no protection that the array index actually exists.)
So it looks like there may be an overall effort required here to tighten up the templates and/or corresponding page class PHP code to ensure that array indices are always declared correctly - and I'm happy to tackle some of these in the background - but is there any update from Smarty planned or pending that would affect this?
In this instance (and I suspect many of the others), I would suggest we use the `empty()` function to test for the variables in question:
```smarty
<div class="vevent crm-event-id-{$event.id} crm-block crm-event-info-form-block">
<div class="event-info">
{* Display top buttons only if the page is long enough to merit duplicate buttons *}
{if !empty($event.summary) or !empty($event.description)}
```https://lab.civicrm.org/dev/translation/-/issues/79Error in link on upgrade page after update database ready2022-11-30T18:23:15ZHanVError in link on upgrade page after update database readyI have today upgraded to version 5.55.2, on the screen after the database upgrade is an error in the link in the message:
Your Date Format settings have been automatically updated. (CRM/Upgrade/Incremental/php/FiveFiftyThree.php)
In the...I have today upgraded to version 5.55.2, on the screen after the database upgrade is an error in the link in the message:
Your Date Format settings have been automatically updated. (CRM/Upgrade/Incremental/php/FiveFiftyThree.php)
In the open tag it must be: href='%1'
I found the place with transifex.https://lab.civicrm.org/dev/core/-/issues/4005Minor formatting gripes with Contributions UserDashboard.tpl2023-10-17T14:38:15ZAdam WoodMinor formatting gripes with Contributions UserDashboard.tplRaising this as a minor residual issue / action vaguely related to historic issues https://lab.civicrm.org/dev/core/-/issues/2034 and https://lab.civicrm.org/dev/core/-/issues/2129, namely some incidental formatting issues spotted in the...Raising this as a minor residual issue / action vaguely related to historic issues https://lab.civicrm.org/dev/core/-/issues/2034 and https://lab.civicrm.org/dev/core/-/issues/2129, namely some incidental formatting issues spotted in the user dashboard template for recurring contributions.
Minor issues relating to spacing and formatting, will raise PR to close off.
1. No handling for if (installments == 0), i.e. the recurring contribution is open-ended. Just leaves a blank string which is confusing to users.
2. No spacing between clauses in 'Terms' - makes difficult to read. Also untranslated strings.
3. Unnecessary colon after 'Terms' in table header (doesn't match other header cells).
Screenshot below shows issues.
![image](https://user-images.githubusercontent.com/72983627/205190951-4db837e1-85df-4e38-a8b4-77ab1550a44b.png)
![image](https://user-images.githubusercontent.com/72983627/205190481-e8d642a5-9956-4fc3-a0d2-51f16187dca1.png)https://lab.civicrm.org/dev/core/-/issues/4004Fatal error in a Scheduled Job should not prevent other jobs runs from happening2022-11-30T08:31:30ZMichael McAndrewFatal error in a Scheduled Job should not prevent other jobs runs from happeningTake the example of a typical site with ~10 cron jobs configured to run every 5 minutes. The jobs are always run in the same order.
If job 3 exits with a fatal error, the following jobs will not run so a single failing job can cause ma...Take the example of a typical site with ~10 cron jobs configured to run every 5 minutes. The jobs are always run in the same order.
If job 3 exits with a fatal error, the following jobs will not run so a single failing job can cause many others to also 'fail' even if there is nothing wrong with them.
I don't think you can catch Fatal errors but wondering if there is another approach we can take (using sub processes or similar?) that will make our cron more resilient to failure within a specific job.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/4002API4 throws an exception when using `IN` and pseudoconstants aren't resolved2023-03-15T15:13:48ZJonGoldAPI4 throws an exception when using `IN` and pseudoconstants aren't resolvedConsider this API call in `mjwshared` (pinging @mattwire since he'll be interested):
```php
$paymentProcessorIDs = \Civi\Api4\PaymentProcessor::get(FALSE)
->addWhere('payment_processor_type_id:name', 'IN', ['Stripe', 'Globalpayments']...Consider this API call in `mjwshared` (pinging @mattwire since he'll be interested):
```php
$paymentProcessorIDs = \Civi\Api4\PaymentProcessor::get(FALSE)
->addWhere('payment_processor_type_id:name', 'IN', ['Stripe', 'Globalpayments'])
->execute()
```
This throws a fatal error when run if you don't have Stripe or Globalpayments installed. However, this seems inconsistent:
* If your operator is `=` not `IN`, you just get an empty set (e.g. `cv api4 PaymentProcessor.get +w 'payment_processor_type_id:name = "fake processor"'`).
* If your operator is `IN` but you're not using pseudoconstant lookup, you get an empty set, e.g. `cv api4 PaymentProcessor.get +w 'payment_processor_type_id IN [123456,234567]'`.
From a DX perspective, I think the correct result on the code in `mjwshared` is to return an empty set.JonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/4001Quick Search won't consider custom field groups2022-11-30T08:29:56Zartur.smigielskiQuick Search won't consider custom field groupsOverview
----------------------------------------
Quick search menu allow to select searchable custom fields but won't identify them by group
Reproduction steps
----------------------------------------
1. Add two groups for custom field...Overview
----------------------------------------
Quick search menu allow to select searchable custom fields but won't identify them by group
Reproduction steps
----------------------------------------
1. Add two groups for custom fields, any name, ex. group_1, group_2
2. For each of them add field with the same name "customnumber", searchable
3. Fill that field with random values for diffrent users
4. Edit quick search panel and pick one of that fields
5. Use quick search panel in menu
Current behaviour
----------------------------------------
It won't find matching records for group_1.customnumber or group_2.customnumber, it will always be the same field group_2.customnumber.
Reason: \CRM_Admin_Page_AJAX::getSearchOptions won't have info about custom field group, so it is searching only by name
```
CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomField', substr($key, 7), 'id', 'name')
```
Expected behaviour
----------------------------------------
Search for group_1.customnumber or group_2.customnumber depending of which will be selected in quicksearch panelhttps://lab.civicrm.org/dev/core/-/issues/4000only update `contributionRecur` when `templateContribution` is updated IF it ...2023-03-16T21:47:09Zeileenonly update `contributionRecur` when `templateContribution` is updated IF it is actively marked as suchIn https://github.com/civicrm/civicrm-core/pull/21473 code was added to update the Currency and Amount of the template contribution is updated. However, the code appears to me to be too aggressive and updating the amount or currency of A...In https://github.com/civicrm/civicrm-core/pull/21473 code was added to update the Currency and Amount of the template contribution is updated. However, the code appears to me to be too aggressive and updating the amount or currency of ANY contribution in the series causes it to update. There are good reasons to update individual contributions without any implicit template update.5.61.0https://lab.civicrm.org/dev/core/-/issues/3999Unable to delete Price field2022-11-21T20:52:46ZMonish DebUnable to delete Price fieldSteps to replicate:
2. Create a any kind of price-field (In this example I have created a checkbox field)
1. Created a price set used for any one of the civi component
3. Then delete the price-field
Error:
> Unable to delete the '...Steps to replicate:
2. Create a any kind of price-field (In this example I have created a checkbox field)
1. Created a price set used for any one of the civi component
3. Then delete the price-field
Error:
> Unable to delete the '' Price Field - it is currently in use by one or more active events or contribution pages or contributions or event templates.
Expected: The price set is not used in any donation or event page, then one should be allowed to delete the price-field
Demo:
![after1](/uploads/321c38eaa3707cbb9ac7a6bb020f484f/after1.gif)5.56.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/3998Add phpunit-bridge to unit testing2022-11-22T07:23:46ZDaveDAdd phpunit-bridge to unit testingSee https://github.com/civicrm/civicrm-core/pull/25009 for the results of what currently happens. The idea is that e.g. some php 8.x deprecations get hidden, but this package helps flush them out.
Some things that would need doing:
* A...See https://github.com/civicrm/civicrm-core/pull/25009 for the results of what currently happens. The idea is that e.g. some php 8.x deprecations get hidden, but this package helps flush them out.
Some things that would need doing:
* Adjusting the two propertybag tests so that they aren't trying to do the same thing. Or whatever the issue is there.
* A test listener(? or something) so that the deprecations become more visible rather than buried in the run output.
* What is "THE ERROR HANDLER HAS CHANGED!" about, and why is it in GIANT LETTERS? It appears after some test suite runs instead of where you would expect to see the deprecations. Possibly the suites where it appears somehow have their own error handlers in a way where it conflicts with phpunit-bridge.
FYI @totten @seamuslee. Not asking you to do anything just something you might be interested in.
P.S. To get a stack trace showing exactly where the deprecation is happening, you need to run locally and set SYMFONY_DEPRECATIONS_HELPER to a regex that matches the deprecation notice, as per https://symfony.com/doc/current/components/phpunit_bridge.html#display-the-full-stack-trace.
P.P.S. On windows depending on which of the 3^4 options you chose when you installed git, using `/` as the regex terminator confuses it and it gets rewritten as `C:/path/to/git/<the regex>`https://lab.civicrm.org/dev/core/-/issues/3997FormBuilder filter fails on some fields2022-11-28T09:20:40Zaydunsaidan.saunders@squiffle.ukFormBuilder filter fails on some fieldsOverview
----------------------------------------
On some fields, a FormBuilder filter works when a value is entered but deleting the filter value does not show the full listing.
Reproduction steps
--------------------------------------...Overview
----------------------------------------
On some fields, a FormBuilder filter works when a value is entered but deleting the filter value does not show the full listing.
Reproduction steps
----------------------------------------
1. In SearchKit, create a search of CaseTypes
2. Display the ID & Title
3. Create a table display - default settings
4. Create a FormBuilder form
5. Add Case Type Title as a filter
6. Add route, name, save.
7. View page
8. Should see listing of case types
9. In filter box, type 'sup' - should filter correctly to show Housing Support
10. then delete 'sup' from the filter
Current behaviour
----------------------------------------
Does not show all results. Angular error in browser 'val is undefined'
Expected behaviour
----------------------------------------
It should go back to showing all results
Environment information
----------------------------------------
* __CiviCRM:__ _Master_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
Comments
----------------------------------------
Verified on dmaster.
This is only on some fields. Eg doing the same for Case instead of Case Type works as expected.colemanwcolemanwhttps://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!