CiviCRM Core issueshttps://lab.civicrm.org/dev/core/-/issues2023-01-05T02:18:09Zhttps://lab.civicrm.org/dev/core/-/issues/4022PHP 7.4, 8+ TypeError: array_flip(): Argument #1 ($array) must be of type arr...2023-01-05T02:18:09ZeldonthianPHP 7.4, 8+ TypeError: array_flip(): Argument #1 ($array) must be of type array, string givenOverview
----------------------------------------
Fresh install seemed to work, after going through checklist and setting up preferences,
somehow the search preferences page now throws this error. not sure what the exact cause is.
http...Overview
----------------------------------------
Fresh install seemed to work, after going through checklist and setting up preferences,
somehow the search preferences page now throws this error. not sure what the exact cause is.
https://civicrm.stackexchange.com/q/43060/14046
Reproduction steps
----------------------------------------
This seems to come up whenever ANY of the options are changed and attempting to save on search preferences page. i.e., custom fields, search options or quick search fields selection/deselection, reorder, etc.
Current behaviour
----------------------------------------
upon saving any changes on the search preferences page.
go back to the page, all ordering gone, default fields only, and selections.. just click save, and things begin to work as first install. Can not select/deselect any field to be saved. new selections are not saved..
```
TypeError: array_flip(): Argument #1 ($array) must be of type array, string given in /code/vendor/civicrm/civicrm-core/CRM/Admin/Form/SettingTrait.php on line 380 #0 /code/vendor/civicrm/civicrm-core/CRM/Admin/Form/SettingTrait.php(380): array_flip('\x01sort_name\x01cont...')
#1 /code/vendor/civicrm/civicrm-core/CRM/Admin/Form/SettingTrait.php(224): CRM_Admin_Form_Setting::reorderSortableOptions('quicksearch_opt...', Array)
#2 /code/vendor/civicrm/civicrm-core/CRM/Admin/Form/Setting.php(66): CRM_Admin_Form_Setting->addFieldsDefinedInSettingsMetadata()
#3 /code/vendor/civicrm/civicrm-core/CRM/Admin/Form/Setting/Search.php(47): CRM_Admin_Form_Setting->buildQuickForm()
#4 /code/vendor/civicrm/civicrm-core/CRM/Core/Form.php(689): CRM_Admin_Form_Setting_Search->buildQuickForm()
#5 /code/vendor/civicrm/civicrm-core/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#6 /code/vendor/civicrm/civicrm-packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Admin_Form_Setting_Search), 'display')
#7 /code/vendor/civicrm/civicrm-packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Setting_Search), 'display')
#8 /code/vendor/civicrm/civicrm-core/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle('display')
#9 /code/vendor/civicrm/civicrm-core/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
#10 /code/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(292): CRM_Utils_Wrapper->run('CRM_Admin_Form_...', 'Search Preferen...', Array)
#11 /code/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem(Array)
#12 /code/vendor/civicrm/civicrm-core/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke(Array)
#13 /code/web/modules/contrib/civicrm/src/Civicrm.php(88): CRM_Core_Invoke::invoke(Array)
#14 /code/web/modules/contrib/civicrm/src/Controller/CivicrmController.php(80): Drupal\civicrm\Civicrm->invoke(Array)
#15 [internal function]: Drupal\civicrm\Controller\CivicrmController->main(Array, '')
#16 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#17 /code/web/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#18 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#19 /code/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#20 /code/vendor/symfony/http-kernel/HttpKernel.php(169): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#21 /code/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#22 /code/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /code/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /code/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /code/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /code/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /code/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /code/web/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /code/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#31 {main}
```
Expected behaviour
----------------------------------------
Search preferences should be able to be saved with changes.. and accessible at
civicrm/admin/setting/search?reset=1
Environment information
----------------------------------------
* __CiviCRM: 5.55.2, 5.56
* __PHP: 7.4, 8.0, 8.1
* __CMS: Drupal 9.4.8
* __Database: MariaDB 10.4.25
* __Web Server: nginx/1.21.65.57.0https://lab.civicrm.org/dev/core/-/issues/4021Apiv4 Explorer DashboardContact doesn't load dashboards2022-12-05T14:26:53Zaydunsaidan.saunders@squiffle.ukApiv4 Explorer DashboardContact doesn't load dashboardsOverview
----------------------------------------
In Apiv4 Explorer, go to `DashboardContact` `create`
1. Add `dashboard_id`
2. Attempt to search for dashboards
3. Get 'Loading failed' message.
Environment information
---------------...Overview
----------------------------------------
In Apiv4 Explorer, go to `DashboardContact` `create`
1. Add `dashboard_id`
2. Attempt to search for dashboards
3. Get 'Loading failed' message.
Environment information
----------------------------------------
* __CiviCRM:__ _Master_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
Tested on https://dmaster.demo.civicrm.orghttps://lab.civicrm.org/dev/core/-/issues/4020Remove unsupported reCAPTCHA options2022-12-06T04:17:29ZJKingsnorthRemove unsupported reCAPTCHA optionsThe reCaptcha settings page includes the 'reCAPTCHA options' input. This was used by reCAPTCHA v1, which has been unsupported for a long time: https://developers.google.com/recaptcha/old/docs/customization
![image](/uploads/da430b31652...The reCaptcha settings page includes the 'reCAPTCHA options' input. This was used by reCAPTCHA v1, which has been unsupported for a long time: https://developers.google.com/recaptcha/old/docs/customization
![image](/uploads/da430b31652f3f0f0daefcbe842761af/image.png)
I suggest that we remove the recaptchaOptions input and settings, to tidy up the form.
It is possible to apply some styling options to recaptcha v2+, which has been implemented in FormBuilder:
![image](/uploads/c0fdbe280210f391040c461f5c0d9f0e/image.png)
But I do not suggest adding this functionality to the general reCaptcha form. If someone feels strongly, they could add it as a series of radio/checkbox options, instead of a text string which is how the options for v1 were stored.5.57.0https://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/4018Extension upgrades are not run if there are no core upgrades2022-12-02T12:24:19ZherbdoolExtension upgrades are not run if there are no core upgrades@totten recently did: https://github.com/civicrm/civicrm-core/pull/24030 to include extension upgrades in the core upgrades.
I've noticed a couple times, however, that there seem to be extension upgrades still waiting after upgrading Ci...@totten recently did: https://github.com/civicrm/civicrm-core/pull/24030 to include extension upgrades in the core upgrades.
I've noticed a couple times, however, that there seem to be extension upgrades still waiting after upgrading CiviCRM code base and running `cv upgrade:db`. Could it be that if there are no core upgrade hooks waiting that it won't run the extension upgrades? It does seem likely given my chat with @colemanw https://chat.civicrm.org/civicrm/pl/cfd18cjpofg5iesh7o4zqejcbh.https://lab.civicrm.org/dev/core/-/issues/4017SearchKit: 500 error when selecting "All Pages" with HAVING clause2023-12-29T03:24:51ZJonGoldSearchKit: 500 error when selecting "All Pages" with HAVING clauseWhen you create a SK query with a HAVING clause, and there is more than one page of contacts, selecting all contacts will give a 500 error.
The following SK will do this quite nicely. The error is some variant on `"Invalid expression i...When you create a SK query with a HAVING clause, and there is more than one page of contacts, selecting all contacts will give a 500 error.
The following SK will do this quite nicely. The error is some variant on `"Invalid expression in HAVING clause: 'MAX_Contact_Contribution_contact_id_01_total_amount'. Must use a value from SELECT clause."`
It seems like selecting "All Pages" causes SK to do an API4 query similar to the original `SavedSearch.run`, but only returning the `id` column (which makes sense). However, this makes using the `HAVING` clause fail.
```json
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "Test",
"label": "500 error test",
"form_values": null,
"mapping_id": null,
"search_custom_id": null,
"api_entity": "Contact",
"api_params": {
"version": 4,
"select": [
"addressee_display",
"display_name",
"MAX(DISTINCT Contact_Contribution_contact_id_01.total_amount) AS MAX_Contact_Contribution_contact_id_01_total_amount",
"GROUP_CONCAT(DISTINCT Contact_Contribution_contact_id_01.source) AS GROUP_CONCAT_Contact_Contribution_contact_id_01_source",
"Connection_to_MHC.Connection_to_MHC",
"MAX(Contact_Contribution_contact_id_01.receive_date) AS MAX_Contact_Contribution_contact_id_01_receive_date"
],
"orderBy": [],
"where": [],
"groupBy": [
"id",
"addressee_id"
],
"join": [
[
"Contribution AS Contact_Contribution_contact_id_01",
"INNER",
[
"id",
"=",
"Contact_Contribution_contact_id_01.contact_id"
]
]
],
"having": [
[
"MAX_Contact_Contribution_contact_id_01_total_amount",
">",
"1"
]
]
},
"expires_date": null,
"description": null
}
],
"match": [
"name"
]
}
]
]
```colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4016Import improvements2023-06-25T18:15:01ZeileenImport improvementsTracking issue for improvements I'd still like to look at
- import templates https://lab.civicrm.org/dev/core/-/issues/4015
Some quick notes that I haven't spun off into issues
- the links from the search go to the import landing pa...Tracking issue for improvements I'd still like to look at
- import templates https://lab.civicrm.org/dev/core/-/issues/4015
Some quick notes that I haven't spun off into issues
- the links from the search go to the import landing page - I think the search kit summary + detailed view (2 links) might be better as an and or an or to that
- ~~when looking at the detailed view the 'import' action only works on rows that are 'validated' - this makes sense in the main import as it doesn't try to import invalid rows but needs some tweaking in that workflow~~ - fixed
- ~~The label for `entity_id` is not the relevant entity in the search display - tracking progress here https://github.com/civicrm/civicrm-core/pull/25097~~ fixed
- I tried embedding a SearchDisplay into the summary/progress screen - https://github.com/civicrm/civicrm-core/pull/25087 - I got it working but the flickering was an issue. Closing the PR & tracking here to think about furtherhttps://lab.civicrm.org/dev/core/-/issues/4015Import templates2023-04-03T02:33:03ZeileenImport templatesOne hope for the import screens is that on the `DataSource` screen it would be possible to put `template_id` in the url. In this case the settings from that import would load (excluding the actual file/data/table).
I think the template_...One hope for the import screens is that on the `DataSource` screen it would be possible to put `template_id` in the url. In this case the settings from that import would load (excluding the actual file/data/table).
I think the template_id could be an import that had been used or one marked as 'is_template' (the latter would ideally be saveable and would not expire like the job ones do).5.61.0https://lab.civicrm.org/dev/core/-/issues/4014[documentation] fileinfo PHP extension not listed as requirement2022-12-06T22:57:56Zjensschuppe[documentation] fileinfo PHP extension not listed as requirement44b5fdddd0722095762b648cb17faf566e229ba7 ([PR](https://github.com/civicrm/civicrm-core/pull/21351)) added the `phpoffice/phpspreadsheet` package as a dependency in Core's `composer.json` which in turn requires `ext-fileinfo`, leading to ...44b5fdddd0722095762b648cb17faf566e229ba7 ([PR](https://github.com/civicrm/civicrm-core/pull/21351)) added the `phpoffice/phpspreadsheet` package as a dependency in Core's `composer.json` which in turn requires `ext-fileinfo`, leading to composer failing at reconciling dependencies after `5.44.0` if that PHP extension is missing. The [docs](https://docs.civicrm.org/installation/en/latest/general/requirements/#php-extensions) do not list it as a requirement.5.57.0https://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/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/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.yashodhayashodha