Development issueshttps://lab.civicrm.org/groups/dev/-/issues2024-02-03T12:28:03Zhttps://lab.civicrm.org/dev/backdrop/-/issues/81Add Backdrop Telemetry2024-02-03T12:28:03ZherbdoolAdd Backdrop TelemetryIt would be nice to have the module report to Backdrop how many Backdrop sites, out of all Backdrop sites (with Telemetry enabled), have CiviCRM installed.It would be nice to have the module report to Backdrop how many Backdrop sites, out of all Backdrop sites (with Telemetry enabled), have CiviCRM installed.https://lab.civicrm.org/dev/core/-/issues/4961SearchKit/API4: 'getFieldValue failed' error for group contacts2024-02-02T22:16:09Zaydunsaidan.saunders@squiffle.ukSearchKit/API4: 'getFieldValue failed' error for group contactsOverview
----------------------------------------
SearchKit/API4 fails with 'getFieldValue failed'
Reproduction steps
----------------------------------------
1. Create a new SearchKit search
1. Set 'Search for' to 'Groups'
1. Search a...Overview
----------------------------------------
SearchKit/API4 fails with 'getFieldValue failed'
Reproduction steps
----------------------------------------
1. Create a new SearchKit search
1. Set 'Search for' to 'Groups'
1. Search and confirm groups are shown
2. Add 'With (optional)' 'Group Contacts'
3. Search and observe no results
4. Open browser tools, search again, note '500':
Request is:
{"run":["SearchDisplay","run",{"return":"page:1","savedSearch":{"api_entity":"Group","displays":[],"groups":[],"tag_id":[],"api_params":{"version":4,"select":["id","title","description","is_active","Group_GroupContact_Contact_01.sort_name"],"orderBy":{},"where":[],"groupBy":[],"join":[["Contact+AS+Group_GroupContact_Contact_01","LEFT","GroupContact",["id","=","Group_GroupContact_Contact_01.group_id"]]],"having":[]},"label":"Group+Search+by+demo@example.com"},"sort":[],"limit":50,"seed":1706887602244,"filters":{},"afform":null,"debug":true}]}
Response is:
{
"run": {
"error_code": 0,
"error_message": "getFieldValue failed",
"status": 500
}
}
Environment information
----------------------------------------
* __CiviCRM:__ _Master_
Comments
----------------------------------------
This is currently failing on dmaster but works correctly on 5.65.0
Might be wider issue, but noted on groups.https://lab.civicrm.org/dev/core/-/issues/4959After upgrading from 5.63. to 5.69, two scheduled jobs fail with: Failure, Er...2024-02-20T23:15:44ZjamieAfter upgrading from 5.63. to 5.69, two scheduled jobs fail with: Failure, Error message: Unknown api versionThe two failing jobs are:
- job.update_greeting
- mailing.update_mailing_resetdate
Both of these jobs have parameters entered in the job itself (which may be a clue). And, with both, I "fixed" them by adding:
version=3
To the list of...The two failing jobs are:
- job.update_greeting
- mailing.update_mailing_resetdate
Both of these jobs have parameters entered in the job itself (which may be a clue). And, with both, I "fixed" them by adding:
version=3
To the list of parameters already set.
I flailed around in `CRM/Core/JobManager.php` and found [an unset $temp variable](https://github.com/civicrm/civicrm-core/blob/6b7d77047024f4989d8fb2c9219d5ddf7e7161d0/CRM/Core/JobManager.php#L184) but was otherwise unable to figure out how to fix this problem.
Also, maybe not a bug and I should be adding this parameter? Or should the upgrader warn about adding this parameter? Or did I miss it? Thanks in advance for any clues.colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4958Deprecated function CRM_Contact_BAO_ContactType::retrieve2024-03-15T20:43:33ZPradeep Nayakpradpnayak@gmail.comDeprecated function CRM_Contact_BAO_ContactType::retrieveOn edit of contact subtype get a deprecation error
/civicrm/admin/options/subtype/edit?action=update&id=2&reset=1
Deprecated function CRM_Contact_BAO_ContactType::retrieve, use API. CRM_Core_Error::deprecatedFunctionWarning CRM_Contact_...On edit of contact subtype get a deprecation error
/civicrm/admin/options/subtype/edit?action=update&id=2&reset=1
Deprecated function CRM_Contact_BAO_ContactType::retrieve, use API. CRM_Core_Error::deprecatedFunctionWarning CRM_Contact_BAO_ContactType::retrieve CRM_Admin_Form::retrieveValues CRM_Admin_Form::preProcess Array ( [civi.tag] => deprecated )
```2024-02-02 11:34:18+0000 [warning] Deprecated function CRM_Contact_BAO_ContactType::retrieve, use API.
CRM_Core_Error::deprecatedFunctionWarning
CRM_Contact_BAO_ContactType::retrieve
CRM_Admin_Form::retrieveValues
CRM_Admin_Form::preProcess
Array
(
[civi.tag] => deprecated
)
```https://lab.civicrm.org/dev/core/-/issues/4957attempt to access invalid property :_tagGroup Caller: CRM_Contact_Form_Edit_T...2024-02-08T09:56:27ZRobert J. Langattempt to access invalid property :_tagGroup Caller: CRM_Contact_Form_Edit_TagsAndGroups::buildQuickForm Array ( [civi.tag] => deprecated )Overview
----------------------------------------
After upgrading from a CiviCRM 5.67.1 site to 5.69.4-ESR, I saw many messages in the watchdog log like these resulting from loading a Membership Contribution page that contains checkboxe...Overview
----------------------------------------
After upgrading from a CiviCRM 5.67.1 site to 5.69.4-ESR, I saw many messages in the watchdog log like these resulting from loading a Membership Contribution page that contains checkboxes for mailing list groups in the profile:
* attempt to access invalid property :_tagGroup Caller: CRM_Contact_Form_Edit_TagsAndGroups::buildQuickForm Array ( [civi.tag] => deprecated )
* Notice: Indirect modification of overloaded property CRM_Contribute_Form_Contribution_Main::$_tagGroup has no effect in CRM_Contact_Form_Edit_TagsAndGroups::buildQuickForm() (line 112 of /mysite/modules/contrib/civicrm/CRM/Contact/Form/Edit/TagsAndGroups.php).
Furthermore, and more importantly, the checkboxes are no longer rendered at all on the form.
Since the error message says that `:_tagGroup` is an invalid property, a search through the CiviCRM code turns up several references to it `$form->_tagGroup` in file `civicrm/CRM/Contact/Form/Edit/TagsAndGroups.php` (including the line 112 cited in the message above).
Is there a straightforward fix for this? We signed up for ESR to reduce the need to regularly update, but can't update to the current ESR version when it breaks membership signups.https://lab.civicrm.org/dev/core/-/issues/4949Scheduled reminders won't save when participant field is cleared2024-02-20T23:15:44ZrichardsplaygroundScheduled reminders won't save when participant field is clearedOverview
----------------------------------------
When an event scheduled reminder is created, and then edited, CiviCRM does not fully clear the "Recipient Roles" field and then throws an error saying a value is required even if "Recipie...Overview
----------------------------------------
When an event scheduled reminder is created, and then edited, CiviCRM does not fully clear the "Recipient Roles" field and then throws an error saying a value is required even if "Recipients" and "Recipient Roles" field is now blank. This prevents saving the edited scheduled reminder.
The workaround is to delete the scheduled reminder and re-create it.
This problem also arises when upgrading from older versions of CiviCRM that did not have the Recipients and Recipient Role fields. Upon upgrading, these fields are blank, but edits to the schedule reminder cannot be saved due to the same error message appearing.
Reproduction steps
----------------------------------------
1. Create a scheduled reminder. Fill in Recipients and Recipient Role fields. Save.
2. Edit scheduled reminder. Change Recipients to blank. The "Recipient Roles" field also goes blank as it should.
3. Try to save. You will get an error that the Recipient Roles field requires a value. This is incorrect.
Reproduced on dmaster.
Screenshots to reproduce:
Initial configuration of scheduled reminder.
![1_-_initial_schedule_reminder_config](/uploads/e008ad2070d528fd6b9ff34575469e1f/1_-_initial_schedule_reminder_config.png)
Edit scheduled reminder and click X to clear participant role:
![2_-_click_x_on_participant_role](/uploads/b11ceba3365ee9e2fa6fb25bfbcc51bd/2_-_click_x_on_participant_role.png)
Recipient role field is appropriately cleared:
![3_-_recipient_role_field_still_exists](/uploads/3dbef8f1b843903712ab8977734ef78e/3_-_recipient_role_field_still_exists.png)
But trying to save generates an error:
![4_-_and_generates_an_error_even_if_blank](/uploads/eb5683d821478faa273cf9ae5c5d10d9/4_-_and_generates_an_error_even_if_blank.png)
Current behaviour
----------------------------------------
See screenshots above.
Expected behaviour
----------------------------------------
When Recipients field is blank, Recipient Roles field should be blanked (which happens) and should no longer be required (which does not happen).
Environment information
----------------------------------------
Reproduced on dmaster on 5.71.alpha1. Also occurs on 5.68.1.colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4936Standalone: drop downs not displaying fields correctly2024-01-27T21:54:10ZAndy ClarkStandalone: drop downs not displaying fields correctlyThere is a lack of room in drop downs to display field names, so that in some cases it's hard to know what the field name is. For example, selecting the phone type for a contact shows only the first letter of the phone type - only 'M' f...There is a lack of room in drop downs to display field names, so that in some cases it's hard to know what the field name is. For example, selecting the phone type for a contact shows only the first letter of the phone type - only 'M' for mobile. Or 'Website Type' which is undecipherable. Tested on both Firefox and Chrome browsers. This is using the 5.69.2 Standalone release.https://lab.civicrm.org/dev/core/-/issues/4935Standalone: Cannot add a contact to a group after group creation2024-01-24T18:01:16ZAndy ClarkStandalone: Cannot add a contact to a group after group creationHere's the problem: 1. Create the group 2) 'Add to group' screen appears - enter contact name & search 3) select contacts found and click 'Add contact to whatever-you-called-the-group' 4) then 'Add to group' appears but when you click i...Here's the problem: 1. Create the group 2) 'Add to group' screen appears - enter contact name & search 3) select contacts found and click 'Add contact to whatever-you-called-the-group' 4) then 'Add to group' appears but when you click it error message 'Select Group is a required field.' appears but there is no group to select. In fact I couldn't find a way to add a contact to a group at all as the actions for a contact are restricted to just a few actions. This is caused by permissions so not actually a problem so close.
Using the 5.69.2 version of Standalonehttps://lab.civicrm.org/dev/core/-/issues/4926Drupal 10: `cv` fails on CiviCRM 5.69.22024-01-19T19:41:46ZpcurrierDrupal 10: `cv` fails on CiviCRM 5.69.2Overview
----------------------------------------
This is essentially a dupe of https://lab.civicrm.org/dev/core/-/issues/3438 -- Civi tries to call the drupal logger before it has been bootstrapped.
Reproduction steps
-----------------...Overview
----------------------------------------
This is essentially a dupe of https://lab.civicrm.org/dev/core/-/issues/3438 -- Civi tries to call the drupal logger before it has been bootstrapped.
Reproduction steps
----------------------------------------
1. Run a cv command, like "cv api system.check"
2. Get the error below if anything is logged before Drupal is up
Current behaviour
----------------------------------------
Here is the error from "cv -vvv":
```
In Drupal.php line 169:
[Drupal\Core\DependencyInjection\ContainerNotInitializedException]
\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.
Exception trace:
at /var/www/d8/web/core/lib/Drupal.php:169
Drupal::getContainer() at /var/www/d8/web/core/lib/Drupal.php:673
Drupal::logger() at /var/www/d8/vendor/civicrm/civicrm-core/CRM/Utils/System/Drupal8.php:301
CRM_Utils_System_Drupal8->url() at /var/www/d8/vendor/civicrm/civicrm-core/CRM/Utils/System.php:282
CRM_Utils_System::url() at /var/www/d8/vendor/civicrm/civicrm-core/tools/extensions/formprotection/settings/formprotection.setting.php:180
include() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsMetadata.php:109
Civi\Core\SettingsMetadata::loadSettingsMetadata() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsMetadata.php:92
Civi\Core\SettingsMetadata::loadSettingsMetaDataFolders() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsMetadata.php:66
Civi\Core\SettingsMetadata::getMetadata() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsManager.php:220
Civi\Core\SettingsManager->getDefaults() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsManager.php:102
Civi\Core\SettingsManager->useDefaults() at /var/www/d8/vendor/civicrm/civicrm-core/CRM/Core/Config.php:103
CRM_Core_Config::singleton() at phar:///usr/sbin/cv/src/Bootstrap.php:241
Civi\Cv\Bootstrap->boot() at phar:///usr/sbin/cv/src/Util/BootTrait.php:101
Civi\Cv\Command\ApiCommand->_boot_full() at n/a:n/a
call_user_func() at phar:///usr/sbin/cv/src/Util/BootTrait.php:45
Civi\Cv\Command\ApiCommand->boot() at phar:///usr/sbin/cv/src/Command/ApiCommand.php:59
Civi\Cv\Command\ApiCommand->execute() at phar:///usr/sbin/cv/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at phar:///usr/sbin/cv/vendor/symfony/console/Application.php:1009
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/sbin/cv/vendor/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at phar:///usr/sbin/cv/src/Application.php:82
Civi\Cv\Application->doRun() at phar:///usr/sbin/cv/vendor/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at phar:///usr/sbin/cv/src/Application.php:49
Civi\Cv\Application::main() at phar:///usr/sbin/cv/bin/cv:27
require() at /usr/sbin/cv:14
```
Expected behaviour
----------------------------------------
cv should not throw this error.
Environment information
----------------------------------------
* CiviCRM: 5.69.2
* PHP: 8.1.14
* CMS: Drupal 10.2
Comments
----------------------------------------
I tried bgm's fix from issue https://lab.civicrm.org/dev/core/-/issues/3438 (basically having CRM_Utils_System_Drupal8->url() return null before calling logger() if Drupal is not bootstrapped yet) and the error disappeared.https://lab.civicrm.org/dev/core/-/issues/4922Best way to go from an Excel list of Contact IDs to a Civi group2024-01-18T17:34:49ZAndrew WestBest way to go from an Excel list of Contact IDs to a Civi groupI get regular requests to turn an external list of contact IDs into a Civi group. I don't have a nice way of doing this atm.
**Search Builder**
The best approach I have so far is with Search Builder, of all things. I have a little bit ...I get regular requests to turn an external list of contact IDs into a Civi group. I don't have a nice way of doing this atm.
**Search Builder**
The best approach I have so far is with Search Builder, of all things. I have a little bit of javascript that adds an input and then turns that into a search builder search. This sends the data via POST to the usual search results screen, where you can save it to a group in the normal way. You can do this with tens of thousands of IDs.
![image](/uploads/e617cbf436d0ee9c5efa26efdf89bd03/image.png)
But Search Builder is going away, and it'd be nice to do it in a nice Form Builder screen that doesn't need refreshing.
**Search Kit / Form Builder**
Search Kit can't _quite_ do it. You can't paste in a comma-separated list of IDs:
![image](/uploads/1024c4cf753f0477352d067d983a7d4f/image.png)
(you _can_ paste in comma-separated lists for other fields, just not when it's not a lookup field like Contact ID)
I thought about making a custom quickform that links to a Search with the values in the URL - but this hits limits of the max length of URLs. And we regularly have tens of thousands of people.
Any other ideas? Is there any way to send data to Search Kit in the POST?https://lab.civicrm.org/dev/core/-/issues/4914Duplicate declaration of static variable $fields MailingEventForward.php2024-01-16T20:00:27ZspeleoDuplicate declaration of static variable $fields MailingEventForward.phpOverview
----------------------------------------
PHP Fatal error: Duplicate declaration of static variable $fields in ..../CRM/Mailing/Event/BAO/MailingEventForward.php on line 236
Reproduction steps
----------------------------------...Overview
----------------------------------------
PHP Fatal error: Duplicate declaration of static variable $fields in ..../CRM/Mailing/Event/BAO/MailingEventForward.php on line 236
Reproduction steps
----------------------------------------
1. Change site to php 8.3
1. Login to site
1. Got an error "PHP Fatal error: Duplicate declaration of static variable $fields in .../wp-content/plugins/civicrm/civicrm/CRM/Mailing/Event/BAO/MailingEventForward.php on line 236".
Current behaviour
----------------------------------------
```PHP Fatal error: Duplicate declaration of static variable $fields in .../wp-content/plugins/civicrm/civicrm/CRM/Mailing/Event/BAO/MailingEventForward.php on line 236
```
Expected behaviour
----------------------------------------
no error :)
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:__ Chrome Version 120.0.6099.217 (Official Build) (64-bit)
* __CiviCRM:__ CiviCRM 5.69.1 and latest on git
* __PHP:__ 8.3
* __CMS:__ WordPress 6.4.2
* __Database:__ mysql
* __Web Server:__ _Apache
Comments
----------------------------------------
Commented out line 236 to fix.https://lab.civicrm.org/dev/core/-/issues/4905Caching of CustomField metadata is a mess2024-02-23T20:13:59ZcolemanwCaching of CustomField metadata is a messBackground
-------
Multiple forms and functions need a list of custom fields. For example:
- Import forms need to know which custom fields can be imported
- SearchKit needs to know what fields can be searched & displayed
- Every crud fo...Background
-------
Multiple forms and functions need a list of custom fields. For example:
- Import forms need to know which custom fields can be imported
- SearchKit needs to know what fields can be searched & displayed
- Every crud form needs to display custom data sets
- Afform needs the list of custom fields
- etc. etc. etc.
Due to time, entropy and other "real world" stuff, most of these have developed their own peculiar way of gathering the list of custom fields, and implemented their own quirky ways of caching it.
What it should look like
-----------
A sensible model would be to have 1 function that returns a cached list of all custom fields. Caching would happen only once, and only in this function. All other code that needed to fetch a list of custom fields would call this function. All transformations of the master list (e.g. filtering by entity type, filtering by user permissions) should happen downstream and should not be re-cached.
What it actually looks like
-------
The technical term for what we have now is "a mess." No one function exists. Lots of redundancy. Some places don't cache at all which kills performance (APIv4 getfields included). Some other places create huge bloated caches which waste memory. Yet other places take those already cached lists and waste even more memory by caching them again!colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/4897Search Kit row links with comparison conditions broken2024-01-12T04:49:22ZufundoSearch Kit row links with comparison conditions brokenOverview
----------------------------------------
Search Kit row links with long conditionals seem to be broken in 5.69.
To reproduce
-----------------------------------------
Set up a Search Kit. Add a buttons column with a link that ...Overview
----------------------------------------
Search Kit row links with long conditionals seem to be broken in 5.69.
To reproduce
-----------------------------------------
Set up a Search Kit. Add a buttons column with a link that has a 3-part condition clause.
e.g.
![image](/uploads/8d73cea710d0b7309fb83b76f3f74737/image.png)
The links wont show on the right rows (the 1001 is getting overwritten with the domain ID)
To fix
------------------------------------------
https://github.com/civicrm/civicrm-core/pull/28944https://lab.civicrm.org/dev/core/-/issues/4896Conflict between cividiscount and public registrations2024-01-10T00:01:31ZtottenConflict between cividiscount and public registrationsOverview
----------------------------------------
There appears to be some conflict between CiviCRM 5.70-rc and cividiscount 3.8.9. I have not examined sufficiently to determine which one should be updated.
Reproduction steps
---------...Overview
----------------------------------------
There appears to be some conflict between CiviCRM 5.70-rc and cividiscount 3.8.9. I have not examined sufficiently to determine which one should be updated.
Reproduction steps
----------------------------------------
1. Install CiviCRM 5.70 and cividiscount 3.8.9 (current master, via git)
1. Create a free event with online registration. (I disabled confirmation-web-page and enabled conformation-email, FWIW.)
1. In a new/private window:
1. Open the event info page (`civicrm/event/info?reset=1&id=7`)
1. Open the event registration page (`civicrm/event/register?id=7&reset=1`)
Current behaviour
----------------------------------------
`civicrm/event/info` works but `civicrm/event/register` raises an error:
```
ReflectionException: "Property CRM_Event_Form_Registration_Register::$_contactID does not exist"
#0 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Form.php(2114): ReflectionProperty->__construct(Object(CRM_Event_Form_Registration_Register), "_contactID")
#1 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/tools/extensions/cividiscount/cividiscount.php(453): CRM_Core_Form->getVar("_contactID")
#2 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/tools/extensions/cividiscount/cividiscount.php(95): _cividiscount_get_form_contact_id(Object(CRM_Event_Form_Registration_Register))
#3 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Utils/Hook.php(276): cividiscount_civicrm_buildForm("CRM_Event_Form_Registration_Register", Object(CRM_Event_Form_Registration_Register))
#4 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Utils/Hook/DrupalBase.php(73): CRM_Utils_Hook->runHooks((Array:60), "civicrm_buildForm", 2, "CRM_Event_Form_Registration_Register", Object(CRM_Event_Form_Registration_Register), NULL, NULL, NULL, NULL)
#5 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(314): CRM_Utils_Hook_DrupalBase->invokeViaUF(2, "CRM_Event_Form_Registration_Register", Object(CRM_Event_Form_Registration_Register), NULL, NULL, NULL, NULL, "civicrm_buildForm")
#6 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(251): Civi\Core\CiviEventDispatcher::delegateToUF(Object(Civi\Core\Event\GenericHookEvent), "hook_civicrm_buildForm", Object(Civi\Core\UnoptimizedEventDispatcher))
#7 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners((Array:1), "hook_civicrm_buildForm", Object(Civi\Core\Event\GenericHookEvent))
#8 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(263): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Civi\Core\Event\GenericHookEvent), "hook_civicrm_buildForm")
#9 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Utils/Hook.php(168): Civi\Core\CiviEventDispatcher->dispatch("hook_civicrm_buildForm", Object(Civi\Core\Event\GenericHookEvent))
#10 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Utils/Hook.php(495): CRM_Utils_Hook->invoke((Array:2), "CRM_Event_Form_Registration_Register", Object(CRM_Event_Form_Registration_Register), NULL, NULL, NULL, NULL, "civicrm_buildForm")
#11 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Form.php(766): CRM_Utils_Hook::buildForm("CRM_Event_Form_Registration_Register", Object(CRM_Event_Form_Registration_Register))
#12 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(76): CRM_Core_Form->buildForm()
#13 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Event_Form_Registration_Register), "display")
#14 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Event_Form_Registration_Register), "display")
#15 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle("display")
#16 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(322): CRM_Core_Controller->run((Array:3), NULL)
#17 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem((Array:18))
#18 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke((Array:3))
#19 /Users/totten/bknix/build/dmaster/web/sites/all/modules/civicrm/drupal/civicrm.module(472): CRM_Core_Invoke::invoke((Array:3))
#20 /Users/totten/bknix/build/dmaster/web/includes/menu.inc(527): civicrm_invoke("event", "register")
#21 /Users/totten/bknix/build/dmaster/web/index.php(24): menu_execute_active_handler()
#22 {main}
```
Expected behaviour
----------------------------------------
Show registration screen
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
* __CiviCRM:__ 5.70-rc
* __PHP:__ 8.1
* __CMS:__ D7
* __Database:__ MySQL 5.7
* __Web Server:__ Apachehttps://lab.civicrm.org/dev/core/-/issues/4894Fatal error when searching a contact2024-01-10T14:07:35ZGuillaumeSorelFatal error when searching a contactOn CiviCRM 5.69.1 when I do a simple contact search I get this error and can't see the contact
```[error]
$Fatal Error Details = array:3 [
"message" => """
Unexpected result from getcountArray\n
(\n
[error_code] => -2...On CiviCRM 5.69.1 when I do a simple contact search I get this error and can't see the contact
```[error]
$Fatal Error Details = array:3 [
"message" => """
Unexpected result from getcountArray\n
(\n
[error_code] => -2\n
[sql] => \n
[debug_info] => SELECT count(*) as c\n
FROM civicrm_activity a\n
LEFT JOIN civicrm_case_activity actjoin_case_id ON (actjoin_case_id.activity_id = a.id)\n
WHERE (((`a`.`activity_type_id` Array)))\n
AND (a.id IN (SELECT activity_id FROM civicrm_activity_contact WHERE contact_id = "27478"))\n
AND (actjoin_case_id.case_id IS NULL)\n
AND (a.is_current_revision = "1")\n
AND (a.activity_type_id IN ("1", "55", "56", "57", "58", "59", "70", "71", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "72", "73", "74", "75", "76", "77", "78", "80", "82", "84", "86", "88", "89"))\n
AND (a.is_test = "0")\n
AND (a.is_deleted = "0")\n
[nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Array)))\n
AND (a.id IN (SELECT activity_id FROM civicrm_activity_contact WHE...' at line 4]\n
[entity] => Activity\n
[action] => get\n
[is_error] => 1\n
[error_message] => case_id is not valid : 1\n
[debug_information] => \n
)\n
"""
"code" => null
"exception" => CRM_Core_Exception {#36862
-errorData: array:5 [
"error_code" => 0
"entity" => "Activity"
"action" => "getcount"
"is_error" => 1
"error_message" => """
Unexpected result from getcountArray\n
(\n
[error_code] => -2\n
[sql] => \n
[debug_info] => SELECT count(*) as c\n
FROM civicrm_activity a\n
LEFT JOIN civicrm_case_activity actjoin_case_id ON (actjoin_case_id.activity_id = a.id)\n
WHERE (((`a`.`activity_type_id` Array)))\n
AND (a.id IN (SELECT activity_id FROM civicrm_activity_contact WHERE contact_id = "27478"))\n
AND (actjoin_case_id.case_id IS NULL)\n
AND (a.is_current_revision = "1")\n
AND (a.activity_type_id IN ("1", "55", "56", "57", "58", "59", "70", "71", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "72", "73", "74", "75", "76", "77", "78", "80", "82", "84", "86", "88", "89"))\n
AND (a.is_test = "0")\n
AND (a.is_deleted = "0")\n
[nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Array)))\n
AND (a.id IN (SELECT activity_id FROM civicrm_activity_contact WHE...' at line 4]\n
[entity] => Activity\n
[action] => get\n
[is_error] => 1\n
[error_message] => case_id is not valid : 1\n
[debug_information] => \n
)\n
"""
]
#cause: null
-_trace: null
#message: """
Unexpected result from getcountArray\n
(\n
[error_code] => -2\n
[sql] => \n
[debug_info] => SELECT count(*) as c\n
FROM civicrm_activity a\n
LEFT JOIN civicrm_case_activity actjoin_case_id ON (actjoin_case_id.activity_id = a.id)\n
WHERE (((`a`.`activity_type_id` Array)))\n
AND (a.id IN (SELECT activity_id FROM civicrm_activity_contact WHERE contact_id = "27478"))\n
AND (actjoin_case_id.case_id IS NULL)\n
AND (a.is_current_revision = "1")\n
AND (a.activity_type_id IN ("1", "55", "56", "57", "58", "59", "70", "71", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "72", "73", "74", "75", "76", "77", "78", "80", "82", "84", "86", "88", "89"))\n
AND (a.is_test = "0")\n
AND (a.is_deleted = "0")\n
[nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Array)))\n
AND (a.id IN (SELECT activity_id FROM civicrm_activity_contact WHE...' at line 4]\n
[entity] => Activity\n
[action] => get\n
[is_error] => 1\n
[error_message] => case_id is not valid : 1\n
[debug_information] => \n
)\n
"""
#code: 0
#file: "/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/api/api.php"
#line: 138
trace: {
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/api/api.php:138 {
civicrm_api3(string $entity, string $action, array $params = [])
› if (is_array($result) && !empty($result['is_error'])) {
› throw new CRM_Core_Exception($result['error_message'], $result['error_code'] ?? 'undefined', $result);
› }
}
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Activity/BAO/Activity.php:898 { …}
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/BAO/Contact.php:2641 { …}
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/View/Summary.php:434 { …}
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/View/Summary.php:255 { …}
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/View/Summary.php:83 { …}
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:322 { …}
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
/var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm.php:1231 { …}
/var/www/vhosts/domain/httpdocs/wp-includes/class-wp-hook.php:308 { …}
/var/www/vhosts/domain/httpdocs/wp-includes/class-wp-hook.php:332 { …}
/var/www/vhosts/domain/httpdocs/wp-includes/plugin.php:517 { …}
/var/www/vhosts/domain/httpdocs/wp-admin/admin.php:259 { …}
}
}
]
2024-01-08 13:30:57+0100 [debug] $backTrace = #0 /var/www/vhosts/smc-cse.fr/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /var/www/vhosts/smc-cse.fr/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
#2 /var/www/vhosts/domain/httpdocs/wp-content/plugins/civicrm/civicrm.php(1231): CRM_Core_Invoke::invoke((Array:3))
#3 /var/www/vhosts/domain/httpdocs/wp-includes/class-wp-hook.php(308): CiviCRM_For_WordPress->invoke("")
#4 /var/www/vhosts/domain/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters("", (Array:1))
#5 /var/www/vhosts/domain/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action((Array:1))
#6 /var/www/vhosts/domain/httpdocs/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
#7 {main}```https://lab.civicrm.org/dev/release/-/issues/245.69.1 critical error: Undefined array key "crmSearchTasks" in "ext/search_ki...2024-02-01T22:42:39ZDmitry Smirnov5.69.1 critical error: Undefined array key "crmSearchTasks" in "ext/search_kit/search_kit.php" on line 61```
PHP Warning: Undefined array key "crmSearchTasks" in ext/search_kit/search_kit.php on line 61
PHP Warning: Trying to access array offset on value of type null in ext/search_kit/search_kit.php on line 61
PHP Fatal error: Uncaught T...```
PHP Warning: Undefined array key "crmSearchTasks" in ext/search_kit/search_kit.php on line 61
PHP Warning: Trying to access array offset on value of type null in ext/search_kit/search_kit.php on line 61
PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in ext/search_kit/search_kit.php:61
```https://lab.civicrm.org/dev/core/-/issues/4888Location field on case activity isn't aligned properly2024-01-10T17:48:56ZDaveDLocation field on case activity isn't aligned properly![untitled3](/uploads/7571ef6057725f323e355fda70c7cd1c/untitled3.png)![untitled3](/uploads/7571ef6057725f323e355fda70c7cd1c/untitled3.png)https://lab.civicrm.org/dev/drupal/-/issues/192Allow other case roles who are not the case client to update details on the c...2024-01-04T20:44:10Zshraddha_compucorpAllow other case roles who are not the case client to update details on the case via webformCurrently, due to security considerations, only the case client can submit data onto a case via a public form. Create functionality so that a webform can be configured to allow either the client or those with specific case roles to updat...Currently, due to security considerations, only the case client can submit data onto a case via a public form. Create functionality so that a webform can be configured to allow either the client or those with specific case roles to update the details on a specific case.
The table below illustrates the current functioning of the system across different scenarios. Scenario 8 reflects the anticipated operation in accordance with the detailed requirements provided below.
<table>
<tr>
<th>
</th>
<th>
</th>
<th>
**Current expected outcome**
</th>
</tr>
<tr>
<td>
**Case client**
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>Scenario 1: Base scenario</td>
<td>
* Is not a case client
* Is not a current case role
* Is not logged in
* Does not have checksum
* No permissions
</td>
<td>Cannot access case on webform</td>
</tr>
<tr>
<td>Scenario 2: Logged out no checksum</td>
<td>
* **Is a case client**
* Is not a current case role
* Is not logged in
* Does not have checksum
* No permissions
</td>
<td>
Cannot access case on webform
(As is not logged in and doesn’t have a checksum token)
</td>
</tr>
<tr>
<td>Scenario 3: Logged out no checksum</td>
<td>
* **Is a case client**
* Is not a current case role
* Is not logged in
* **Does have checksum**
* No permissions
</td>
<td>
**Can access case on webform**
</td>
</tr>
<tr>
<td>
**Case role**
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>Scenario 4</td>
<td>
* **Has a current case role**
* Is not logged in
* Does not have checksum
* No additional permissions
</td>
<td>Cannot access case on webform</td>
</tr>
<tr>
<td>Scenario 5</td>
<td>
* **Has a current case role**
* Is not logged in
* **Does have checksum**
* No additional permissions
</td>
<td>Cannot access case on webform</td>
</tr>
<tr>
<td>Scenario 6</td>
<td>
* **Has a current case role**
* Is not logged in
* **Does have checksum**
* **Access MY cases**
</td>
<td>Cannot access case on webform</td>
</tr>
<tr>
<td>Scenario 7</td>
<td>
* **Has a current case role**
* Is not logged in
* **Does have checksum**
* **Access ALL cases**
</td>
<td>Cannot access case on webform</td>
</tr>
<tr>
<td>
**New scenario**
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>Scenario 8</td>
<td>
* **Has a current case role**
* Is not logged in
* **Does have checksum**
* No additional permissions
---
Configure the webform:
* Case role specified can access the case
</td>
<td>
**New: Should be able to access and update case via webform**
</td>
</tr>
</table>
<table>
<tr>
<th>
**ID / Title**
</th>
<th>
**Detailed requirement**
</th>
</tr>
<tr>
<td>
1.1
Webform Configuration
</td>
<td>
Create a new setting under Webform \> Civicrm \> Cases \> Case Roles
* Field details:
* Title: Case roles that can update case via webform
* Type: Multi-select
* Options: List of case roles in CiviCRM
* Help: Specify additional case roles that can access the case via the webform without logging in. To do so create a link with the following details populated: examplesite.com&case1={case.id}&cid1={contact.id}&{contact.checksum} where case1 is the case number on the form, cid1 is the contact you would like to populate with the users details who is accessing the form. Note that contacts who are the case client can always access the case with the above details.
Sample screenshot:
![8b1ebeb3-bbba-484f-8581-a2316410efb7.png](/uploads/6ced689e3b7e11fd794778f2ed86a3e8/8b1ebeb3-bbba-484f-8581-a2316410efb7.png)
</td>
</tr>
<tr>
<td>
1.2
Allow other case roles who are not the case client to update details on the case via webform
</td>
<td>
* If a contact holds a current case role (eg: user1@user1.com i.e. consultant)
* Start date \<= todays date or null
* AND
* End date \> todays date or null
* AND
* Is_active (is not) NO
* They are sent a link via email to a specific webform with:
* Contact ID of their contact autoloaded on the form for at least one of the existing contact fields
* AND
* Case ID is in the URL is a case where they have a case role (&case1={case_id})
* AND
* Case type has their role enabled for edit access as per ID-1.1 above
* AND
* Either:
* Contact CheckSum for their contact if not logged in
* OR
* Any of the following: _(note the following is unchanged from CiviCRM out the box and just included for completeness)_
* Check CiviCRM permissions if logged in
* If they have _CiviCRM Admin_ role they should have access OR
* If they have _CiviCase: access all cases and activities_ OR
* If they have CiviCase: access my cases and activities And are the case manager
* The case details should load in the webform and allow the user to update the case.
eg:
`examplesite.com&case1={case.id}&cid1={contact.id}&{contact.checksum}`
or if populated:
`examplesite.com&case1=100&cid1=999&asokdaoskda98asd Case ID = 100 Contact ID = 999 Checksum = asokdaoskda98asd`
The above should allow the “Contact 1” on the case to edit the case (i.e. the URL above should load the case) if:
1. The contact with ID: 999 has a current case role on the case with ID: 100
2. That case role has been configured to allow access (setting 1.1)
3. The checksum (asokdaoskda98asd) is current / valid
Then the form should load the case details and allow the user to submit and update the case via the form.
</td>
</tr>
</table>https://lab.civicrm.org/dev/core/-/issues/4874Smarty3: file not found in extension2024-02-10T03:20:14ZJonGoldSmarty3: file not found in extensionOverview
----------------------------------------
I changed all my dev sites to use Smarty3, but have been hitting errors. I often need to disable Smarty3 to get my work done, and I've had a hard time isolating some of the bugs, but I h...Overview
----------------------------------------
I changed all my dev sites to use Smarty3, but have been hitting errors. I often need to disable Smarty3 to get my work done, and I've had a hard time isolating some of the bugs, but I have one that I think typifies many I've seen.
Reproduction steps
----------------------------------------
1. Install https://github.com/MegaphoneJon/autopagealias.
1. Try to configure the "Title and Settings" tab of any contribution page.
Current behaviour
----------------------------------------
500 error. Backtrace at the bottom.
Expected behaviour
----------------------------------------
Page loads.
Comments
----------------------------------------
This extension is supposed to [load a template into a region](https://github.com/MegaphoneJon/autopagealias/blob/345b08dd296547499cea49c39fb6c82690800716/autopagealias.php#L55-L57) which is what fails.
Backtrace:
```
SmartyException: "Unable to load template 'file:autopagealias.tpl'"
#0 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()
#1 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute()
#2 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Core/Region.php(81): Smarty_Internal_TemplateBase->fetch()
#3 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Core/Region.php(157): CRM_Core_Region->{closure}()
#4 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Core/Smarty/plugins/block.crmRegion.php(26): CRM_Core_Region->render()
#5 /home/jon/local/mysite/web/sites/default/files/civicrm/templates_c/en_US/c8/a8/bd/c8a8bd2f0d2e36364b83a4b0b14004fe7f08dd67_0.file.default.tpl.php(40): smarty_block_crmRegion()
#6 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_65836ac8491583_28697209()
#7 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()
#8 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()
#9 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()
#10 /home/jon/local/mysite/web/sites/default/files/civicrm/templates_c/en_US/5c/4f/99/5c4f999cd4ef413bb2921f2d4e6361f852f26f8a_0.file.snippet.tpl.php(73): Smarty_Internal_Template->_subTemplateRender()
#11 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_65836ac8383521_30854142()
#12 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()
#13 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()
#14 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()
#15 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/smarty3/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute()
#16 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(117): Smarty_Internal_TemplateBase->fetch()
#17 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(83): CRM_Core_QuickForm_Action_Display->renderForm()
#18 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform()
#19 /home/jon/local/mysite/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle()
#20 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle()
#21 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run()
#22 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(295): CRM_Utils_Wrapper->run()
#23 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem()
#24 /home/jon/local/mysite/web/sites/all/modules/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke()
#25 /home/jon/local/mysite/web/sites/all/modules/civicrm/drupal/civicrm.module(472): CRM_Core_Invoke::invoke()
#26 /home/jon/local/mysite/web/includes/menu.inc(527): civicrm_invoke()
#27 /home/jon/local/mysite/web/index.php(21): menu_execute_active_handler()
#28 {main}
```https://lab.civicrm.org/dev/core/-/issues/4872SearchKit: Many "group by" requests result in "illegal offset type" 500 error2024-01-05T03:42:44ZJonGoldSearchKit: Many "group by" requests result in "illegal offset type" 500 errorOverview
----------------------------------------
Grouping results that contain both individual and organizations in the results leads to an "illegal offset type" error.
Reproduction steps
----------------------------------------
Import...Overview
----------------------------------------
Grouping results that contain both individual and organizations in the results leads to an "illegal offset type" error.
Reproduction steps
----------------------------------------
Import and run this SearchKit query.
```
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "illegal_offset_type",
"label": "illegal offset type",
"api_entity": "Contact",
"api_params": {
"version": 4,
"select": [
"COUNT(id) AS COUNT_id",
"GROUP_CONCAT(DISTINCT sort_name) AS GROUP_CONCAT_sort_name",
"GROUP_CONCAT(DISTINCT contact_type:label) AS GROUP_CONCAT_contact_type_label",
"GROUP_CONCAT(DISTINCT contact_sub_type:label) AS GROUP_CONCAT_contact_sub_type_label"
],
"orderBy": [],
"where": [],
"groupBy": [
"Contact_Address_contact_id_01.street_address"
],
"join": [
[
"Address AS Contact_Address_contact_id_01",
"LEFT",
[
"id",
"=",
"Contact_Address_contact_id_01.contact_id"
],
[
"Contact_Address_contact_id_01.is_primary",
"=",
true
]
]
],
"having": []
}
}
],
"match": [
"name"
]
}
]
]
```
Current behaviour
----------------------------------------
500 error:
```
TypeError: Illegal offset type in Civi\Api4\Utils\FormattingUtil::contactFieldsToRemove() (line 430 of /home/jon/local/civicrm-buildkit/build/dmaster/web/sites/all/modules/civicrm/Civi/Api4/Utils/FormattingUtil.php).
```
Expected behaviour
----------------------------------------
No error.JonGoldJonGold