Development issueshttps://lab.civicrm.org/groups/dev/-/issues2024-03-22T03:13:00Zhttps://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/2994Support oEmbed for external facing pages2024-03-21T18:50:44ZJoeMurraySupport oEmbed for external facing pagesAn important evolution of CiviCRM is to better support remote sites exposing CiviCRM forms and content.
Many platforms including WordPress and Drupal core since 8.6 support oEmbed, which allows a site to pull in content from a different...An important evolution of CiviCRM is to better support remote sites exposing CiviCRM forms and content.
Many platforms including WordPress and Drupal core since 8.6 support oEmbed, which allows a site to pull in content from a different site that exposes its content as oEmbed.
There is a good list of oEmbed providers, and CiviCRM should aspire to join it: https://oembed.com/providers.json
We should expose the following 'pages' as oEmbed content, using appropriate standard markup for use in WordPress and Drupal 8.6+ sites, and support the workflow for confirmation, thank you, and search results as appropriate:
1. Phase 1
1. Contribution page
2. Event info page
3. Event registration page
2. Phase 2
1. Something like a profile create/edit page that does not involve a payment but allows submission of a form to create a contact and activity and perhaps more (eg parent-child relationship)
2. Search Kit page
3. Petition page
3. Phase 3
1. Personal Campaign Page
2. Pages from extensions, eg Grant Application Page
3. CiviSurvey pages
Note: I haven't done the research to understand the details of oEmbed and potential challenges. I think this could be done through extension(s).
I'm posting this in order to generate discussion for a possible Roadmap item.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/5096SearchKit displays break hook_civicrm_links implementations2024-03-20T02:49:14ZAndie HuntSearchKit displays break hook_civicrm_links implementations[hook_civicrm_links](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_links/) allows extension developers to modify the action links (e.g. View, Edit, Delete, etc.) at the ends of rows in a display. However, SearchKit doesn't se...[hook_civicrm_links](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_links/) allows extension developers to modify the action links (e.g. View, Edit, Delete, etc.) at the ends of rows in a display. However, SearchKit doesn't seem to have a way to handle this.
As a consequence, the project of marching through all of the listing displays and replacing them with SearchKit forms means that we're in the process of systematically breaking nearly every implementation of hook_civicrm_links and providing no way to resolve it.
Ideally, the same `$op` strings would be used so that existing extensions could continue working as-is, but I'm not seeing how to provide all the necessary arguments to the hook.
Alternatively, it would be very useful to have a way for an extension to modify the links without reimplementing the entire display (or else we'll inevitably see them start to clash).
But at the very least, we need to have clear guidance for how to reimplement an extension for more recent versions of CiviCRM. We've noticed it in contact summary Relationships tab extensions, but soon it will be a lot.https://lab.civicrm.org/dev/core/-/issues/3769Change the default font family to sans-serif in print.css2024-03-19T20:19:43ZwmortadaChange the default font family to sans-serif in print.cssThe font family is set as `DejaVu Sans` but the fallback is `serif` in `print.css`. Surely this should be `sans-serif`?
See https://github.com/civicrm/civicrm-core/blob/master/css/print.css#L23
```
#crm-container {
overflow: visible ...The font family is set as `DejaVu Sans` but the fallback is `serif` in `print.css`. Surely this should be `sans-serif`?
See https://github.com/civicrm/civicrm-core/blob/master/css/print.css#L23
```
#crm-container {
overflow: visible !important;
font-family: DejaVu Sans, serif;
margin: 0px 10px 0px 10px;
}
```https://lab.civicrm.org/dev/core/-/issues/5099SearchKit UX: Rename the query tabs2024-03-18T18:23:24ZJonGoldSearchKit UX: Rename the query tabsWhen I saw the new tabbed interface for SK queries, I meant to submit a UX note. Today, one of my savvier clients was tripped up by the tab labels, which reminded me to come back.
Their particular error - they tried to add new columns ...When I saw the new tabbed interface for SK queries, I meant to submit a UX note. Today, one of my savvier clients was tripped up by the tab labels, which reminded me to come back.
Their particular error - they tried to add new columns with the "Select Fields" tab.
* We should relabel that - I like "Field Transformations", but that conflicts with the rewrite on displays. Bikeshedding welcome, but this is better in than out.
* "Query Info" is ambiguous - I recommend "Debugging" or "Developer Info".
* "Configure Settings" is also ambiguous but I struggle for something better. This is query metadata, but I don't know a good non-technical term to unambiguously communicate that. The best I have is "Save Options" but most people would read "Save" as a verb, not a noun.
* You can select fields under the "Select Fields" tab that aren't a column in the search, which leads to a crash on save. Is there a valid case for that? If not, we should limit the list. But that probably should be its own issue.https://lab.civicrm.org/dev/core/-/issues/5086Ability to export FormBuilder forms from the UI2024-03-18T15:35:22ZherbdoolAbility to export FormBuilder forms from the UIWe've got an export link for SearchKit, but if a saved search is wrapped up in a FormBuilder form there's no easy way to also export those files. I can imagine a modal with the text from the forms files (`*.html`, `*.json`) and a link to...We've got an export link for SearchKit, but if a saved search is wrapped up in a FormBuilder form there's no easy way to also export those files. I can imagine a modal with the text from the forms files (`*.html`, `*.json`) and a link to copy it. Or even ability to save the files as a zip file.
And I suppose we'd need an import link as well to import on a different site (similar to SearchKit's link).https://lab.civicrm.org/dev/core/-/issues/5082CiviCRM 5.70.0, 5.71.0 - With URL tracking enabled, a personalised "View in y...2024-03-18T15:33:44Zjustinfreeman (Agileware)CiviCRM 5.70.0, 5.71.0 - With URL tracking enabled, a personalised "View in your browser" link incorrectly replaces ? with & which causes CiviCRM to respond with error: "You do not have permission to access this page"CiviCRM 5.70.0, 5.71.0 - With URL tracking enabled, a personalised "View in your browser" link incorrectly replaces ? with & which causes CiviCRM to respond with error: "You do not have permission to access this page".
This happens when...CiviCRM 5.70.0, 5.71.0 - With URL tracking enabled, a personalised "View in your browser" link incorrectly replaces ? with & which causes CiviCRM to respond with error: "You do not have permission to access this page".
This happens when using a personalised "View in your browser" URL like this in the mailing, note the use of tokens:
https://goodcause.org.au/civicrm/mailing/view?id={mailing.key}&{contact.checksum}&cid={contact.contact_id}
Which is then incorrectly converted to - this only happens with URL tracking enabled. When URL tracking is disabled, no problems at all.
https://goodcause.org.au/civicrm/mailing/view&id=38&cs=838eae033aa8c2edb56f25b54a1edde5_1709775006_2880&cid=389
And then CiviCRM to respond with error: "You do not have permission to access this page"
The fix and workaround for this issue is to instead just use this token as the URL, which will render correctly.
{mailing.viewUrl}
It's not unreasonable to expect the personalised "View in your browser" URL will work, the first URL parameter should not be converted in this way. This may have implications for other types of URLs too.
Agileware Ref: CIVICRM-2230https://lab.civicrm.org/dev/core/-/issues/5045CiviCRM 5.70.0 - CiviCRM 5.72.alpha1, Manage Groups page (not SearchKit) the...2024-03-18T15:30:58Zjustinfreeman (Agileware)CiviCRM 5.70.0 - CiviCRM 5.72.alpha1, Manage Groups page (not SearchKit) the "quick edit" feature for the Group Title will include the "Child of" details in the editable fieldCiviCRM 5.70.0 - CiviCRM 5.72.alpha1, Manage Groups page (not SearchKit) the "quick edit" feature for the Group Title will include the "Child of" details in the editable field.
- Instead of editing: "Advisory Board"
- The text edited i...CiviCRM 5.70.0 - CiviCRM 5.72.alpha1, Manage Groups page (not SearchKit) the "quick edit" feature for the Group Title will include the "Child of" details in the editable field.
- Instead of editing: "Advisory Board"
- The text edited is: "Advisory BoardChild of: Summer Program Volunteers"
As shown below in screenshot from CiviCRM 5.72.alpha1 - https://dmaster.demo.civicrm.org/civicrm/group?reset=1
![image](/uploads/56206568c0a4103b7fa27f30602156d0/image.png)
Agileware Ref: CIVICRM-2224https://lab.civicrm.org/dev/core/-/issues/5044CiviCRM 5.70.0, When doing a back-end event registration for an Event which u...2024-03-18T15:30:22Zjustinfreeman (Agileware)CiviCRM 5.70.0, When doing a back-end event registration for an Event which uses a Priceset, the event registration allows a $0 registration fee which does not record any line itemsWhen doing a back-end event registration for an Event which uses a Priceset, the event registration allows a $0 registration fee which does not record any line items. This causes Priceset related errors when generating the emails using t...When doing a back-end event registration for an Event which uses a Priceset, the event registration allows a $0 registration fee which does not record any line items. This causes Priceset related errors when generating the emails using the Message Template. Event registration will just “hang” and the following logged to the error log.
```
An error of type E_ERROR was caused in line 474 of the file civicrm/CRM/Financial/BAO/Order.php. Error message: Uncaught TypeError: CRM_Financial_BAO_Order::getPriceSetID(): Return value must be of type int, null returned in
CRM/Financial/BAO/Order.php:474
```
CiviCRM 5.70.0
Agileware Ref: CIVICRM-2220https://lab.civicrm.org/dev/core/-/issues/5020Provide support for the Peppol standard to send invoices from CiviCRM to othe...2024-03-18T15:29:58Zjustinfreeman (Agileware)Provide support for the Peppol standard to send invoices from CiviCRM to other organisationsThis is just a placeholder to see if there is any interest in providing support for the Peppol standard. Did some searching and couldn't find any mentions about this in Lab.
Basically, the idea is to provide support for the Peppol stand...This is just a placeholder to see if there is any interest in providing support for the Peppol standard. Did some searching and couldn't find any mentions about this in Lab.
Basically, the idea is to provide support for the Peppol standard to send invoices from CiviCRM to other organisations. See https://peppol.org/ and participating organisations will be listed here, https://directory.peppol.eu/publichttps://lab.civicrm.org/dev/core/-/issues/5098Make all price fields visible on Event Info page2024-03-18T11:12:03ZyashodhaMake all price fields visible on Event Info pageToday, on the event info page, anonymous users (public) don't see the member price but admin does based on visibility.
In the extension, the field Visibility limits the display of the price optionnot only on the event registration page b...Today, on the event info page, anonymous users (public) don't see the member price but admin does based on visibility.
In the extension, the field Visibility limits the display of the price optionnot only on the event registration page but also on the event info page.
The limitation should not be applied to the event info page but only to the event registration page.
On the event info page, anyone should see all the price options.
The restriction to members should be only on event registration page. Since this is a display only page, it gives the user incentive to login if they want to avail the price configured for not just for public.https://lab.civicrm.org/dev/core/-/issues/5093Pending From Wait List Link Not Functional if Event Maximum Attendee Number H...2024-03-16T15:51:44ZLKuttnerPending From Wait List Link Not Functional if Event Maximum Attendee Number Has Been Exceeded by a Certain AmountWhen you move a registrant from wait list to pending from wait list and send them a notification with a link, clicking that link may result in a event is full message, instead of the Confirm your registration message. I have not found wh...When you move a registrant from wait list to pending from wait list and send them a notification with a link, clicking that link may result in a event is full message, instead of the Confirm your registration message. I have not found where a limit is defined, but for example, if we are over the limit by just a few attendees, pending from wait list allows the person to complete their registration. If we are already over the maximum by a dozen or more, they instead get the event is full message when using their pending from wait list link. So, is this a hard coded number or a percentage or what?https://lab.civicrm.org/dev/core/-/issues/5095CRM_Report_Form_Activity: links to target / assigned contacts are often incor...2024-03-15T18:31:06ZAllenShawCRM_Report_Form_Activity: links to target / assigned contacts are often incorrect(I understand CiviReport is not getting active development; I'd still like to offer a PR for this fix.)
**To reproduce on dmaster (currently "Powered by CiviCRM 5.73.alpha1"):**
1. Create an activity with several (e.g. 5 or more) contac...(I understand CiviReport is not getting active development; I'd still like to offer a PR for this fix.)
**To reproduce on dmaster (currently "Powered by CiviCRM 5.73.alpha1"):**
1. Create an activity with several (e.g. 5 or more) contacts in each of "With Contact" and "Assigned to", specifying "Create one activity with all contacts together"
2. Run the report Activity Details Report, specifying filters that will include this new activity, and specifying display columns "Assignee Name" and "Target Name".
**Expected behavior:**
- The columns "Assignee Name" and "Target Name" should display multiple contacts, each linked to the corresponding contact record.
**Observed (bad) behavior:**
- The columns "Assignee Name" and "Target Name" correctly display multiple contacts, but **each link often points to the wrong contact (e.g. Contact A is linked to contact B, contact B is linked to contact A, etc.)**https://lab.civicrm.org/dev/core/-/issues/1631Wrong behaviour on event Payment Information visibility for unpayed events2024-03-15T18:16:32ZfrancescbassasWrong behaviour on event Payment Information visibility for unpayed eventsOverview
----------------------------------------
When you edit an unpayed event registration, Payment Information section is visible by default even if "Record payment?" is unchecked.
Reproduction steps
--------------------------------...Overview
----------------------------------------
When you edit an unpayed event registration, Payment Information section is visible by default even if "Record payment?" is unchecked.
Reproduction steps
----------------------------------------
**Payment Information should be hidden**
1. Register a contact to an event without record any payment
2. Edit registration
3. Note that `Payment Information` section is visible
4. Check `Record Payment?` field
5. Note everything is still the same
6. Uncheck `Record Payment?` field
7. Note `Payment Information` section is hidden
**You may think that you are recording the contribution but the contribution is not recorded**
1. Register a contact to an event without record any payment
2. Edit registration
3. Note that `Payment Information` section is visible (with event fee set on the Amount field)
4. Click to save (without changing anything)
5. Note contribution was not recorded
Current behaviour
----------------------------------------
`Payment Information` section is visible for unpayed event registration editing form
![2020-03-04_17-13](/uploads/daacd3a4ce44727a748e1f8b94194a45/2020-03-04_17-13.png)
Expected behaviour
----------------------------------------
`Payment Information` section should be hidden for unpayed event registration editing forms and should appear when `Record Payment?` is checked.
Environment information
----------------------------------------
* __CiviCRM:__ _Master/5.26.alpha1/5.20.3/5.13.4/_https://lab.civicrm.org/dev/core/-/issues/470Current employer dissapears when disabling expired relationships2024-03-15T18:12:06ZfrancescbassasCurrent employer dissapears when disabling expired relationshipsOriginal issue: https://issues.civicrm.org/jira/browse/CRM-21851
Affected versions: at least from 5.0.0
---
How to reproduce:
1) Create a current relationship on individual A as *employee of* organization B and mark as *current emplo...Original issue: https://issues.civicrm.org/jira/browse/CRM-21851
Affected versions: at least from 5.0.0
---
How to reproduce:
1) Create a current relationship on individual A as *employee of* organization B and mark as *current employer*
2) Create a past relationship on individual A as *employee of* organization B without marking as current employer
At this point on summary tab of individual A appears organization B as his Employer.
3) Run *Disable expired relationships* cron job
At this point on summary tab there is no organization at Employer field although there is one active employee relationship and past relationship was disabled.5.17.0https://lab.civicrm.org/dev/core/-/issues/4985Custom radio/checkbox fields - maximum options per line - alignment lost2024-03-15T18:05:43ZsamuelsovCustom radio/checkbox fields - maximum options per line - alignment lostRegression following on #1821.
This is what we used to have (html table so everything is aligned):
![screen1](/uploads/afc5f71950f200da120187746e43f222/screen1.png)
This is what we have now:
![screen2](/uploads/c202f5aa0fccf732d96090...Regression following on #1821.
This is what we used to have (html table so everything is aligned):
![screen1](/uploads/afc5f71950f200da120187746e43f222/screen1.png)
This is what we have now:
![screen2](/uploads/c202f5aa0fccf732d96090fd2d385138/screen2.png)
Currently, it's almost impossible to fix it using css.https://lab.civicrm.org/dev/core/-/issues/3738Feature request - APIv4 Get action, provide ability to define aliases for the...2024-03-15T14:56:37Zjustinfreeman (Agileware)Feature request - APIv4 Get action, provide ability to define aliases for the select fields so that external integrations with CiviCRM do not break when the field name changes OR a different field is selectedThis is a Feature request. It would be great if you could define an **alias** for each _select_ **field** when using a **APIv4 Get action**. This alias should then be used as the output in the results for the Get action.
This would enab...This is a Feature request. It would be great if you could define an **alias** for each _select_ **field** when using a **APIv4 Get action**. This alias should then be used as the output in the results for the Get action.
This would enable external CiviCRM integrations to be more robust, by allowing the fields selected in the Get action to be **changed** and but continue to use the **same alias**, thus not changing the structure of the results, the external integration would continue to work.
The other benefit would be that very long CiviCRM field names could be reduced to something shorter or more logical. eg. Instead of "email.email" the alias could just be set to "email". Or instead of "email_greeting_id:label" the alias could just be "email_greeting".
![image](/uploads/2ccae5082e4f50f5fc924d8e6998ffaa/image.png)https://lab.civicrm.org/dev/core/-/issues/4858Contact id quicksearch broken2024-03-15T13:24:20ZAndy ClarkContact id quicksearch brokenContact id quicksearch has broken in 5.67.3, albeit occasionally. User cannot locate any contacts by id at all, and using Drupal 'masquerade I verified this to be the case. The fix was to run the 'Cleanup Caches' option. What may be a...Contact id quicksearch has broken in 5.67.3, albeit occasionally. User cannot locate any contacts by id at all, and using Drupal 'masquerade I verified this to be the case. The fix was to run the 'Cleanup Caches' option. What may be a clue is that this system uses ACLs and although this user would have been restricted by ACLs she would have had access to the contacts she was searching for. As an administrator I could see the contacts when she couldn't which does seem to point to ACLs as the problem.https://lab.civicrm.org/dev/core/-/issues/5091crm.ajax.js uses synchronous XHR2024-03-15T02:24:51ZJonGoldcrm.ajax.js uses synchronous XHROverview
----------------------------------------
When editing a contribution loaded in a modal, if the server is configured to disallow synchronous XHR, the "Cancel" and "Save" buttons don't appear.
Example use-case
------------------...Overview
----------------------------------------
When editing a contribution loaded in a modal, if the server is configured to disallow synchronous XHR, the "Cancel" and "Save" buttons don't appear.
Example use-case
----------------------------------------
1. In your web server config, modify your Permissions-Policy or add one that disables synchronous XHR, e.g. for Apache:
```
Header always set Permissions-Policy "sync-xhr=()"
```
1. Click **Edit** next to a contribution (without opening in a new tab, so it appears in a modal).
Current behaviour
----------------------------------------
"Cancel" and "Save" buttons are missing.
Proposed behaviour
----------------------------------------
"Cancel" and "Save" buttons should appear.
Comments
----------------------------------------
The console error is:
```
[Violation] Permissions policy violation: Synchronous requests are disabled by permissions policy.
```
It faults `crm.ajax.js` line 329 (currently: `that.element.html(data.content);`).
Per the [XHR spec](https://xhr.spec.whatwg.org/#the-open()-method):
> Synchronous XMLHttpRequest outside of workers is in the process of being removed from the web platform as it has detrimental effects to the end user’s experience. (This is a long process that takes many years.) Developers must not pass false for the async argument when the current global object is a Window object. User agents are strongly encouraged to warn about such usage in developer tools and may experiment with throwing an "InvalidAccessError" DOMException when it occurs.
This isn't urgent - most folks aren't blocking Synchronous XHR - but since this is the only issue I've seen in months of having this permissions policy, it seems like we can get atop things.