Development issueshttps://lab.civicrm.org/groups/dev/-/issues2024-01-22T05:03:20Zhttps://lab.civicrm.org/dev/core/-/issues/3187Exporting Activity Contacts Field Mapping page display just shows Assignee2024-01-22T05:03:20ZBarijohnExporting Activity Contacts Field Mapping page display just shows AssigneeOverview
----------------------------------------
When using field mapping to display an activity export the only name shown is the Assignee no matter which option you choose of With, Assigned, Added by. However the actual export is corr...Overview
----------------------------------------
When using field mapping to display an activity export the only name shown is the Assignee no matter which option you choose of With, Assigned, Added by. However the actual export is correct. This means people think it is wrong and stop at this point.
Conversation in Stack Exchange here: https://civicrm.stackexchange.com/questions/41274/missing-data-when-exporting-activities-from-search-results/41275
PR That might be connected is https://github.com/civicrm/civicrm-core/pull/21595
Tested on DMaster Demo5.50.alpha1
Reproduction steps
----------------------------------------
1. Create an Activity with a target and assignee. (I used meeting)
2. Search for activities using With or Added By.
3. Select Export activities from search page
4. Choose Field Mapping then choose Display Name/First Name/Last Name.
5. Preview displays the Assignee name.
6. Export shows the correct result.
Current behaviour
----------------------------------------
![Screenshot_2022-04-21_at_13.29.13](/uploads/f12bb0441e1b35692d781a3d7656510b/Screenshot_2022-04-21_at_13.29.13.png)
![Screenshot_2022-04-21_at_13.29.59](/uploads/a82fafcf91dd0472b7d5ad7c9566f6c0/Screenshot_2022-04-21_at_13.29.59.png)
Expected behaviour
----------------------------------------
The Display Mapping should show Margaret Smith.
Environment information
----------------------------------------
DMaster Demo5.50.alpha1https://lab.civicrm.org/dev/core/-/issues/3439batch geocode API does not process event addresses2024-01-22T05:03:19Zlcdwebbatch geocode API does not process event addressesThe Job.geocode API does not process event addresses because they are not tied to a contact record, and the query that currently retrieves these records is contact table dependent.
The query can be easily restructured to include the eve...The Job.geocode API does not process event addresses because they are not tied to a contact record, and the query that currently retrieves these records is contact table dependent.
The query can be easily restructured to include the event addresses.lcdweblcdwebhttps://lab.civicrm.org/dev/core/-/issues/4253cURL error when trying to update action-provider, data processor or CiviRules...2024-01-21T12:44:06ZMariaVcURL error when trying to update action-provider, data processor or CiviRules via UIOverview
----------------------------------------
When trying to update action provider or data processor via UI the following error occurs:
`(cURL error 28: Operation timed out after 5000 milliseconds with 142514 out of 408357 bytes rec...Overview
----------------------------------------
When trying to update action provider or data processor via UI the following error occurs:
`(cURL error 28: Operation timed out after 5000 milliseconds with 142514 out of 408357 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)`
Reproduction steps
----------------------------------------
1. Click on _Extensions_
2. Upgrade action-provider or data processor or CiviRules
3. Error (see above)
Current behaviour
----------------------------------------
Using wget via terminal the download for action provider takes 15 seconds.
Data processor download takes 1m 52s via wget.
It seems that lab.civicrm.org is quite slow.
Expected behaviour
----------------------------------------
Successful Update via UI
Possible solution: time out increasehttps://lab.civicrm.org/dev/core/-/issues/3442Allow other services to standardize addresses and spin off CRM_Utils_Address_...2024-01-21T05:03:28ZherbdoolAllow other services to standardize addresses and spin off CRM_Utils_Address_USPS into an extensionOverview
----------------------------------------
Currently `CRM_Core_BAO_Address::fixAddress` is hardcoded to use `CRM_Utils_Address_USPS` alone. It allows an "address_standardization_provider" to be set but it will only recognize USPS...Overview
----------------------------------------
Currently `CRM_Core_BAO_Address::fixAddress` is hardcoded to use `CRM_Utils_Address_USPS` alone. It allows an "address_standardization_provider" to be set but it will only recognize USPS.
Proposed behaviour
----------------------------------------
Allow for other providers and restructure so that USPS is not hardcoded here. USPS could extend an `AddressStandardization` class or something like that. Could use `CRM_Utils_GeocodeProvider` for inspiration.https://lab.civicrm.org/dev/core/-/issues/3433FormBuilder: allow multiple email/phone/address blocks with pre-set location ...2024-01-21T05:03:28ZStéphane Lussierstephane@symbiotic.coopFormBuilder: allow multiple email/phone/address blocks with pre-set location typesOverview
----------------------------------------
I like the flexibility of _afform_ and its ability to edit multiple fields on the fly :
![afform](/uploads/132b8354b92569465f49a464dd9fd4f7/image.png)
...but sometimes, it would be ni...Overview
----------------------------------------
I like the flexibility of _afform_ and its ability to edit multiple fields on the fly :
![afform](/uploads/132b8354b92569465f49a464dd9fd4f7/image.png)
...but sometimes, it would be nice if it could also do this :
![profile](/uploads/83b66e2904f2391d6d7d56e971d279bd/image.png)
Current behaviour
----------------------------------------
Afform currently exposes all its flexibility to the end user by providing all available options to composite fields.
Proposed behaviour
----------------------------------------
Provide the ability to pre-configure a given amount of multiple fields in order to simplify the end-user interface and expose those fields immediately once the form is loaded.
Comments
----------------------------------------
In the case of an email field, we would be able to decide in advance the location of each field and/or specify which of those fields should be the main one.https://lab.civicrm.org/dev/core/-/issues/3434Date Range labels2024-01-20T05:03:29ZerikbrouwerDate Range labelsOverview
----------------------------------------
When creating a search kit for an event management overview, we added an option in the search form to look for upcoming events with a data range. For the date range, we could show a label...Overview
----------------------------------------
When creating a search kit for an event management overview, we added an option in the search form to look for upcoming events with a data range. For the date range, we could show a label for the Event Start Date field, but we could not add labels to the "to" and "from" date/time fields, which would improve the user experience if we could.
Example use-case
----------------------------------------
The use case where we found it, but would occur in any search kit display where a data range is added to the afform, is an event overview page that allows a selection by data range
The result screen on the manual for search kit is the example where we found this issue: https://lab.civicrm.org/alainb/user-en/-/blob/searchkit-otterlo-sprint/docs/searching/searchkit/example-upcoming-events.mdhttps://lab.civicrm.org/dev/core/-/issues/3188Can't create / use event template on 5.48.22024-01-20T05:03:28ZGuillaumeSorelCan't create / use event template on 5.48.2When creating an event, I can't use a template as the dropdown in itself is not shown even though one template exists.
Creating an event template is also not possible and leads to creating a simple event (regression from former issues).
...When creating an event, I can't use a template as the dropdown in itself is not shown even though one template exists.
Creating an event template is also not possible and leads to creating a simple event (regression from former issues).
To "create" a template it had to be 'forced' in database > table civicrm_event option `is_template` set to `1` for the chosen event but it's actually not useable. It shows up in template list, is editable but actually can't be chosen as the dropdown itself is not shown.https://lab.civicrm.org/dev/core/-/issues/4926Drupal 10: `cv` fails on CiviCRM 5.69.22024-01-19T19:41:46ZpcurrierDrupal 10: `cv` fails on CiviCRM 5.69.2Overview
----------------------------------------
This is essentially a dupe of https://lab.civicrm.org/dev/core/-/issues/3438 -- Civi tries to call the drupal logger before it has been bootstrapped.
Reproduction steps
-----------------...Overview
----------------------------------------
This is essentially a dupe of https://lab.civicrm.org/dev/core/-/issues/3438 -- Civi tries to call the drupal logger before it has been bootstrapped.
Reproduction steps
----------------------------------------
1. Run a cv command, like "cv api system.check"
2. Get the error below if anything is logged before Drupal is up
Current behaviour
----------------------------------------
Here is the error from "cv -vvv":
```
In Drupal.php line 169:
[Drupal\Core\DependencyInjection\ContainerNotInitializedException]
\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.
Exception trace:
at /var/www/d8/web/core/lib/Drupal.php:169
Drupal::getContainer() at /var/www/d8/web/core/lib/Drupal.php:673
Drupal::logger() at /var/www/d8/vendor/civicrm/civicrm-core/CRM/Utils/System/Drupal8.php:301
CRM_Utils_System_Drupal8->url() at /var/www/d8/vendor/civicrm/civicrm-core/CRM/Utils/System.php:282
CRM_Utils_System::url() at /var/www/d8/vendor/civicrm/civicrm-core/tools/extensions/formprotection/settings/formprotection.setting.php:180
include() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsMetadata.php:109
Civi\Core\SettingsMetadata::loadSettingsMetadata() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsMetadata.php:92
Civi\Core\SettingsMetadata::loadSettingsMetaDataFolders() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsMetadata.php:66
Civi\Core\SettingsMetadata::getMetadata() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsManager.php:220
Civi\Core\SettingsManager->getDefaults() at /var/www/d8/vendor/civicrm/civicrm-core/Civi/Core/SettingsManager.php:102
Civi\Core\SettingsManager->useDefaults() at /var/www/d8/vendor/civicrm/civicrm-core/CRM/Core/Config.php:103
CRM_Core_Config::singleton() at phar:///usr/sbin/cv/src/Bootstrap.php:241
Civi\Cv\Bootstrap->boot() at phar:///usr/sbin/cv/src/Util/BootTrait.php:101
Civi\Cv\Command\ApiCommand->_boot_full() at n/a:n/a
call_user_func() at phar:///usr/sbin/cv/src/Util/BootTrait.php:45
Civi\Cv\Command\ApiCommand->boot() at phar:///usr/sbin/cv/src/Command/ApiCommand.php:59
Civi\Cv\Command\ApiCommand->execute() at phar:///usr/sbin/cv/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at phar:///usr/sbin/cv/vendor/symfony/console/Application.php:1009
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/sbin/cv/vendor/symfony/console/Application.php:273
Symfony\Component\Console\Application->doRun() at phar:///usr/sbin/cv/src/Application.php:82
Civi\Cv\Application->doRun() at phar:///usr/sbin/cv/vendor/symfony/console/Application.php:149
Symfony\Component\Console\Application->run() at phar:///usr/sbin/cv/src/Application.php:49
Civi\Cv\Application::main() at phar:///usr/sbin/cv/bin/cv:27
require() at /usr/sbin/cv:14
```
Expected behaviour
----------------------------------------
cv should not throw this error.
Environment information
----------------------------------------
* CiviCRM: 5.69.2
* PHP: 8.1.14
* CMS: Drupal 10.2
Comments
----------------------------------------
I tried bgm's fix from issue https://lab.civicrm.org/dev/core/-/issues/3438 (basically having CRM_Utils_System_Drupal8->url() return null before calling logger() if Drupal is not bootstrapped yet) and the error disappeared.https://lab.civicrm.org/dev/core/-/issues/4901financialacls has a missing dependency on civi_contribute2024-01-19T19:31:27Zfkohrtfinancialacls has a missing dependency on civi_contributeThis is just to report an anomaly I experienced on two separate CiviCRM instances.
After we updated our CiviCRM 5.68.0 running on Drupal 10.2.1 to version 5.69.1, I received the following extension error in the _CiviCRM System Status_:
...This is just to report an anomaly I experienced on two separate CiviCRM instances.
After we updated our CiviCRM 5.68.0 running on Drupal 10.2.1 to version 5.69.1, I received the following extension error in the _CiviCRM System Status_:
> "Financial ACLs" (`financialacls`) has a missing dependency on "CiviContribute" (`civi_contribute`)
It also says "To resolve any errors, go to __Manage Extensions__.", but after following that link I don't know what to do next.
We had the following extensions installed:
- AuthX
- CiviEvent
- CiviReport
- CKEditor4
- Contributor cancel actions
- Custom search framework
- Form Core
- FlexMailer
- SearchKit
After installing CiviContribute due to the extension error, I got the following full page error message:
> Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.
>
> DB Error: already exists
CiviContribute is now also listed as installed extension.
Is there something I could/should have done different?https://lab.civicrm.org/dev/core/-/issues/3438Drupal 9: `cv` fails on CiviCRM 5.48.22024-01-19T16:05:09ZmasettoDrupal 9: `cv` fails on CiviCRM 5.48.2Overview
----------------------------------------
`cv` command fails on CiviCRM 5.48.2 on Drupal 9
Reproduction steps
----------------------------------------
1. run any cv command, such as: `cv ext:list -L`
1. Got an error
```
In Drup...Overview
----------------------------------------
`cv` command fails on CiviCRM 5.48.2 on Drupal 9
Reproduction steps
----------------------------------------
1. run any cv command, such as: `cv ext:list -L`
1. Got an error
```
In Drupal.php line 170:
\Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.
```
Environment information
----------------------------------------
* __CiviCRM:__ 5.48.2
* __PHP:__ 7.4
* __CMS:__ Drupal 9.3.12
* __Database:__ MariaDB 10.5.12
* __cv:__ v0.3.21 (installed by composer). This is composer.json part:
```
"require": {
"civicrm/civicrm-core": "~5.46",
"civicrm/civicrm-drupal-8": "~5.46",
"civicrm/civicrm-packages": "~5.46",
"civicrm/cv": "^0.3.16",
```5.61.0https://lab.civicrm.org/dev/core/-/issues/3426form builder: edited labels result in visible markup on public display2024-01-19T05:03:24Zmegaphonetech-dennisform builder: edited labels result in visible markup on public displayWhen I created a form using Form Builder, edited a label, and then viewed the results as a standalone webpage, the edited labels unexpectedly displayed markup, which I believe to be a bug.
1. I created at Form Builder form at https://dm...When I created a form using Form Builder, edited a label, and then viewed the results as a standalone webpage, the edited labels unexpectedly displayed markup, which I believe to be a bug.
1. I created at Form Builder form at https://dmaster.demo.civicrm.org, titled *Form Title Here*, located at https://dmaster.demo.civicrm.org/civicrm/form-title-here
1. I exposed the form as a standalone webpage, by entering *civicrm/form-title-here* into the field, *Page*, located under **form settings > Placement**
1. I added a few fields associated with an organization contact to my form. These included a fieldset which contained an address block, as well as a *supplemental address 1* field.
1. I edited the labels for *Street Address* and *Supplemental Address 1* fields.
1. I viewed the form at https://dmaster.demo.civicrm.org/civicrm/form-title-here and found markup displayed along with the label. See screenshot.
![Screenshot_from_2022-04-26_17-22-28](/uploads/cadd27624aba5b9e23156fa3d2991178/Screenshot_from_2022-04-26_17-22-28.png)
Here is my form's markup
```
<af-form ctrl="afform">
<af-entity data="{contact_type: 'Organization', source: 'Form Title Here'}" type="Contact" name="Organization1" label="Organization 1" actions="{create: true, update: true}" security="RBAC" />
<fieldset af-fieldset="Organization1" class="af-container" af-title="Org 1">
<div af-join="Address" af-repeat="Add" min="1">
<div class="af-container af-layout-inline">
<af-field name="street_address" defn="{label: '<span class="ng-pristine ng-untouched ng-valid ng-binding ng-isolate-scope ng-not-empty" contenteditable="true">Street Address 1</span>', input_attrs: {}}" />
<af-field name="supplemental_address_1" defn="{label: 'Street Address 2', input_attrs: {}}" />
</div>
<div class="af-container af-layout-inline">
<af-field name="city" />
<af-field name="country_id" defn="{afform_default: '1228', input_attrs: {}}" />
<af-field name="state_province_id" />
<af-field name="postal_code" />
</div>
</div>
</fieldset>
<button class="af-button btn btn-primary" crm-icon="fa-check" ng-click="afform.submit()">Submit</button>
</af-form>
```https://lab.civicrm.org/dev/core/-/issues/3417Search Kit: SQL syntax error when creating smart group based on custom field2024-01-19T05:03:23ZJonGoldSearch Kit: SQL syntax error when creating smart group based on custom fieldWhen creating a SK-based smart group, the SQL generated in the `HAVING` clause doesn't correctly calculate the name of custom fields.
### Steps to Replicate
* Create a new contact custom field of type Contact Reference.
* Fill in that v...When creating a SK-based smart group, the SQL generated in the `HAVING` clause doesn't correctly calculate the name of custom fields.
### Steps to Replicate
* Create a new contact custom field of type Contact Reference.
* Fill in that value on 1-2 contacts.
* Create a SK search that finds those contacts.
* Create a smart group based on the search. In the "Contact Column" selector, choose the custom field and save.
* Go to **Manage Groups** and attempt to view the contacts in the smart group.
### Expected Result
List of contacts.
### Actual Result
`DB Error: no such field`.
The SQL generated looks like this (my contact reference field is named 'advisor'):
```
INSERT IGNORE INTO civicrm_tmp_e_gccache_2d0f369488c3e23a1be7f722895ad9ce (group_id, contact_id)
SELECT 5 AS group_id, `constituent_information.advisor` AS contact_id FROM (
SELECT `constituent_information_1`.`advisor_7` AS `constituent_information.advisor`
FROM civicrm_contact a
LEFT JOIN `civicrm_value_constituent_information_1` `constituent_information_1` ON `a`.`id` = `constituent_information_1`.`entity_id`
WHERE (`a`.`id` >= "150")
HAVING (constituent_information.advisor NOT IN ( SELECT contact_id FROM civicrm_group_contact WHERE civicrm_group_contact.status = 'Removed' AND civicrm_group_contact.group_id = 5 )) )
```
The issue is with `HAVING (constituent_information.advisor`. A `HAVING` clause must reference the non-aliased name of the field. `CRM_Contact_BAO_GroupContactCache::getApiSQL()` has this line:
```php
$idField = SqlExpression::convert($apiParams['select'][0], TRUE)->getAlias();
```
However, this returns the incorrect value for `idField` when the Contact Column is a custom field.
I attempted a fix but couldn't find a way to determine the entity of the `$idField`.
Below is a Search Kit export of the search. You need a contact reference field named "advisor" in the "Constituent Information" custom group.
```json
[
[
"SavedSearch",
"save",
{
"records": [
{
"name": "abc",
"label": "abc",
"form_values": null,
"search_custom_id": null,
"api_entity": "Contact",
"api_params": {
"version": 4,
"select": [
"constituent_information.advisor",
"display_name",
"constituent_information.advisor"
],
"orderBy": [],
"where": [
[
"id",
">=",
150
]
],
"groupBy": [],
"join": [],
"having": []
},
"expires_date": null,
"description": null,
"mapping_id": null
}
],
"match": [
"name"
]
}
],
[
"Group",
"save",
{
"records": [
{
"name": "test_group_5",
"title": "test group",
"description": null,
"source": null,
"saved_search_id.name": "abc",
"is_active": true,
"visibility": "User and User Admin Only",
"group_type:name": [],
"parents": null,
"children": null,
"is_hidden": false,
"is_reserved": false,
"frontend_title": null,
"frontend_description": null
}
],
"match": [
"name"
]
}
]
]
```https://lab.civicrm.org/dev/core/-/issues/4922Best way to go from an Excel list of Contact IDs to a Civi group2024-01-18T17:34:49ZAndrew WestBest way to go from an Excel list of Contact IDs to a Civi groupI get regular requests to turn an external list of contact IDs into a Civi group. I don't have a nice way of doing this atm.
**Search Builder**
The best approach I have so far is with Search Builder, of all things. I have a little bit ...I get regular requests to turn an external list of contact IDs into a Civi group. I don't have a nice way of doing this atm.
**Search Builder**
The best approach I have so far is with Search Builder, of all things. I have a little bit of javascript that adds an input and then turns that into a search builder search. This sends the data via POST to the usual search results screen, where you can save it to a group in the normal way. You can do this with tens of thousands of IDs.
![image](/uploads/e617cbf436d0ee9c5efa26efdf89bd03/image.png)
But Search Builder is going away, and it'd be nice to do it in a nice Form Builder screen that doesn't need refreshing.
**Search Kit / Form Builder**
Search Kit can't _quite_ do it. You can't paste in a comma-separated list of IDs:
![image](/uploads/1024c4cf753f0477352d067d983a7d4f/image.png)
(you _can_ paste in comma-separated lists for other fields, just not when it's not a lookup field like Contact ID)
I thought about making a custom quickform that links to a Search with the values in the URL - but this hits limits of the max length of URLs. And we regularly have tens of thousands of people.
Any other ideas? Is there any way to send data to Search Kit in the POST?https://lab.civicrm.org/dev/core/-/issues/3183Event template scheduled reminders lost when creating a new event using API42024-01-18T05:18:05ZufundoEvent template scheduled reminders lost when creating a new event using API4Overview
----------------------------------------
Scheduled reminders from an event template are lost when creating a new event using API4 with the `template id` parameter.
The scheduled reminders are copied, but don't get properly atta...Overview
----------------------------------------
Scheduled reminders from an event template are lost when creating a new event using API4 with the `template id` parameter.
The scheduled reminders are copied, but don't get properly attached to the event.
It seems to work fine if creating an event from template using the admin screens.
Reproduction steps
----------------------------------------
1. Create an event template with one or more scheduled reminders configured on it
1. Check the id for your new template
1. Use API4 to create a new event from the template, using the `template_id` parameter ![image](/uploads/d173de6a8c9cb611fcd4280e99a31727/image.png)
1. Check your new event - it won't have any scheduled reminders
Current behaviour
----------------------------------------
The reminders for the new event are half-created — they show in Administer >> Communications >> Schedule Reminders but but they aren't attached to anything. The issue seems to be they get copied as Event Template reminders and don't get updated to be Event reminders.
![image](/uploads/8d578ef97d71c8be6a6f76cd7d5ef09e/image.png)
(Top row is the original reminder on the template. Second is the 'orphaned' reminder. Third is the successfully copied reminder on event created from template through the web UI)
Expected behaviour
----------------------------------------
The reminders should be attached to the new event.
Environment information
----------------------------------------
* __CiviCRM:__ _dmaster on buildkit 5.50.alpha1_ (and previous versions since a while)
* __PHP:__ _7.4_
* __CMS:__ _Drupal_
Comments
----------------------------------------
I have a patch that seems to resolve though feels a bit hacky. The event schedule reminder code is a bit sticky...https://lab.civicrm.org/dev/core/-/issues/3418Searchkit doesn't remove its tables when you uninstall civi2024-01-18T05:03:27ZDaveDSearchkit doesn't remove its tables when you uninstall civiThis isn't specific to search kit - the more general issue is that extensions don't run their uninstall code when civi is uninstalled - but search kit is the first extension that gets installed along with core and is enabled by default a...This isn't specific to search kit - the more general issue is that extensions don't run their uninstall code when civi is uninstalled - but search kit is the first extension that gets installed along with core and is enabled by default and has its own db tables and those tables are named `civicrm_something`.
So I don't know if I'd call it a bug, but it can cause some confusion when trying to re-install civi after uninstalling. In particular because https://github.com/civicrm/civicrm-core/blob/4d167cf85621e257b43752e6eee7c87abe5d69c2/setup/plugins/checkInstalled/CheckInstalledDatabase.civi-setup.php#L26 thinks civi is already installed and it's not obvious to the user why, especially if using the civicrm/setup screen which just keeps redirecting to the "already installed" page no matter what you do.
Normally core tables get cleaned up when you uninstall civicrm because they're in sql/civicrm_drop.mysql, which is generated from the xml/schema files. Here, search kit is both core and not core, but its tables aren't listed in drop.mysql.
Perhaps civi can try to uninstall all the extensions first before uninstalling itself?https://lab.civicrm.org/dev/core/-/issues/4913[PHP 8.2] mail wrongly formatted2024-01-18T02:51:14Zaydunsaidan.saunders@squiffle.uk[PHP 8.2] mail wrongly formattedOverview
----------------------------------------
When running CiviCRM on PHP8 on Linux, email can be badly formatted.
See https://civicrm.stackexchange.com/q/45782/225 for a description, analysis and fix.
Current behaviour
----------...Overview
----------------------------------------
When running CiviCRM on PHP8 on Linux, email can be badly formatted.
See https://civicrm.stackexchange.com/q/45782/225 for a description, analysis and fix.
Current behaviour
----------------------------------------
Some email headers are not correctly formatted, including the Content-Type boundary specifier. The boundary is ignored and the mail is displayed wrongly.
Solution
--------
The problem is in the Pear Mail library. ~~A [fix](https://github.com/pear/Mail/pull/24) was committed in November for the [2.0.0 release](https://github.com/pear/Mail/issues/33) but this has not yet been released.~~
Environment information
----------------------------------------
* __CiviCRM:__ _Master_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
* __PHP:__ _8.2_5.71.0https://lab.civicrm.org/dev/core/-/issues/4860VTIMEZONE block in ICS file publishes DSTART in wrong timezone2024-01-17T23:01:42ZjamieVTIMEZONE block in ICS file publishes DSTART in wrong timezoneA lot of great work went into fixing our ICS timezone support in #2887!
But, I _think_ there is still one small problem with timezone support.
I'm testing with the ICS file generated by the Montreal Developer Training on February 26th ...A lot of great work went into fixing our ICS timezone support in #2887!
But, I _think_ there is still one small problem with timezone support.
I'm testing with the ICS file generated by the Montreal Developer Training on February 26th (https://civicrm.org/civicrm/event/ical?reset=1&id=1745). The event is supposed to start at 9:00 AM America/New_York time.
I'm using Thunderbird. I have my Thunderbird timezone set to America/Los_Angeles. It's important to set your calendar timezone to a timezone that does not match the event time zone to replicate the problem.
When I import the ICS file, my calendar shows it as starting at 1:00 am America/Los_Angeles time, which would be 4:00 am America/New_York time. The reason it's off is because Thunderbird percieves the correct time to be 9:00 am UTC rather than 9:00 am America/New_York.
Here are the relevant parts of the ICS file.
First, the timezone is defined:
```
BEGIN:VTIMEZONE
TZID:America/New_York
BEGIN:STANDARD
TZOFFSETFROM:-0500
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:20240226T140000
END:STANDARD
END:VTIMEZONE
```
Then, the event date start is defined:
```
TSTAMP;TZID=America/New_York:20240226T090000
DTSTART;TZID=America/New_York:20240226T090000
DTEND;TZID=America/New_York:20240227T170000
```
The problem is with the timezone definition, specifically:
`DTSTART:20240226T140000`
This represents the start time in UTC. But, the [standards](https://www.rfc-editor.org/rfc/rfc5545#section-3.6.5) says:
> The mandatory "DTSTART" property gives the effective onset date
and local time for the time zone sub-component definition.
"DTSTART" in this usage MUST be specified as a date with a local
time value.
In other words, it should be the local time, not UTC. In this case: `DTSTART:20240226T090000`.
Making that adjustment causes it to import properly in Thunderbird.
I'm happy to work on this, but would love some feedback to make sure I'm not offbase on anything. I know @justinfreeman did a lot of work on this in #2887 so maybe has some thoughts.5.71.0https://lab.civicrm.org/dev/core/-/issues/4528Entity Reference custom fields: Configurable delete behavior2024-01-17T22:28:23ZjensschuppeEntity Reference custom fields: Configurable delete behavior## Overview
Currently, when entities referenced in a custom field of the type _Entity Reference_ are deleted, the entity reference field gets cleared (set to `NULL`). This is easy and prevents us from database inconsistencies. But this ...## Overview
Currently, when entities referenced in a custom field of the type _Entity Reference_ are deleted, the entity reference field gets cleared (set to `NULL`). This is easy and prevents us from database inconsistencies. But this can lead to problems:
* inconsistencies when the entity reference field is set to be required
* stale/orphaned entities the entity reference field is attached to
* `civicrm_value_*` records with all-empty columns (or are they being taken care of already)
## Example use-case
Imagine a custom entity named _Qualification_ with (among others) an entity reference custom field referencing a _Contact_ entity, which is set to be required; read: A _Contact_ has multiple _Qualifications_.
## Current behaviour
When deleting the contact, the _Qualification_ entity will not be deleted until done so manually. The reference is just being set to `NULL` instead. Those entities will be meaningless without a referenced contact, the required entity reference custom field will be empty, which breaks the semantic contract.
Question: Is the `SET NULL` behavior a FK constraint on the DB table or part of some logic in Core code?
## Proposed behaviour
When deleting the contact, the _Qualification_ entity should be deleted. This is what we'd have configured the entity reference field to behave, as in other scenarios, the current behavior will be totally fine.
So, we'll need a configuration option for _Entity Reference_ custom fields for selecting what should happen upon deletion of the referenced entity. Available options could be (basically MySQL foreign key constraints):
* Remove Reference (`SET NULL`) - current behavior, maybe also the default option
* Cascade Delete (`CASCADE`) - removes the _`civicrm_value_*`_ record and the entity the custom group is attached to
* Restrict Delete (`RESTRICT`) - just as you can't e. g. delete contacts with financial transactions
* Set Default (`SET DEFAULT`) - to be configured on the custom field
* ~~Keep Reference (`NO ACTION`)~~ - might not be a good idea
## Comments
@colemanw and @michaelmcandrew might be interested.
Currently, this can be partly achieved by implementing a `preDelete` event for retrieving and deleting referencing entities.https://lab.civicrm.org/dev/core/-/issues/4910Create New Contact with Sub-Type Brings Up Wrong Custom Field Sets2024-01-17T21:48:17ZpbarmakCreate New Contact with Sub-Type Brings Up Wrong Custom Field SetsAs of v5.69 (maybe earlier, not sure), whenever we go to "Contacts / Create Individual / Create [specific sub-type] ... " to create one of our sub-types, the sub-type-specific custom fields do not show up. They do show up when creating j...As of v5.69 (maybe earlier, not sure), whenever we go to "Contacts / Create Individual / Create [specific sub-type] ... " to create one of our sub-types, the sub-type-specific custom fields do not show up. They do show up when creating just an Individual and then selecting the sub-type from the field, but not via the URL with the sub-type in it.
Please see the full description here: https://civicrm.stackexchange.com/questions/46210/create-new-contact-with-sub-type-brings-up-wrong-custom-field-sets5.69.3https://lab.civicrm.org/dev/core/-/issues/4899Modelling many to many relationships with Entity reference, SearchKit, FormBu...2024-01-17T18:18:18ZMichael McAndrewModelling many to many relationships with Entity reference, SearchKit, FormBuilder, ECK, etc.Creating this issue as a way to keep track of different bits of functionality that can be used together to model many to many relationships in CiviCRM as when you put this all together, I think it is quite a game changer for data modelli...Creating this issue as a way to keep track of different bits of functionality that can be used together to model many to many relationships in CiviCRM as when you put this all together, I think it is quite a game changer for data modelling in CiviCRM :grinning:
Might make sense to document this at some point soon, and it would be good to collect feedback on how people are finding this functionality, ideas for improvement, etc.
Also, if you have any budget that you would like to put towards this work: to improve it or build out more features, etc. please get in contact with @colemanw or me :heart:.
* Entity Reference fields - allows you to reference other entities in custom data fields effectively creating **one to many** relationships.
* Multivalue custom data sets - [now available to all entities](https://github.com/civicrm/civicrm-core/pull/27549) allowing you to model **many to many** relationships _with additional meta data_ about the relationship
* Searchkit support for [joining via EntityRef fields in multivalue custom data](https://github.com/civicrm/civicrm-core/pull/28721) - allows you to create searches that span many to many joins
* FormBuilder support - allowing for editing of many to many relationships in entities (could probably do with some improvement)
* [ECK](https://github.com/systopia/de.systopia.eck) which allows people to make arbitrary new entities that can be joined via these relationships