Development issueshttps://lab.civicrm.org/groups/dev/-/issues2018-04-28T07:22:36Zhttps://lab.civicrm.org/dev/core/-/issues/84Error when searching for Participants2018-04-28T07:22:36ZPradeep Nayakpradpnayak@gmail.comError when searching for Participantshttps://civicrm.stackexchange.com/questions/24671/error-when-searching-for-participants
It seems that there is regression because of https://github.com/civicrm/civicrm-core/pull/11706
Commenting line 4912(self::getGroupByFromOrderBy($g...https://civicrm.stackexchange.com/questions/24671/error-when-searching-for-participants
It seems that there is regression because of https://github.com/civicrm/civicrm-core/pull/11706
Commenting line 4912(self::getGroupByFromOrderBy($groupBy, $orderBys);) in CRM/Contact/BAO/Query.php seems to fix the issue.https://lab.civicrm.org/dev/core/-/issues/83Related Contacts in Advanced Search2018-04-29T12:11:16ZjrolfsRelated Contacts in Advanced SearchWhen running an Advanced Search and displaying the results as Related Contacts, there was once another dropdown box that showed up that allowed you to select the type of relationship that you wanted to see. That additional dropdown box ...When running an Advanced Search and displaying the results as Related Contacts, there was once another dropdown box that showed up that allowed you to select the type of relationship that you wanted to see. That additional dropdown box is no longer there.
![Related_Contacts_in_Advanced_Search](/uploads/997a28922c4fa511cfbcab647f5789c8/Related_Contacts_in_Advanced_Search.jpg)jitendrajitendrahttps://lab.civicrm.org/dev/core/-/issues/64In custom searches, column headings are being ignored2019-01-09T20:18:51ZkirkatcaatIn custom searches, column headings are being ignoredFor custom searches - ones that come installed with core CiviCRM *as well* as user-defined ones - the column headings defined in the custom search code are being ignored. This issue affects CiviCRM 5.0.0.
Each custom search is implement...For custom searches - ones that come installed with core CiviCRM *as well* as user-defined ones - the column headings defined in the custom search code are being ignored. This issue affects CiviCRM 5.0.0.
Each custom search is implemented by a class that extends CRM_Contact_Form_Search_Custom_Base and implements CRM_Contact_Form_Search_Interface. The columns displayed for search results are defined by either $this->_columns or the columns() method. The keys of this array should set the column headings, but they are being ignored.
When the search results are displayed, the specified headings are not used. Instead, some columns are given default headings and others are missing headings. This means that the results can't be sorted on those columns.
To reproduce this bug, click **Search ⇒ Custom Searches**, then pick a contact search, e.g. "Basic Search", "Include / Exclude Search" or "Postal Mailing", enter search criteria that will select some contacts, and then click Search. In the results you'll see that the column headings do not match the ones defined in the custom search class, and some columns (e.g. street address, phone number, contact type, etc) have no headings at all.jitendrajitendrahttps://lab.civicrm.org/dev/core/-/issues/60"Check number" isn't shown on Pay Later event registrations when edited2023-09-06T16:08:21Zlaryn"Check number" isn't shown on Pay Later event registrations when editedThis happens to me with an event registration that comes through 'webform_civicrm' as a "Pending (Pay Later)". When I try to edit the participant record to record a payment, the "Check Number" field never shows up despite "Check" being s...This happens to me with an event registration that comes through 'webform_civicrm' as a "Pending (Pay Later)". When I try to edit the participant record to record a payment, the "Check Number" field never shows up despite "Check" being selected as the payment instrument.
**I was able to reproduce on a demo server by doing the following**:
* Create a registration, marking it as "Pending (Pay Later)" and unchecking "Record Payment"
* Edit the new participant you just created, check "Record Payment" and make sure "Check" is selected as the payment instrument.
No "Check Number" field is shown.
![Screen_Shot_2018-04-11_at_3.52.02_PM](/uploads/02f92e016aa97074be80d410ca596db1/Screen_Shot_2018-04-11_at_3.52.02_PM.jpg)5.2.0eileeneileenhttps://lab.civicrm.org/dev/core/-/issues/42On multilingual mode, choosing mailing group doesn't affect recipient count a...2018-03-31T09:48:01ZMonish DebOn multilingual mode, choosing mailing group doesn't affect recipient count and list## Steps to reproduce
1. Enable multilingual mode
2. Go to `Mailing => New Mailing`
3. Choose one or more mailing group.
__Observe__: The recipient count doesn't affect
## Context
This appears to be a regression in 4.7.31. Related...## Steps to reproduce
1. Enable multilingual mode
2. Go to `Mailing => New Mailing`
3. Choose one or more mailing group.
__Observe__: The recipient count doesn't affect
## Context
This appears to be a regression in 4.7.31. Related PRs:
* https://issues.civicrm.org/jira/browse/CRM-21260
* https://issues.civicrm.org/jira/browse/CRM-21316
* https://issues.civicrm.org/jira/browse/CRM-21749
* https://github.com/civicrm/civicrm-core/pull/11142/
* https://github.com/civicrm/civicrm-core/pull/11653/5.0.0Monish DebMonish Debhttps://lab.civicrm.org/dev/core/-/issues/5116Scheduled Reminders: with multi-lingual, the language filters are empty2024-03-28T21:51:08ZbgmScheduled Reminders: with multi-lingual, the language filters are emptyTo reproduce:
- Enable multi-lingual from Administer > Localization > Languages, the checkbox at the bottom of the screen
- Then go to Administer > Communications > Scheduled Reminders
- Add a new Reminder
Ignore everything, scroll dow...To reproduce:
- Enable multi-lingual from Administer > Localization > Languages, the checkbox at the bottom of the screen
- Then go to Administer > Communications > Scheduled Reminders
- Add a new Reminder
Ignore everything, scroll down to the "Recipients language", and notice that the list is empty:
![image](/uploads/1f83b3ccfd0c755f0609509c4172594a/image.png)
The regression was caused by: https://github.com/civicrm/civicrm-core/commit/de00a2b14f60a7f6fef59b5b3331c17fc1e3e061 - part of CiviCRM 5.66 (Symbiotic was on 5.65 and didn't see this until 5.70).
I don't know what's the best way of fixing it:
- The DAO correctly defines the callback for the `filter_contact_language` field
- QuickForm uses `addField()` to add the field using metadata
- `addField()` calls `ActionSchedule.getfields`, which fetches the metadata from the DAO
- `civicrm_api3_generic_getfields()` has code like this:
```
if (function_exists($helper)) {
// alter
$helper($metadata, $apiRequest);
}
```
which basically calls `_civicrm_api3_action_schedule_create_spec()`, and that then NULLs the callbacks, so the options are hidden in the UI.
@colemanw Any thoughts?
Bug found by @mmyriamcolemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/5115a11y errors2024-03-28T20:43:12ZJoeMurraya11y errorsRunning a very vanilla setup we get the following accessibility errors (D10.2.3 / Civi 5.70.2 site, Finsbury Park theme enabled and Backend theme set to Finsbury Park and Aah disabled/alternating with Finsbury Park theme disabled and Aah...Running a very vanilla setup we get the following accessibility errors (D10.2.3 / Civi 5.70.2 site, Finsbury Park theme enabled and Backend theme set to Finsbury Park and Aah disabled/alternating with Finsbury Park theme disabled and Aah enabled and Backend theme set to Aah, Frontend Theme to Automatic. Using WAVE Web Accessibility Evaluation Tool 3.2.5.3 in Chrome browser 123.0.6312.86 on macOS Sonoma 14.4.1).
CiviCRM Home Page Errors:
- [ ] Missing form label on the QuickSearch element (Finsbury Park, Aah)
`<input type="text" id="crm-qsearch-input" name="sort_name" placeholder=" Name/Email" accesskey="q" class="ui-autocomplete-input" autocomplete="off">`
- [ ] Missing form label on Find menu item... (Finsbury Park, Aah)
`<input type="text" id="crm-menubar-drilldown" placeholder="Find menu item...">`
- [ ] Empty link (Finsbury Park, Aah)
```
<a href="#" class="has-submenu" id="sm-17116551805997053-1" aria-haspopup="true" aria-controls="sm-17116551805997053-2" aria-expanded="false">
<form action="/civicrm/contact/search/advanced" name="search_block" method="post">
<div>
AccesskeyMissing form label
<input type="text" id="crm-qsearch-input" name="sort_name" placeholder=" Name/Email" accesskey="q" class="ui-autocomplete-input" autocomplete="off">
<input type="hidden" name="hidden_location" value="1">
<input type="hidden" name="hidden_custom" value="1">
<input type="hidden" name="qfKey" value="CRMContactControllerSearch1nrj4735k2cgk8kgcos44c4800cwc800o8gk00w8so0gko004s_8998">
<input type="hidden" name="_qf_Advanced_refresh" value="Search">
</div>
</form>
<span class="sub-arrow"></span>
</a>
```
- [ ] Empty link (Finsbury Park, Aah)
```
<a accesskey="m" href="#" class="has-submenu" id="sm-17116551805997053-3" aria-haspopup="true" aria-controls="sm-17116551805997053-4" aria-expanded="false">
<i class="crm-logo-sm"></i>
<span class="sub-arrow"></span>
</a>
```
- [ ] Empty link (Finsbury Park, Aah)
```
<a href="#" class="has-submenu" id="sm-17116551805997053-5" aria-haspopup="true" aria-controls="sm-17116551805997053-6" aria-expanded="false">
Missing form label
<input type="text" id="crm-menubar-drilldown" placeholder="Find menu item...">
<span class="sub-arrow"></span>
</a>
```
- [ ] Very low contrast (Aah)
```
<button class="trigger visually-hidden focusable" type="button" aria-pressed="false">
Open configuration options
</button>
```
- [ ] Very low contrast (Finsbury Park, Aah)
```
<label class="crm-menubar-toggle-btn" for="crm-menubar-state">
<span class="crm-menu-logo"></span>
<span class="crm-menubar-toggle-btn-icon"></span>
Toggle main menu
</label>
```
- [ ] Very low contrast (Finsbury Park, Aah)
```
<div id="drupal-live-announce" class="visually-hidden" aria-live="polite" aria-busy="false">
Tray opened.
</div>
```
Simple Search (Search > Find Contacts) Errors not present above:
- [ ] Missing form label
```
<select placeholder="- any group -" multiple="multiple" class="big big crm-select2 crm-form-multiselect" name="group[]" id="group" tabindex="-1" style="display: none;">
<option value="1">
My site group 1
</option>
<option value="2">
My site group 2
</option>
</select>
```
- [ ] Empty form label (see next task for Empty link that contains this)
`<label for="s2id_autogen2" class="select2-offscreen"></label>`
- [ ] Empty link
```
<a href="#" class="has-submenu" id="sm-17116579339791917-1" aria-haspopup="true" aria-controls="sm-17116579339791917-2" aria-expanded="false">
<form action="/civicrm/contact/search/advanced" name="search_block" method="post">
<div>
<input type="text" id="crm-qsearch-input" name="sort_name" placeholder=" Name/Email" accesskey="q" class="ui-autocomplete-input" autocomplete="off">
<input type="hidden" name="hidden_location" value="1">
<input type="hidden" name="hidden_custom" value="1">
<input type="hidden" name="qfKey" value="CRMContactControllerSearch1nrj4735k2cgk8kgcos44c4800cwc800o8gk00w8so0gko004s_4570">
<input type="hidden" name="_qf_Advanced_refresh" value="Search">
</div>
</form>
<span class="sub-arrow"></span>
</a>
```
- [ ] Empty link
```
<a accesskey="m" href="#" class="has-submenu" id="sm-17116579339791917-3" aria-haspopup="true" aria-controls="sm-17116579339791917-4" aria-expanded="false">
<i class="crm-logo-sm"></i>
<span class="sub-arrow"></span>
</a>
```
- [ ] Empty link
```
<a href="#" class="has-submenu" id="sm-17116579339791917-5" aria-haspopup="true" aria-controls="sm-17116579339791917-6" aria-expanded="false">
<input type="text" id="crm-menubar-drilldown" placeholder="Find menu item...">
<span class="sub-arrow"></span>
</a>
```
- [ ] Very low contrast
```
<span class="select2-chosen" id="select2-chosen-1">
- any contact type -
</span>
```
- [ ] Very low contrast
```
<button class="crm-form-submit default validate crm-button crm-button-type-refresh crm-button_qf_Basic_refresh" value="1" type="submit" name="_qf_Basic_refresh" id="_qf_Basic_refresh-bottom">
<i aria-hidden="true" class="crm-i fa-check"></i>
Search
</button>
```Monish DebMonish Deb2024-03-29https://lab.civicrm.org/dev/core/-/issues/5114Managed domain-aware entities with multisite configuration2024-03-28T12:37:16ZJKingsnorthManaged domain-aware entities with multisite configurationWe've come across an edge-case in a multi-site setup.
In our setup, we have a master domain which does not have 'Enable Multi Site Configuration' enabled. And subdomains which do.
This is allowed configuration according to the docs: ht...We've come across an edge-case in a multi-site setup.
In our setup, we have a master domain which does not have 'Enable Multi Site Configuration' enabled. And subdomains which do.
This is allowed configuration according to the docs: https://docs.civicrm.org/installation/en/latest/multisite/drupal/#:~:text=It%20is%20not,or%20website%20administrators.
We also have a managed 'job' entity (provided by https://lab.civicrm.org/extensions/mjwshared/-/blob/master/managed/ProcessPaymentprocessorWebhooks.mgd.php?ref_type=heads)
The managed entity is set to 'always' update.
---
1) We run Managed->Reconcile on domain ID 1 (multisite not enabled)
- The job row is created
- An entry in civicrm_managed is created
```
# id, module, name, entity_type, entity_id, cleanup, entity_modified_date
'1796', 'mjwshared', 'ProcessPaymentProcessorWebhooks', 'Job', '116', 'always', NULL
```
- The job in civicrm_job is created
```
# id, domain_id, run_frequency, last_run, scheduled_run_date, name, description, api_entity, api_action, parameters, is_active
'116', '1', 'Always', NULL, NULL, 'Process PaymentProcessor Webhooks', 'Process incomplete payment processor webhooks', 'Job', 'process_paymentprocessor_webhooks', 'delete_old=-3 month', '1'
```
2) Managed->Reconcile run on domain ID 43 (multisite enabled)
- The entries in civicrm_managed are converted into 'domain-aware' entries:
```
# id, module, name, entity_type, entity_id, cleanup, entity_modified_date
'1803', 'mjwshared', 'ProcessPaymentProcessorWebhooks_32', 'Job', '116', 'always', NULL
'1804', 'mjwshared', 'ProcessPaymentProcessorWebhooks_42', 'Job', '116', 'always', NULL
'1805', 'mjwshared', 'ProcessPaymentProcessorWebhooks_43', 'Job', '116', 'always', NULL
```
- The job in civicrm_job is 'moved' to another domain:
```
# id, domain_id, run_frequency, last_run, scheduled_run_date, name, description, api_entity, api_action, parameters, is_active
'116', '43', 'Always', NULL, NULL, 'Process PaymentProcessor Webhooks', 'Process incomplete payment processor webhooks', 'Job', 'process_paymentprocessor_webhooks', 'delete_old=-3 month', '1'
```
3) Managed->Reconcile run on domain ID 1 again (not multisite enabled)
- The entry in civicrm_job has been deleted - no more essential scheduled job!
- The entry in civicrm_managed changes back to not domain aware, and references a deleted row
```
# id, module, name, entity_type, entity_id, cleanup, entity_modified_date
'1796', 'mjwshared', 'ProcessPaymentProcessorWebhooks', 'Job', '116', 'always', NULL
```
---
So we need to either:
- Update the docs to say that the 'master' domain _does_ need to be multisite aware
- Update the handling of domain-aware managed entities to work correctly when reconciled in either domainhttps://lab.civicrm.org/dev/core/-/issues/5113Change Start Date link broken on open case activity edit2024-03-28T00:59:58ZDaveDChange Start Date link broken on open case activity editThere's a warning Undefined array key "changeStartURL" and clicking the link just reloads the page.There's a warning Undefined array key "changeStartURL" and clicking the link just reloads the page.https://lab.civicrm.org/dev/core/-/issues/5111PHP8.1 Deprecated function: fseek():2024-03-26T21:44:23ZbobisHDPHP8.1 Deprecated function: fseek():Overview
----------------------------------------
On php8.1 the below error will appear:
```Deprecated function: fseek(): Passing null to parameter #2 ($offset) of type int is deprecated in FileReader->seekto() (line 125 of /opt/bitnam...Overview
----------------------------------------
On php8.1 the below error will appear:
```Deprecated function: fseek(): Passing null to parameter #2 ($offset) of type int is deprecated in FileReader->seekto() (line 125 of /opt/bitnami/apps/civicrm/htdocs/sites/all/modules/civicrm/packages/PHPgettext/streams.php)```
The code in this file that causes the error is:
```php
function seekto($pos) {
fseek($this->_fd, $pos);
$this->_pos = ftell($this->_fd);
return $this->_pos;
}
```
After changing this to
```php
function seekto($pos) {
fseek($this->_fd, $this->_pos);
$this->_pos = ftell($this->_fd);
return $this->_pos;
}
```
It seems to make the error go away.
If you have already posted on:
- https://civicrm.stackexchange.com
- https://chat.civicrm.org/civicrm/pl/yfx7e3un4f8nifxq1iknj5amjw
Environment information
----------------------------------------
* __Browser:__ Firefox
* __CiviCRM:__ 5.71.0
* __PHP:__ 8.1
* __CMS:__ Drupal 7.100
* __Database:__ MariaDB 10.6.16
* __Web Server:__ Apache/2.4.52https://lab.civicrm.org/dev/core/-/issues/5110afform: Display option "Remember Filters" not keeping value2024-03-25T15:01:10Zjensschuppeafform: Display option "Remember Filters" not keeping value## Overview
The display option "Remember Filters" in search displays does not retain its value when the configuration form is being reloaded.
## Reproduction steps
1. Create a _SearchKit_ search with a search form
2. Add a form displa...## Overview
The display option "Remember Filters" in search displays does not retain its value when the configuration form is being reloaded.
## Reproduction steps
1. Create a _SearchKit_ search with a search form
2. Add a form display (e.g. _Table_)
3. add some exposed filters
4. Check _Remember Filters_
5. Reload the configuration form for that form display
## Current behaviour
The option seems to be stored and filter values are being stored per user. The option field (checkbox) however is not set when reloading the config form of the form display. Saving the config form without changing that option still seems to retain its value (still storing filter values). So the config form does not reflect the actual option value.
## Expected behaviour
The option should be set when re-visiting the form display config form. Saving the form should respect the value (unchecked: unset the option).
## Environment information
* **Browser:** _Chromium 123.0.6312.58_
* **CiviCRM:** _5.71.0_https://lab.civicrm.org/dev/core/-/issues/5109Smarty 3 causes crash if exception thrown, e.g. by crmAPI2024-03-22T15:10:45ZRichSmarty 3 causes crash if exception thrown, e.g. by crmAPIOverview
----------------------------------------
I think this is a general problem that could occur if a smarty function throws an exception. The page crashes with:
> undefined extension class 'Smarty_Internal_Method_Trigger_Error'
[...Overview
----------------------------------------
I think this is a general problem that could occur if a smarty function throws an exception. The page crashes with:
> undefined extension class 'Smarty_Internal_Method_Trigger_Error'
[chat mention](https://chat.civicrm.org/civicrm/pl/gnqn1rihnprc7er1fcssqd1j6r)
Reproduction steps
----------------------------------------
I edited EventInfo.tpl to put this in:
```
{crmAPI var='local_date_time' entity='Event' action='getvalue' return="custom_115" id=$event.id}
```
Note that I had a custom_115 field defined for all events, but this event did not have a value for that field.
Visit the page that uses that template.
Crash.
Environment information
----------------------------------------
* __CiviCRM:__ 5.70 - 5.71.1
* __PHP:__ 8.1
* __CMS:__ D7
Comments
----------------------------------------
I'm not sure, but from memory api3 getvalue has changed; it now gives an *error* saying:
> "error_message": "field custom_115 unset or not existing"
I'm sure before it just used to return nothing.
Or it could be that before Smarty 3, it was happy to treat nothing as '' and now it's more picky.
I think the main problem seems to be that the exception/error handling is broken in Smarty3. Obviously if there's a bug in the template, it's going not to work, but it oughtn't crash the whole page.
The code that throws the error that causes the crash is CRM/Core/Smarty/plugins/function.crmAPI.php L35:
$smarty->trigger_error('{crmAPI} ' . $e->getMessage());https://lab.civicrm.org/dev/core/-/issues/5108Inconsistent handling of tag name and tag label2024-03-23T14:15:54ZDetlev SieberInconsistent handling of tag name and tag label## Overview
When you change a tag in the tag tree, only the label is changed, the name remains the old entry. So after changing and reloading, in the tag tree the old entry is still shown - despite the previous change.
In the contact s...## Overview
When you change a tag in the tag tree, only the label is changed, the name remains the old entry. So after changing and reloading, in the tag tree the old entry is still shown - despite the previous change.
In the contact summary, the change is not reflected: Because there, the tag name is used, not the tag label. Which also seems, hmm..., interesting...
## Reproduction steps
1. Tag a contact with a specific tag from the tag tree
2. Click on **Contacts -\> Manage Tags**
3. Rename the previously selected tag
4. Reload the tag list -\> again, the old label/name is shown
5. Reload the contact from step 1.: -\> again, the old label/name is shown
## Current behaviour
Renaming the tag in the tag tree only changes the field civicrm_tag.label, not the field civicrm\_tag.name.
This "might" be what we want - however, on several occasions, the tag name is used instead of the tag name.
## Expected behaviour
I would recommend, that both name and label should be changed.
## Environment information
* **CiviCRM:** 5.69.5https://lab.civicrm.org/dev/core/-/issues/5106Admin UI extension breaks contact summary if CiviMember extension is disabled2024-03-27T15:25:42ZKurund JalmiAdmin UI extension breaks contact summary if CiviMember extension is disabledContact summary results in fatal error if Admin UI extension is enabled and CiviMember extension is disabled.
```bash
Civi\API\Exception\NotImplementedException: API (Membership, get) does not exist (or the extension it belongs to is no...Contact summary results in fatal error if Admin UI extension is enabled and CiviMember extension is disabled.
```bash
Civi\API\Exception\NotImplementedException: API (Membership, get) does not exist (or the extension it belongs to is not enabled). in Civi\API\Request::create() (line 51 of /var/www/html/sites/all/modules/civicrm/Civi/API/Request.php).
```https://lab.civicrm.org/dev/core/-/issues/5105Extend FormBuilder conditional logic2024-03-27T12:31:45ZGuillaumeSorelExtend FormBuilder conditional logicI think the visibility condition could be improved with these new functions.
- allow to set if logic applies to show or hide element (until now it's a show per default, but it's useful to be able to hide some elements according to other ...I think the visibility condition could be improved with these new functions.
- allow to set if logic applies to show or hide element (until now it's a show per default, but it's useful to be able to hide some elements according to other values) a simple toggle or radio for `o show if | o hide if`
- add the maximum of options for the validity controls in the drodpwon like in SearchKit: contains, is empty/not empty, is between, regex... and not only maths operatorscolemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/5104Formbuilder: when updating a relationship or an individual, a default value s...2024-03-27T20:10:34ZNadaillacFormbuilder: when updating a relationship or an individual, a default value set to "now" in a field (custom or not) does not appearOverview
----------------------------------------
Reproduction steps on Wpmaster
----------------------------------------
Create a form with
- individual1 (update, and URL) with fields name, marriage date (with default value set to now...Overview
----------------------------------------
Reproduction steps on Wpmaster
----------------------------------------
Create a form with
- individual1 (update, and URL) with fields name, marriage date (with default value set to now)
- relationship1 (update, and URL) with field relationship end date (with default value set to now)
![Civi_bug_2](/uploads/c274601cbe1e98140982c36d809fffe5/Civi_bug_2.png)
![Civi_bug_3](/uploads/3e926e8907b49c9c559123cf4bb04f6d/Civi_bug_3.png)
Create a relationship for example Employee (Julian Bachman=36) Employer (Bay ...). Let us say that the relationshipid=218
Call the form #?Individual1=36&Relationship1=218
Results
- The information (Name first name) are retrieved,
- Marriage date and relationship end date ("now" date) appears less that 1 second and then are left blank
![Civi_bug_1](/uploads/d050063465cd95d255ce402664ea11e9/Civi_bug_1.png)
This behavior appears only if the relationship (or individual) exists (it is an update). In case of creation, the "now" information is OK
Environment information
----------------------------------------
Wpmaster and also 5.70
Comments
----------------------------------------
I m ok to fund the fix:-). I need it for a client.colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/5103Saving checkbox custom fields via APIv4 fails for custom/dynamic entities2024-03-22T03:13:00ZjensschuppeSaving checkbox custom fields via APIv4 fails for custom/dynamic entities## Steps to reproduce
* For a custom/dynamic entity type (e.g. using the [_Entity Construction Kit_](https://github.com/systopia/de.systopia.eck)), add a custom field with HTML type `CheckBox`
* Try to create/save an entity with that fi...## Steps to reproduce
* For a custom/dynamic entity type (e.g. using the [_Entity Construction Kit_](https://github.com/systopia/de.systopia.eck)), add a custom field with HTML type `CheckBox`
* Try to create/save an entity with that field with APIv4, e.g. using the _ECK_ Afform forms (whether the field has a value is irrelevant)
## Expected behavior
Entity saved, field has selected (or no) value
## Actual behavior
Entity not saving, error is `Error: Class name must be a valid object or a string in civicrm_api3_generic_getoptions() (line 442 of /path/to/civicrm/civicrm-core/api/v3/Generic.php).`
## Technical details
* `DAOActionTrait` calls the global (APIv3) function `formatCheckBoxField()` for fields with an HTML type of `CheckBox` [here](https://github.com/civicrm/civicrm-core/blob/018741e09162a29f34a01d04141e3f96ddcade19/Civi/Api4/Generic/Traits/DAOActionTrait.php#L260-L263)
* That function calls APIv3 `getoptions` with the given entity (`Eck_*`)
* APIv3 "normalizes" entity names, stripping the `_` which results in the APIv3 entity being `Eck*`
* Resolving the entity to a DAO class fails at the latest in `_civicrm_api3_get_DAO()` due to the "normalized" entity name
* Finally, when calling `$dao::buildOptions()` on `null`, the error occurs
## Proposed solution
As commented in `DAOActionTrait` for the call of `formatCheckBoxField()`: `this function should be part of a class` - and re-implemented using APIv4 `getFields` with `loadOptions=TRUE` for the given `custom_field_id`.https://lab.civicrm.org/dev/core/-/issues/5102Allow access to API params from Api4Query2024-03-20T13:55:38ZMichael McAndrewAllow access to API params from Api4QueryContext:
* I am adding an 'extra' calculated field to a spec provider for a custom entity.
* The value of this extra calculated field depends on a parameter passed to the get action.
* I have access to the query in the setSqlRenderer me...Context:
* I am adding an 'extra' calculated field to a spec provider for a custom entity.
* The value of this extra calculated field depends on a parameter passed to the get action.
* I have access to the query in the setSqlRenderer method (which contains a _protected_ API object) but there doesn't appear to be a way to access the API parameters.
Adding the following method to Api4Query allows read only access to API params and seems inline with other methods like `getSelect()`, but feel free to let me know if I am doing it wrong and there is a better approach.
```php
/**
* @return mixed
*/
public function getParam(string $param) {
return call_user_func([$this->api, 'get'.ucfirst($param)]);
}
```
PR coming up...https://lab.civicrm.org/dev/core/-/issues/5101Search Builder: Contact not in Tag don't takes contacts without tags into acc...2024-03-19T20:35:27ZglanzelSearch Builder: Contact not in Tag don't takes contacts without tags into accountOverview
----------------------------------------
In Search Generator When searching for not in Tag(s) it don't takes contacts without tags into account.
Reproduction steps
----------------------------------------
Click Search -> Sear...Overview
----------------------------------------
In Search Generator When searching for not in Tag(s) it don't takes contacts without tags into account.
Reproduction steps
----------------------------------------
Click Search -> Search Builder
and there choose
Contact -> Tags -> not in -> TagX.
as Search parameter.
Current behaviour
----------------------------------------
Only Persons with minimum one Tag but without TagX gets displayed.
Expected behaviour
----------------------------------------
Any Contact with Tags other than TagX **and** all Contacts without any Tag should be displayed.
Environment information
----------------------------------------
* CiviCRM:CiviCRM 5.73.alpha1
Comments
----------------------------------------https://lab.civicrm.org/dev/core/-/issues/5100Payment appears as 123 units of $1 rather than one unit of $123 if using othe...2024-03-22T14:38:36ZwmortadaPayment appears as 123 units of $1 rather than one unit of $123 if using other amount fieldOverview
----------------------------------------
This appears to be a regression in CiviCRM 5.69 upwards. If you create a contribution pages that allows other amounts the amount in that field is recorded in the quantity field of the li...Overview
----------------------------------------
This appears to be a regression in CiviCRM 5.69 upwards. If you create a contribution pages that allows other amounts the amount in that field is recorded in the quantity field of the line item rather than the unit price.
It looks like the quantity and the unit price have been swapped.
Reproduction steps
----------------------------------------
1. Create a contribution page with the other amounts section enabled
2. Visit the contribution page and type an amount in 'Other amount' field
3. View the contact record - note that the quantity is the amount and the unit price is 1.00
![image](/uploads/c16ed4be20e97bb2f86d63d5842d481e/image.png)
![image](/uploads/2e27e1f53dfca423a63ef4d98a5f0042/image.png)
![image](/uploads/85840162f1fc088ddcd6de5c7565ea5d/image.png)
Current behaviour
----------------------------------------
The amount is recorded in the quantity field. The unit price is $1.00.
Expected behaviour
----------------------------------------
The quantity is 1. The amount is recorded in the unit price field.
Environment information
----------------------------------------
Tested in CiviCRM 5.69, 5.70 and 5.73alpha1 (current dmaster). It is an issue in all three versions.
I'm not sure when this stopped working, but think it is quite recent.5.71.2