Development issueshttps://lab.civicrm.org/groups/dev/-/issues2024-03-27T12:31:45Zhttps://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/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/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/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/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/5094Formbuilder: Individual 1 fields are refreshed to their initial values (updat...2024-03-27T20:12:19ZNadaillacFormbuilder: Individual 1 fields are refreshed to their initial values (updates are lost) as soon as a Individual 2 contact is chosen in an existing contact fieldOverview
----------------------------------------
I have a form with an existing contact
![Civi_form_1](/uploads/e815efe6b8d3be57f2706e58ea31abe8/Civi_form_1.png)
And the screen
![Civi_form_2](/uploads/0b0b6c2db6c36fa935886a4b0d243d5...Overview
----------------------------------------
I have a form with an existing contact
![Civi_form_1](/uploads/e815efe6b8d3be57f2706e58ea31abe8/Civi_form_1.png)
And the screen
![Civi_form_2](/uploads/0b0b6c2db6c36fa935886a4b0d243d53/Civi_form_2.png)
https://chat.civicrm.org/civicrm/pl/7qss36x3mi8x5dmnnc5s4tjr4o
Reproduction steps
----------------------------------------
- Update the contact fields (for example the marital status from married - initial value- to Domestic partner - updated value-)
- Input something in the details field of the activity
- Choose a contact in the field "existing contact"
- As soon as the contact is chosen, the contact fields that were updated returned to their initial values , for example, for marital status -> married
- Activity field keep the updated value -> correct
Current behaviour
----------------------------------------
Expected behaviour
----------------------------------------
The contact fields updates by the user in te screen should not be refreshed to their initial values
Environment information
----------------------------------------
Tested in Wpmaster.
Comments
----------------------------------------
I am ok to fund the fix as i need it for a client :-)colemanwcolemanwhttps://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/5092Logging Detail Report table view is broken2024-03-13T16:13:06ZElliott EgglestonLogging Detail Report table view is brokenOverview
----------------------------------------
The logging detail report in table view does not align the field names, old values, and new values, making it very hard to see what
Reproduction steps
----------------------------------...Overview
----------------------------------------
The logging detail report in table view does not align the field names, old values, and new values, making it very hard to see what
Reproduction steps
----------------------------------------
1. Edit several aspects of an existing contact's name in one action (for example, by clicking the edit icon by the name and changing first and last, adding a middle initial and a suffix)
2. Click on the change log tab
3. Click into the most recent 'Update' activity
Current behaviour
----------------------------------------
The table has three columns, each of which has a row for each aspect changed. Blank values are removed in the template, pushing any values below them up so the bottom values do not align with each other.
![image](/uploads/6928e87f7d7ce522a0c45bbde57ea1a0/image.png)
Expected behaviour
----------------------------------------
Space is left for blank values so field names, old values, and new values are aligned across all three columns.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.https://lab.civicrm.org/dev/drupal/-/issues/195CiviCRM Smarty3 errors...2024-03-14T22:46:59ZChiplehCiviCRM Smarty3 errors...When updating to ESR 5.69.x, we are running into errors with Smarty3 when updating the smarty path in civicrm.settings.php:
define('CIVICRM_SMARTY3_AUTOLOAD_PATH',
'/var/www/example.com/sites/all/modules/civicrm/packages/smarty3/ve...When updating to ESR 5.69.x, we are running into errors with Smarty3 when updating the smarty path in civicrm.settings.php:
define('CIVICRM_SMARTY3_AUTOLOAD_PATH',
'/var/www/example.com/sites/all/modules/civicrm/packages/smarty3/vendor/autoload.php');
$Fatal Error Details = array:3 [
"message" => "undefined extension class 'Smarty_Internal_Runtime_Get_Plugin_Filepath'"
"code" => null
"exception" => SmartyException {#8284
#message: "undefined extension class 'Smarty_Internal_Runtime_Get_Plugin_Filepath'"
...
We are still trying to diagnose why this is happening, but we have upgraded some clients with no issues, and other clients with varying degrees of issues. Has anyone else encountered this issue when upgrading to 5.69.x?
System:
Drupal 7.99
CiviCRM 5.69.5
PHP 8.1https://lab.civicrm.org/dev/translation/-/issues/85Some strings in core afforms do not translate2024-03-25T18:55:32ZbgmSome strings in core afforms do not translateFor example:
- Enable CiviCampaign
- Go to the CiviCampaign dashboard
![image](/uploads/49a1d30b027b36f57971cbc4fb9d48ff/image.png)
For the tabs, the strings are correctly wrapped with `ts`, and I double-checked that the strings are t...For example:
- Enable CiviCampaign
- Go to the CiviCampaign dashboard
![image](/uploads/49a1d30b027b36f57971cbc4fb9d48ff/image.png)
For the tabs, the strings are correctly wrapped with `ts`, and I double-checked that the strings are translated in my translation file.
For the placeholders on the filter fields, the strings are not correctly wrapped in `ts`, but even if I do wrap them, and I make sure to add the strings to my translation files, they do not translate.
cc @colemanwhttps://lab.civicrm.org/dev/core/-/issues/5087Links to export and import Data Segmentation saved searches2024-03-12T20:00:39ZherbdoolLinks to export and import Data Segmentation saved searchesRight now there's no easy way to export a Data Segmentation saved search. One can export the main saved search, but if it references a Data Segmentation there is no easy way to export it as well.
So the only way is to go to the API4 exp...Right now there's no easy way to export a Data Segmentation saved search. One can export the main saved search, but if it references a Data Segmentation there is no easy way to export it as well.
So the only way is to go to the API4 explorer, select Saved Segmentation, guess at the ID (since it's not visible in the UI or even the link), export to JSON and copy that. Then go to the other site and only include part of that JSON (everything in `values`) and save it.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/5083SearchKit: It's not possible to uppercase countries and states/provinces2024-03-12T13:30:39ZfrancescbassasSearchKit: It's not possible to uppercase countries and states/provincesReproduced on dmaster.demo.civicrm.org at 5.73.alpha1
![imatge](/uploads/92832dc535bb7b462cd714cc3b58dec5/imatge.png)Reproduced on dmaster.demo.civicrm.org at 5.73.alpha1
![imatge](/uploads/92832dc535bb7b462cd714cc3b58dec5/imatge.png)https://lab.civicrm.org/dev/core/-/issues/5080SearchKit: Join on contact reference in event not working if event isn't root...2024-03-12T13:29:16ZTobias Voigttobias.voigt@civiservice.deSearchKit: Join on contact reference in event not working if event isn't root entityI'm trying to create a SearchKit for participants. I have a join on the participant's events as a secondary entity. From the events I then want to join on a contact via a custom field on the event that is a contact reference - but it doe...I'm trying to create a SearchKit for participants. I have a join on the participant's events as a secondary entity. From the events I then want to join on a contact via a custom field on the event that is a contact reference - but it doesn't work.
When I have the event as the root entity everything works fine. Yet, if I start from participants I can't join on the contact reference.https://lab.civicrm.org/dev/core/-/issues/5078Formbuilder: updates not saved when a populated field of type "file" is prese...2024-03-27T21:07:26ZNadaillacFormbuilder: updates not saved when a populated field of type "file" is present in the formOverview
----------------------------------------
When a field of type "file" is present in the form, then updates in this form when submitted, are not saved.
https://chat.civicrm.org/civicrm/pl/jq8ei9pxa3r58nr13rsgzqy9tr
Reproduction s...Overview
----------------------------------------
When a field of type "file" is present in the form, then updates in this form when submitted, are not saved.
https://chat.civicrm.org/civicrm/pl/jq8ei9pxa3r58nr13rsgzqy9tr
Reproduction steps in WP master
----------------------------------------
Create a customized field "file" for contact. Ex: Resume
Create a basic form with an individual: first name, last name marital status, and the field Resume
![Civi_f0](/uploads/e49a4fcd969f61914d9782981032f5b0/Civi_f0.png)
view as logged in (as a user "demo")
Update first name, last name (but not the file)
![Civi_f1](/uploads/6628ffadd5479d87a71792710920ef53/Civi_f1.png)
The data are correctly saved
Update a field and upload a file
![Civi_f2](/uploads/c818403e6c530a6625340099b37d8734/Civi_f2.png)
The data are correctly saved
![Civi_f3](/uploads/4b0091e52e64f5460fce384695ba0536/Civi_f3.png)
view again and update marital status, first name
![Civi_f4](/uploads/a3cf5991f8a55938ad2207f09a743206/Civi_f4.png)
Updates re not saved
![Civi_f5](/uploads/61c9669dfafa7db3c783b103933da511/Civi_f5.png)
I remove the file and change the marital status
![Civi_f6](/uploads/1a71cdcf72f0dec27e29d36861d8d94e/Civi_f6.png)
The marital status has been updated but the file has not been removed
![Civi_F7](/uploads/1c4bb33e3446bdef76b48111a2809436/Civi_F7.png)
Environment information
----------------------------------------
Wpmaster 5.72
The bug is also in 5.70.2
I'm OK to fund the fix !! I need it for a client :-)colemanwcolemanwhttps://lab.civicrm.org/dev/core/-/issues/5076Error on install2024-03-12T13:27:18ZJonGoldError on installI just attempted to install via the normal web UI for the first time in a very long time. Brand new D7 site, brand new Civi. Disabled all components but CiviEvent and CiviMail. On install, I received this message:
```
CRM_Extension_E...I just attempted to install via the normal web UI for the first time in a very long time. Brand new D7 site, brand new Civi. Disabled all components but CiviEvent and CiviMail. On install, I received this message:
```
CRM_Extension_Exception_DependencyException: Cannot disable extension due to dependencies. Consider disabling all these: civi_campaign,civi_case,civi_contribute,civi_member,civi_pledge,civi_report,financialacls in CRM_Extension_Manager->disable() (line 387 of /var/www/mysite.org/web/sites/all/modules/civicrm/CRM/Extension/Manager.php).
```
Reloading the page got me past the error but since it's the first thing a new admin will see it's worth fixing IMO.