Development issueshttps://lab.civicrm.org/groups/dev/-/issues2023-05-04T17:32:57Zhttps://lab.civicrm.org/dev/core/-/issues/4275pear/pear-core-minimal patch no longer needed2023-05-04T17:32:57Zcollinhainespear/pear-core-minimal patch no longer neededOverview
----------------------------------------
The pear/pear-core-minimal package has updated recently which included [this patch](https://lab.civicrm.org/dev/core/-/blob/master/composer.json#L283).
Reproduction steps
---------------...Overview
----------------------------------------
The pear/pear-core-minimal package has updated recently which included [this patch](https://lab.civicrm.org/dev/core/-/blob/master/composer.json#L283).
Reproduction steps
----------------------------------------
1. Create new composer project requiring civicrm/civicrm-core also ensuring that composer patches are allowed to be applied.
Current behaviour
----------------------------------------
The following exception is thrown when installing:
```
...
1 out of 1 hunk ignored
Could not apply patch! Skipping. The error was: Cannot apply patch https://patch-diff.githubusercontent.com/raw/pear/pear-core-minimal/pull/11.patch
In Patches.php line 331:
[Exception]
Cannot apply patch Apply patch to fix creation of dynamic properties in PEAR_Error class (https://patch-diff.githubusercontent.com/raw/pear/pear-core-minimal/pull/11.patch)!
```
Expected behaviour
----------------------------------------
Composer installs as expected.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __CiviCRM:__ 5.60.0
* __PHP:__ 8.1
* __CMS:__ Drupal 9.5.x
Comments
----------------------------------------
I think the patch is no longer required.
[Related pear/pear-core-minimal pull request](https://github.com/pear/pear-core-minimal/pull/11).https://lab.civicrm.org/dev/core/-/issues/4274SearchKit: Entities that are no longer results of the search remain selected2023-05-25T15:54:17ZlarsssandergreenSearchKit: Entities that are no longer results of the search remain selectedIf you search for Contacts in SearchKit, select all or some of the Contacts, then edit your search to make it more specific and click search again, the previously selected Contacts, who may not be within the results of the current search...If you search for Contacts in SearchKit, select all or some of the Contacts, then edit your search to make it more specific and click search again, the previously selected Contacts, who may not be within the results of the current search, remain selected. This not only gives nonsensical totals (`100 selected of 10 results`), it can result in unintended changes, for instance if you were to add or remove the Contacts from a group, expecting to be adding or removing the results of your current search, not the results of your previous search (not a theoretical concern, this actually happened to me).
I think the solution is pretty simple, just clear the selection of entities whenever we search again. I can't see why we would want the selected entities to remain selected when we are doing a new search.https://lab.civicrm.org/dev/translation/-/issues/82Spelling error in Dutch deprecation notice2023-05-04T13:50:48ZJanecSpelling error in Dutch deprecation noticeCurrent: APIv3 is de legacy versie van CiviCRM's API. Hoewel nog ondersteunt, raden wij het gebruik in nieuwe projecten af.
Should be: APIv3 is de legacy versie van CiviCRM's API. Hoewel nog ondersteund, raden wij het gebruik in nieuwe ...Current: APIv3 is de legacy versie van CiviCRM's API. Hoewel nog ondersteunt, raden wij het gebruik in nieuwe projecten af.
Should be: APIv3 is de legacy versie van CiviCRM's API. Hoewel nog ondersteund, raden wij het gebruik in nieuwe projecten af.https://lab.civicrm.org/dev/core/-/issues/4271CRM_Core_Error: DB Error: unknown error: Expression 3 of SELECT list is not i...2023-05-02T09:47:12ZkenorbCRM_Core_Error: DB Error: unknown error: Expression 3 of SELECT list is not in GROUP BY clause and contains nonaggregated columnOverview
----------------------------------------
The following error happens when trying to generate a Report from a Dashboard after selecting multiple choice field:
> CRM_Core_Error: DB Error: unknown error: Expression 3 of SELECT li...Overview
----------------------------------------
The following error happens when trying to generate a Report from a Dashboard after selecting multiple choice field:
> CRM_Core_Error: DB Error: unknown error: Expression 3 of SELECT list is not in GROUP BY clause and contains nonaggregated column
Reproduction steps
----------------------------------------
1. Having Contact with custom group field set with the field type: Multiple choice option of type Integer Drop-down select list (Req=Yes)
2. Go to the existing Dashboard page at: /civicrm/report/instance/%
3. Select Multiple choice integer field (mentioned before)
4. Got an error "**Fatal error: DB error**".
Current behaviour
----------------------------------------
The following error happens on clicking 'View results' on Dashboard page.
```
[message] => DB Error: unknown error
[function] => exceptionHandler
[class] => CRM_Core_Error
[type] => ::
[args] => Array
(
[0] => stdClass Object
(
[__CLASS__] => DB_Error
[error_message_prefix] =>
[mode] => 16
[level] => 1024
[code] => -1
[message] => DB Error: unknown error
[userinfo] => SELECT SQL_CALC_FOUND_ROWS civicrm_contact.id as civicrm_contact_civicrm_contact_contact_id , civicrm_contact.display_name as civicrm_contact_civicrm_contact_display_name , civicrm_value_custom_77.custom_455 as civicrm_value_custom_77_custom_455 FROM civicrm_contact civicrm_contact
LEFT JOIN civicrm_value_custom_77 civicrm_value_custom_77 ON civicrm_value_custom_77.entity_id = civicrm_contact.id WHERE ( ( civicrm_contact.contact_type IN ( 'Individual') ) ) AND ( ( civicrm_contact.contact_sub_type LIKE '%�Foo�%' ) OR ( civicrm_contact.contact_sub_type LIKE '%�Bar�%' ) ) AND ( civicrm_value_custom_77.custom_455 IS NOT NULL ) AND ( ( civicrm_contact.contact_type IN ( 'Individual') ) ) AND ( ( civicrm_contact.contact_sub_type LIKE '%�Foo�%' ) OR ( civicrm_contact.contact_sub_type LIKE '%�Bar�%' ) ) AND ( civicrm_value_custom_77.custom_455 IS NOT NULL ) GROUP BY civicrm_contact.id LIMIT 0, 50 [nativecode=1055 ** Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'db.civicrm_value_custom_77.custom_455' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]
...
modules/civicrm-ext/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ExtendedReport.php
[line] => 1737
[function] => buildRows
[class] => CRM_Report_Form
```
Expected behaviour
----------------------------------------
_What should happen._
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:__ _112.0.5615.49_
* __CiviCRM:__ _5.39.1_
* __PHP:__ _7.3.33-8_
* __CMS:__ _8.9.20_
* __Database:__ _MySQL 5.7.40_
* __Web Server:__ _Apache/2.4.54 (Ubuntu)_
Comments
----------------------------------------
_Anything else you would like the reviewer to note._https://lab.civicrm.org/dev/core/-/issues/4268Incorrect membership status on payment failure2023-04-28T13:04:50ZMonish DebIncorrect membership status on payment failureOverview
----------------------------------------
If there is an active membership A and the user selects & renews for a different membership B, then on payment failure membership B retain the old membership status (current/new) instead ...Overview
----------------------------------------
If there is an active membership A and the user selects & renews for a different membership B, then on payment failure membership B retain the old membership status (current/new) instead of pending.
Reproduction steps
----------------------------------------
1. A user has active membership A
1. User made a live donation for membership B (that belongs to the same membership org)
1. Payment fails due to some reason.
Current behaviour
----------------------------------------
The user has an active membership B linked with a Pending (Incomplete transaction) contribution.
Expected behaviour
----------------------------------------
The membership status should be set to Pending
Environment information
----------------------------------------
* __Browser:__ _Firefox 59.0.1/Chrome 78.0.3904/Safari 13_
* __CiviCRM:__ _Master_
* __PHP:__ __8.0_
* __CMS:__ _Drupal 8_
* __Database:__ _MariaDB 10.4_
* __Web Server:__ _Apache 2.4_Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/4263Form Builder: Re-ordering custom field multiple choice options causes front-e...2023-04-26T17:50:35ZshaneonabikeForm Builder: Re-ordering custom field multiple choice options causes front-end IDs to changeOverview
----------------------------------------
We created a sweet little Form Builder that submits the entered information into a CiviCase. In some cases, I needed to show/hide some additional fields based on what they entered in _Int...Overview
----------------------------------------
We created a sweet little Form Builder that submits the entered information into a CiviCase. In some cases, I needed to show/hide some additional fields based on what they entered in _Interests_ so I added some front-end JQuery.
![Selection_002](/uploads/0ac63ecf7496c8681612f49871c5cded/Selection_002.png)
Later, without realizing, the _Interests_ checkbox list was re-ordered, which in tern seems to have changed the IDs for each checkbox item.
![Selection_003](/uploads/38b07ebc39582dae20addf515d642127/Selection_003.png)
Example use-case
----------------------------------------
1. Create a Custom Field set (associated to Individual in my case)
2. Add a ```Alphanumberic``` checkbox field called _Interests_
3. Create a FormBuilder
3. Add _Interests_ field
4. Save and view the form
5. Check the IDs associated to a few checkbox items
6. Edit the _Interests_ checkbox options and re-order them
7. View the form
Current behaviour
----------------------------------------
Presently, I had assumed that perhaps the ID being generated would actually be associated to the actual checbkox ID and would be static (not changing on order change).
Proposed behaviour
----------------------------------------
Is it possible that Form Builder use the actual Multiple Choice ID or if this isn't unique enough perhaps we could use something like ```<field-name>-<field ID>-<multiple choice ID>```https://lab.civicrm.org/dev/core/-/issues/4260CiviEvent: Submit button has wrong label in online registrations with multipl...2023-07-05T23:48:38ZAndreasandreas.howiller@civiservice.deCiviEvent: Submit button has wrong label in online registrations with multiple participants (on free events without confirmation screen)Overview
----------------------------------------
On a registration page for an event that allows multiple attendees, the submit button is labelled "Review" instead of "Register" though confirmation screen is disabled and event has no f...Overview
----------------------------------------
On a registration page for an event that allows multiple attendees, the submit button is labelled "Review" instead of "Register" though confirmation screen is disabled and event has no fees:
![grafik](/uploads/212957e4dfcbd9d321ff468009e9fce7/grafik.png)
Reproduction steps
----------------------------------------
1. Create a event free of charge with online registration
1. Enable checkbox "Register multiple participants?"
1. Try out registration page
Current behaviour
----------------------------------------
1. Button is labelled "Review" when option for multiple participants is enabled and drop down option is "1".
2. For dropdown "2" the label is "Continue" in the first step of the form. The last step then shows "Continue" again.
Expected behaviour
----------------------------------------
The "final submission button" should here always have the label "register" as it is the case when disabling "Register multiple participants".
Environment information
----------------------------------------
Reproduced on:
* __CiviCRM:__ _5.61.alpha1/5.60.0/5.58.1_
* __PHP:__ _8.1/7.4_https://lab.civicrm.org/dev/core/-/issues/4259Invoice sending as email with PDF attachment replaces email contents with PDF...2023-05-16T22:27:48ZfrankADsystopia.deInvoice sending as email with PDF attachment replaces email contents with PDF contentsOverview
----------------------------------------
Sending invoices with emails, where the invoice is attached as PDF to the email, and having a freely designed email text results in the contents of the email body being replaced with the ...Overview
----------------------------------------
Sending invoices with emails, where the invoice is attached as PDF to the email, and having a freely designed email text results in the contents of the email body being replaced with the contents of the invoice PDF and nothing being attached to the email.
Ticket on [stackexchange](https://civicrm.stackexchange.com/questions/44842/invoice-sending-as-email-with-pdf-attachment-replaces-email-contents-with-pdf-co)
Reproduction steps
----------------------------------------
1. (Preliminary) To enable Invoicing go to **Administer > CiviContribute > CiviContribute Component Settings** and check the **Enable Tax and Invoicing** box.
2. Search for a contribution for which you want to send the invoice. Select the ones you want to send an invoice in the search result.
4. Choose the action **Invoices - print or email**.
5. On the next screen select **Email Invoice** and fill the now displayed fields with suitable data.
6. Then press **Process Invoice(s)**. A success message should appear.
7. Check the received email(s).
Current behaviour
----------------------------------------
In the received email the content of the email body is gone and replace by the content of the PDF. The email has no attachments.
Expected behaviour
----------------------------------------
The email should keep its content and the contents of the PDF should be in an attached PDF file.
Environment information
----------------------------------------
Reproduction on dmaster is not possible because emails are not sent.
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __CiviCRM:__ _5.60.0/5.58.1/5.57.0_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _7.4.33_
* __CMS:__ _Drupal 9.5.5/9.5.1_
* __Database:__ _MariaDB 10.3.35_
The issue occurs with the unaltered default invoice template and with an altered template.
We normally use the **Invoice Helper** extension but the problem also appears without the extension being enabled.
Comment
----------------------------------------
Seems to be a regression, as it has worked before.https://lab.civicrm.org/dev/core/-/issues/4258Show next scheduled contribution date for recurring contributions on contact2023-07-05T23:48:38ZlarsssandergreenShow next scheduled contribution date for recurring contributions on contactCurrently, the active recurring contribution start date is shown, but the next scheduled contribution date would be much more useful (I often find myself looking for the next contribution date, especially when there is a credit card issu...Currently, the active recurring contribution start date is shown, but the next scheduled contribution date would be much more useful (I often find myself looking for the next contribution date, especially when there is a credit card issue, but rarely need to know the start date for the series).
For inactive recurring contributions, it would be much more useful to know the cancellation date than the start date.
For reference, the current situation:
![image](/uploads/a955ce997cc6063eab4dee4852a0d282/image.png)
Will submit PR if supported.https://lab.civicrm.org/dev/core/-/issues/4254AdminUI: Redirection after creating new profile and adding fields is incorrec...2023-08-09T14:51:35ZlarsssandergreenAdminUI: Redirection after creating new profile and adding fields is incorrect / not user friendlyOverview
----------------------------------------
After creating a new profile, the user is not redirected to the newly created profile.
Reproduction steps
----------------------------------------
1. Click Add Profile
1. Enter name and ...Overview
----------------------------------------
After creating a new profile, the user is not redirected to the newly created profile.
Reproduction steps
----------------------------------------
1. Click Add Profile
1. Enter name and save
Current behaviour
----------------------------------------
After creating a new profile, the user is redirected to the list of all profiles and has to find their newly created profile in the list and click fields to open the profile and then add field to add fields.
Expected behaviour
----------------------------------------
After creating a new profile, the user should be redirected to `http://drupal-test.localhost/civicrm/admin/uf/group/field#/?uf_group_id=NN`, ideally with the add field modal window opened.
Environment information
----------------------------------------
dmaster (5.62)
Comments
----------------------------------------
I believe this is a regression introduced when this page was switched to FormBuilder - I'm fairly confident it used to work as indicated above.https://lab.civicrm.org/dev/core/-/issues/4249Dblog warning: pass an array for included groups Caller: CRM_ACL_API::groupPe...2023-04-20T13:52:38ZRobert J. LangDblog warning: pass an array for included groups Caller: CRM_ACL_API::groupPermission Array ( [civi.tag] => deprecated )Overview
----------------------------------------
When a user logs in, CiviCRM creates two warnings in the dblog:
```
pass an array for included groups Caller: CRM_ACL_API::groupPermission Array ( [civi.tag] => deprecated )
```
This ap...Overview
----------------------------------------
When a user logs in, CiviCRM creates two warnings in the dblog:
```
pass an array for included groups Caller: CRM_ACL_API::groupPermission Array ( [civi.tag] => deprecated )
```
This appears to be because of an inconsistency in file CRM/ACL/API/php, as follows (starting at line 133):
```
/**
* Get all the groups the user has access to for the given operation.
*
* @param int $type
* The type of permission needed.
* @param int|null $contactID
* The contactID for whom the check is made.
*
* @param string $tableName
* @param array|null $allGroups
* @param array $includedGroups
*
* @return array
* the ids of the groups for which the user has permissions
*/
public static function group(
$type,
$contactID = NULL,
$tableName = 'civicrm_saved_search',
$allGroups = NULL,
$includedGroups = []
) {
if (!is_array($includedGroups)) {
CRM_Core_Error::deprecatedWarning('pass an array for included groups');
$includedGroups = (array) $includedGroups;
}
if ($contactID == NULL) {
$contactID = CRM_Core_Session::getLoggedInContactID();
}
return CRM_ACL_BAO_ACL::group($type, (int) $contactID, $tableName, $allGroups, $includedGroups);
}
/**
* Check if the user has access to this group for operation $type
*
* @param int $type
* The type of permission needed.
* @param int $groupID
* @param int|null $contactID
* The contactID for whom the check is made.
* @param string $tableName
* @param array|null $allGroups
* @param array|null $includedGroups
*
* @return bool
*/
public static function groupPermission(
$type,
$groupID,
$contactID = NULL,
$tableName = 'civicrm_saved_search',
$allGroups = NULL,
$includedGroups = NULL
) {
if (!isset(Civi::$statics[__CLASS__]) || !isset(Civi::$statics[__CLASS__]['group_permission'])) {
Civi::$statics[__CLASS__]['group_permission'] = [];
}
if (!$contactID) {
$contactID = CRM_Core_Session::getLoggedInContactID();
}
$key = "{$tableName}_{$type}_{$contactID}";
if (!array_key_exists($key, Civi::$statics[__CLASS__]['group_permission'])) {
Civi::$statics[__CLASS__]['group_permission'][$key] = self::group($type, $contactID, $tableName, $allGroups, $includedGroups);
}
return in_array($groupID, Civi::$statics[__CLASS__]['group_permission'][$key]);
}
```
The error is posted if $includedGroups is not an array in function `group()` (first function). But in function `groupPermission()`, $includedGroups` has a default value of NULL, so if that value isn't explictly passed in, the NULL is passed to `group()`, which expects an array, and thus the error happens.
Changing the default value in `groupPermission()` to
```
$includedGroups = []
```
to match `group()` eliminates the warning. Don't know if that has any other side effects, though.
Environment information
----------------------------------------
* __Browser:__ Safari or Chrome on Mac
* __CiviCRM:__ 5.60.0
* __PHP:__ _7.0/7.1/7.2/7.3/...__
* __CMS:__ Backdrop 1.24.0https://lab.civicrm.org/dev/backdrop/-/issues/79civicrm_backdrop.css hard-codes the location of the civicrm module2023-11-18T18:12:45ZRobert J. Langcivicrm_backdrop.css hard-codes the location of the civicrm moduleThe file `civicrm_backdrop.css` hard-codes the location of the CiviCRM module in this line:
```
#crm-container .ui-widget-header .ui-state-default {
background: #e6e6e6 url(/modules/civicrm/bower_components/jquery-ui/themes/smoothness...The file `civicrm_backdrop.css` hard-codes the location of the CiviCRM module in this line:
```
#crm-container .ui-widget-header .ui-state-default {
background: #e6e6e6 url(/modules/civicrm/bower_components/jquery-ui/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
}
```
If the CiviCRM module is located anywhere else (for example, at `modules/contrib/civicrm`), this puts missing-file errors into the dblog whenever one visits the CiviCRM dashboard.
There is a global variable, `$civicrm_root`, which specifies the location of the module. That should be used. (Perhaps use `backdrop_add_css()` to dynamically add this bit?)https://lab.civicrm.org/dev/core/-/issues/4239"Add to Contact Summary Page" cannot be turned off2023-04-18T17:52:03ZBobS"Add to Contact Summary Page" cannot be turned offOverview
----------------------------------------
After enabling the "Add to Contact Summary Page" option and then disabling it, the form remains visible on contact records.
Reproduction steps
----------------------------------------
1....Overview
----------------------------------------
After enabling the "Add to Contact Summary Page" option and then disabling it, the form remains visible on contact records.
Reproduction steps
----------------------------------------
1. Administer | Custom Data and Screens | Formbuilder | Search Forms
1. Edit one of the listed forms, e.g. Administer Payment Processors.
1. Select "Add to Contact Summary Page"
1. Save
1. Open a contact record and observe that the Administer Payment Processors form is visible on the Summary page.
1. Return to editing the form, and deselect "Add to Contact Summary Page"
1. Save
1. Refresh the contact Summary page page.
Current behaviour
----------------------------------------
The form remains displayed on contact Summary pages, even after "Add to Contact Summary Page" has been unselected.
Expected behaviour
----------------------------------------
The form should not be displayed on Contact records after "Add to Contact Summary Page" has been unselected.
Environment information
----------------------------------------
https://dmaster.demo.civicrm.org (5.62.alpha1)https://lab.civicrm.org/dev/core/-/issues/4238(Regression) - Users are unable to register via /user/register forms anymore2023-04-14T23:36:12ZPradeep Nayakpradpnayak@gmail.com(Regression) - Users are unable to register via /user/register forms anymoreIf the user registration profile has a checkbox custom field then the system throws error with ```'' is not a valid option for field custom_118```
Steps to replicate
1. Add checkbox custom field(with atleast 3 options) of extending Cont...If the user registration profile has a checkbox custom field then the system throws error with ```'' is not a valid option for field custom_118```
Steps to replicate
1. Add checkbox custom field(with atleast 3 options) of extending Contact and include it in a profile
2. Set the profile to use for user registration
3. visit /user/register page, enter the details, check the boxes(leave one unchecked). Submit the form
Expected result:
User account should be created and Information should be saved in Civi
Actual result:
Error with a message in watchdog
```CRM_Core_Exception: '' is not a valid option for field custom_118 in civicrm_api3() (line 135 of /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/api/api.php).```
---------------------------------------------------------------------------------------------------
Bactrace:
````
Apr 14 13:34:56 [debug] $$apiResponse = #0 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/api/v3/utils.php(2421): CRM_Core_Error::backtrace("$apiResponse", 1)
#1 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/api/v3/utils.php(2349): _civicrm_api3_api_match_pseudoconstant_value("", (Array:4), "custom_118", NULL)
#2 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/api/v3/utils.php(2281): _civicrm_api3_api_match_pseudoconstant((Array:4), "Contact", "custom_118", (Array:31), NULL)
#3 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/api/v3/utils.php(1633): _civicrm_api3_validate_string((Array:22), "custom_118", (Array:31), "Contact", "create")
#4 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/Civi/API/Subscriber/APIv3SchemaAdapter.php(76): _civicrm_api3_validate_fields("Contact", "create", (Array:22), (Array:5))
#5 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(264): Civi\API\Subscriber\APIv3SchemaAdapter->onApiPrepare_validate(Object(Civi\API\Event\PrepareEvent), "civi.api.prepare", Object(Civi\Core\CiviEventDispatcher))
#6 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch((Array:9), "civi.api.prepare", Object(Civi\API\Event\PrepareEvent))
#7 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners((Array:9), "civi.api.prepare", Object(Civi\API\Event\PrepareEvent))
#8 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(217): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Civi\API\Event\PrepareEvent), Object(Civi\API\Event\PrepareEvent))
#9 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/Civi/API/Kernel.php(240): Civi\Core\CiviEventDispatcher->dispatch("civi.api.prepare", Object(Civi\API\Event\PrepareEvent))
#10 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/Civi/API/Kernel.php(148): Civi\API\Kernel->prepare(Object(Civi\API\Provider\MagicFunctionProvider), (Array:8))
#11 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest((Array:8))
#12 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/api/api.php(133): Civi\API\Kernel->runSafe("Contact", "create", (Array:21))
#13 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/CRM/Core/BAO/UFMatch.php(278): civicrm_api3("Contact", "create", (Array:21))
#14 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/CRM/Core/BAO/UFMatch.php(104): CRM_Core_BAO_UFMatch::synchronizeUFMatch(Object(stdClass), "21", "pradeep+ytrt@circle-interactive.co.ukddd", "Drupal", NULL, "Individual", FALSE)
#15 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/drupal/civicrm.module(547): CRM_Core_BAO_UFMatch::synchronize(Object(stdClass), TRUE, "Drupal", "Individual")
#16 /Library/WebServer/Documents/drupal7/sites/all/modules/civicrm/drupal/civicrm_user.inc(70): civicrm_register_data((Array:24), Object(stdClass), "account", FALSE)
#17 /Library/WebServer/Documents/drupal7/modules/user/user.module(101): civicrm_user_insert((Array:24), Object(stdClass), "account")
#18 /Library/WebServer/Documents/drupal7/modules/user/user.module(596): user_module_invoke("insert", (Array:24), Object(stdClass), "account")
#19 /Library/WebServer/Documents/drupal7/modules/user/user.module(3945): user_save(Object(stdClass), (Array:24))
#20 /Library/WebServer/Documents/drupal7/includes/form.inc(1531): user_register_submit((Array:36), (Array:21))
#21 /Library/WebServer/Documents/drupal7/includes/form.inc(906): form_execute_handlers("submit", (Array:36), (Array:21))
#22 /Library/WebServer/Documents/drupal7/includes/form.inc(386): drupal_process_form("user_register_form", (Array:36), (Array:21))
#23 /Library/WebServer/Documents/drupal7/includes/form.inc(131): drupal_build_form("user_register_form", (Array:21))
#24 /Library/WebServer/Documents/drupal7/includes/menu.inc(527): drupal_get_form("user_register_form")
#25 /Library/WebServer/Documents/drupal7/index.php(21): menu_execute_active_handler()
````
Api params passed
````
Array
(
[name] => testssddd
[mail] => pradeep+ytrt@test.com
[timezone] => Europe/London
[form_build_id] => form-itTfOP_PU7O_GmrjvPKtXXypybV7isjhUspFtqRfeS0
[form_id] => user_register_form
[MAX_FILE_SIZE] => 2097152
[edit] => Array
(
[civicrm_dummy_field] => CiviCRM Dummy Field for Drupal
)
[gid] =>
[first_name] => Pradeep
[last_name] => Nayak
[street_address-1] =>
[city-1] =>
[postal_code-1] =>
[country-1] =>
[state_province-1] =>
[custom_118] => Array
(
[1] =>
[2] => 1
[3] => 1
[4] =>
)
[op] => Create new account
[_qf_default] => Dynamic:upload
[email] => pradeep+ytrt@test.com
[contact_type] => Individual
[version] => 3
)
````https://lab.civicrm.org/dev/core/-/issues/4236On Dmaster neither the New nor the Renew text is showing on the Contribution ...2023-05-19T00:11:38ZpetednzOn Dmaster neither the New nor the Renew text is showing on the Contribution pageOverview
----------------------------------------
_Please describe your problem or bug in detail._
_If you have already posted on https://civicrm.stackexchange.com or https://chat.civicrm.org, please include the link to that conversatio...Overview
----------------------------------------
_Please describe your problem or bug in detail._
_If you have already posted on https://civicrm.stackexchange.com or https://chat.civicrm.org, please include the link to that conversation._
Reproduction steps
----------------------------------------
1. Visit https://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=2
1. Expect to see the text for New Members, or Renew Members from https://dmaster.demo.civicrm.org/civicrm/admin/contribute/membership?reset=1&action=update&id=2.
1. See neither pieces of text.
Current behaviour
----------------------------------------
_What happens currently. Please provide error messages, screenshots or gifs ([LICEcap](http://www.cockos.com/licecap/), [SilentCast](https://github.com/colinkeenan/silentcast)) where appropriate._
```
TIP: The best way to convey an error message is to copy it in here and use
three backtick ` symbols. You may edit the message to remove private
information (like passwords). The backticks will help to preserve any
special characters or spaces.
```
Expected behaviour
----------------------------------------
The text showing should show on the Contribution page, and should show the New Membership Title/Message if the user has no membership or show the Renewals Title/Message if the user can be identified as an existing member
Environment information
----------------------------------------
https://dmaster.demo.civicrm.org
Comments
----------------------------------------
Spotted this when trying to check something on dmaster in order to help someone on SE but am not seeing behaviour I expected. I was checking behaviour of the New v Renew Membership info that should show on the Contribution page, ie via https://dmaster.demo.civicrm.org/civicrm/admin/contribute/custom?action=update&reset=1&id=2&selectedChild=membership, but on the Contribution page I see neither the New nor the Renew text.https://lab.civicrm.org/dev/core/-/issues/4233List page broken2023-04-20T09:32:30ZBastien HoList page brokenOn one of my installation, the SearchKit list page looks like that:
![image](/uploads/29351efe0bf8c52fc50df13a56ecd612/image.png)
The console says:
```
Error: [$injector:unpr] Unknown provider: savedSearchesProvider <- savedSearches <...On one of my installation, the SearchKit list page looks like that:
![image](/uploads/29351efe0bf8c52fc50df13a56ecd612/image.png)
The console says:
```
Error: [$injector:unpr] Unknown provider: savedSearchesProvider <- savedSearches <- searchList
https://errors.angularjs.org/1.8.2/$injector/unpr?p0=savedSearchesProvider%20%3C-%20savedSearches%20%3C-%20searchList
Angular 39
jQuery 2
<anonymous> Angular
jQuery 7
<anonymous> Common.js:1606
jQuery 8
<div ng-view="" class="ng-scope">
```
I've opened a question on Stackexchange:
https://civicrm.stackexchange.com/questions/44786/search-kit-broken-and-templates-not-parsed
Environment information
----------------------------------------
* __Browser:__ _Firefox 111.0.1_
* __CiviCRM:__ _..., 5.57.0, 5.58.0, 5.60.0_
* __PHP:__ _7.4.33 __
* __CMS:__ _WordPress 6.1, WordPress 6.2_
* __Database:__ _10.5.18-MariaDB-0+deb11u1_
* __Web Server:__ _Apache/2.4.54 (Debian)_https://lab.civicrm.org/dev/core/-/issues/4229Cannot edit and save EntityRef custom fields2024-01-12T15:48:38ZbrienneCannot edit and save EntityRef custom fieldsOverview
----------------------------------------
In testing [PR 25927](https://github.com/civicrm/civicrm-core/pull/25927), I ran into a bug when trying to edit an EntityRef custom field, which then prevents saving those changes.
Repro...Overview
----------------------------------------
In testing [PR 25927](https://github.com/civicrm/civicrm-core/pull/25927), I ran into a bug when trying to edit an EntityRef custom field, which then prevents saving those changes.
Reproduction steps
----------------------------------------
1. Create a custom field of type *EntityRef* with any entity.
1. Click **Edit Field**.
1. Click **Save**, with or without making changes, on the pop up editor.
1. The field is not saved and instead the user is told 'Selecting an entity is required'.
Current behaviour
----------------------------------------
A user cannot edit an EntityRef custom field becuase CiviCRM thinks that an entity is not selected, even though it already has been. A user also cannot select the field to try to 're-select' the chosen entity.
![Selection_069](/uploads/1cb884e4b1210c5a4e0bb3a4e1665e44/Selection_069.png)
Expected behaviour
----------------------------------------
A user should be able to edit and save an EntityRef custom field, i.e. CiviCRM should recognize that an entity has been selected.
Environment information
----------------------------------------
* **CiviCRM:** 5.61.alpha1, \_Master/5.62.alpha1https://lab.civicrm.org/dev/core/-/issues/4228EntityRef to Contact throws fatal error2023-04-11T16:56:48ZbrienneEntityRef to Contact throws fatal errorOverview
----------------------------------------
In testing [PR 25927](https://github.com/civicrm/civicrm-core/pull/25927), I ran into an error specially when the Entity being referenced is *Contact*. While you can create the custom fie...Overview
----------------------------------------
In testing [PR 25927](https://github.com/civicrm/civicrm-core/pull/25927), I ran into an error specially when the Entity being referenced is *Contact*. While you can create the custom field, when you try to add a value to that EntityRef, say on a Contribution, and submit it, a fatal error is thrown.
Reproduction steps
----------------------------------------
*Note that I'm using a custom group to be used on Contributions*
1. Create a custom field of type *EntityRef* and select *Contact* as the Entity
1. Click **Contributions > New Contribution**
1. Fill out the Contribution required fields, and select a Contact for the EntityRef custom field
1. Click **Save**
1. Got an error: "**One of parameters (value: ) is not of the type Integer**".
Current behaviour
----------------------------------------
A user cannot actually use a created EntityRef custom field if the entity being referenced is a Contact.
Note that this behavior does not happen with other entities, such as Event or Activity
Expected behaviour
----------------------------------------
A user should be able to used EntityRef custom field to a Contact without a fatal error.
Environment information
----------------------------------------
* __CiviCRM:__ _Master/5.61.alpha1
Comments
----------------------------------------
Error details and backtrace from the ConfigAndLog file
```
$Fatal Error Details = array:3 [
"message" => "One of parameters (value: ) is not of the type Integer"
"code" => null
"exception" => CRM_Core_Exception {#1848
-errorData: array:1 [
"error_code" => 0
]
#cause: null
-_trace: null
#message: "One of parameters (value: ) is not of the type Integer"
#code: 0
#file: "/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Utils/Type.php"
#line: 471
trace: {
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Utils/Type.php:471 {
› $data = htmlentities($data ?? 'NULL');
› throw new CRM_Core_Exception("$name (value: $data) is not of the type $type");
› }
}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/DAO.php:1763 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/DAO.php:1643 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/BAO/CustomValueTable.php:275 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/BAO/CustomValueTable.php:403 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php:233 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution.php:481 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php:1792 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution.php:976 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Form.php:578 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:153 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php:120 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Controller.php:355 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php:409 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Contribute/Page/Tab.php:463 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:319 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:69 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/CRM/Core/Invoke.php:36 { …}
/buildkit/build/dmain/web/sites/all/modules/civicrm/drupal/civicrm.module:471 { …}
/buildkit/build/dmain/web/includes/menu.inc:527 { …}
/buildkit/build/dmain/web/index.php:21 { …}
}
}
]
```https://lab.civicrm.org/dev/core/-/issues/4225Regression in 5.61rc - if CiviMember is not enabled then creating a relations...2023-05-03T23:58:45ZeileenRegression in 5.61rc - if CiviMember is not enabled then creating a relationship causes an erro@mattwire the switch to apiv4 is causing an authorization error - we can probably by pass the whole membership code if CiviMember disabled@mattwire the switch to apiv4 is causing an authorization error - we can probably by pass the whole membership code if CiviMember disabledhttps://lab.civicrm.org/dev/core/-/issues/4211Afform: civi.afform.prefill never called within custom extension with Case2023-04-05T14:38:41ZshaneonabikeAfform: civi.afform.prefill never called within custom extension with CaseOverview
----------------------------------------
The population of two custom fields via ```civi.afform.prefill``` when a FormBuilder is rendered is not working properly. Technically, from my discussion on [Mattermost](https://chat.civ...Overview
----------------------------------------
The population of two custom fields via ```civi.afform.prefill``` when a FormBuilder is rendered is not working properly. Technically, from my discussion on [Mattermost](https://chat.civicrm.org/civicrm/pl/e5c17zxjxfyhxm3cynxtqf8chr) prefill should be called prior to field rendering.
Basically, we are attempting to create a Form that uses CiviCase to be able to allow members to request to change their membership type. The two custom fields that should be modified (on the fly are)
+ Current Membership (to store the existing membership)
+ Choose a Membership Type (a limited set of memberships that a person can change too)
Reproduction steps
----------------------------------------
1. Create a Custom Data Field set _used for_ Cases
1. Create a field _Current Membership_ with a DataType Alphanumeric Radio
1. Create a field _Choose a Membership Type_ with a DataType Integer Radio
![Selection_007](/uploads/7c1ec6e9d4379e5ed9d75413b0bcc82d/Selection_007.png)
1. Create a FormBuilder linked to a Case
1. Set _Case Clients_ to Current User
1. Set _Case Type_ to your new Case Type
1. Create a custom extension and add the code below
1. Enable extension
1. No fields are modified
### Custom code
```php
/**
* Implements hook_civicrm_config().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
*/
function myext_civicrm_config(&$config) {
_myext_civix_civicrm_config($config);
$dispatcher = Civi::dispatcher();
// Add FormBuilder Prefill
$dispatcher->addListener('civi.afform.prefill', 'myext_afform_prefill', 99);
}
``` php
/**
* Implements AfformPrefillEvent
* @link https://docs.civicrm.org/dev/en/latest/afform/afform-events/
*/
function myext_afform_prefill($event) {
Civi::log()->warning('Event here');
$form = $event->getAfform();
Civi::log()->warning('Form : '.var_export($form,true));
if ($form['name'] == 'abc') {
$entity_values = $event->getEntityValues();
Civi::log()->warning('Values : '.var_export($entity_values,true));
}
}
```
### Afform Markup
```html
<af-form ctrl="afform">
<af-entity data="{contact_id: ['user_contact_id'], case_type_id: '4', status_id: '4', subject: 'Request Form - Change Membership Type'}" actions="{create: true, update: false}" type="Case" name="Case1" label="Case 1" security="FBAC" />
<div class="af-markup">
</div>
<fieldset af-fieldset="Case1" class="af-container">
<af-field name="Request_Membership_Change.Current_Membership" defn="{label: 'Your Current Membership', required: true}" />
<af-field name="Request_Membership_Change.Choose_a_Membership_Type" defn="{label: 'Choose a New Membership Type', required: true}" />
<af-field name="Request_Membership_Change.Documentation" defn="{label: 'Supporting Documentation'}" />
<button class="af-button btn btn-primary" crm-icon="fa-check" ng-click="afform.submit()">Submit Request</button>
</fieldset>
</af-form>
```
Current behaviour
----------------------------------------
The ```civi.afform.prefill``` event never seems to be launched. I can confirm that it is being launched on the Validate hook so it should also work for prefill.
Expected behaviour
----------------------------------------
When loading the form the ```_prefill``` hook Event would be launched and we could modify the custom fields like we can with ```hook_civicrm_fieldOptions```
Environment information
----------------------------------------
* __CiviCRM:__ 5.60
* __CMS:__ Drupal 7
Comments
----------------------------------------
I wouldn't mind helping to debug this issue and/or provide a merge request. I would just need further pointers. When I tried to add logs in the actual afform prefill event creation there were no logs output. I could be doing something wrong but I have the impression it's not getting fired.
My gutt says it's because this is only presently setup for Autocomplete fields like Contacts Select list, but I could be totally off.